Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:6356Abū al-Ḥusayn ʿAlī b. Muḥammad b. ʿAbdullāh b. Bishrān > Ismāʿīl b. Muḥammad al-Ṣaffār > Bishr b. Mūsá Abū ʿAlī al-Asadī > Abū Zakariyyā / al-Saylaḥīnī > Ḥammād b. Salamah > Yūnus b. ʿUbayd > al-Ḥasan > Abū Bakarah

[Machine] The sun was eclipsed during the time of the Messenger of Allah ﷺ , so he came out and performed two units of prayer. Then he said, "Indeed, the sun and the moon are two signs from the signs of Allah, and they do not eclipse for the death or life of anyone. So if you see an eclipse, then pray and supplicate to Allah and remember Him in this manner..."  

البيهقي:٦٣٥٦أَخْبَرَنَا أَبُو الْحُسَيْنِ عَلِيُّ بْنُ مُحَمَّدِ بْنِ عَبْدِ اللهِ بْنِ بِشْرَانَ أنبأ إِسْمَاعِيلُ بْنُ مُحَمَّدٍ الصَّفَّارُ ثنا بِشْرُ بْنُ مُوسَى أَبُو عَلِيٍّ الْأَسَدِيُّ ثنا أَبُو زَكَرِيَّا يَعْنِي السَّيْلَحِينِيَّ ثنا حَمَّادُ بْنُ سَلَمَةَ عَنْ يُونُسَ بْنِ عُبَيْدٍ عَنِ الْحَسَنِ عَنْ أَبِي بَكَرَةَ قَالَ

كَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ فَخَرَجَ فَصَلَّى رَكْعَتَيْنِ ثُمَّ قَالَ إِنَّ الشَّمْسَ وَالْقَمَرَ آيَتَانِ مِنْ آيَاتِ اللهِ وَإِنَّهُمَا لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَا لِحَيَاتِهِ فَإِذَا كَسَفَ وَاحِدٌ مِنْهُمَا فَصَلُّوا وَادْعُوا وَاذْكُرُوا اللهَ هَكَذَا  

رَوَاهُ جَمَاعَةٌ مِنَ الْأَئِمَّةِ عَنْ بِشْرِ بْنِ مُوسَى بِهَذَا اللَّفْظِ وَقَدِ اسْتَشْهَدَ الْبُخَارِيُّ بِرِوَايَةِ حَمَّادِ بْنِ سَلَمَةَ عَنْ يُونُسَ

See similar narrations below:

Collected by Ṭabarānī
tabarani:14703ʿUbayd b. Ghannām > Abū Bakr b. Abū Shaybah > Wakīʿ > Ismāʿīl b. Abū Khālid > Qays b. Abū Ḥāzim > ʿUqbah b. ʿAmr Abū Masʿūd

[Machine] The sun was eclipsed during the time of the Messenger of Allah ﷺ, and some people said, "The sun has eclipsed because of the death of Ibrahim ﷺ ." The Prophet ﷺ said, "Verily, the sun and the moon do not eclipse due to the death or life of anyone. Rather, they are two signs among the signs of Allah. So, when you see them, invoke Allah and offer prayer."  

الطبراني:١٤٧٠٣حَدَّثَنَا عُبَيْدُ بْنُ غَنَّامٍ ثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ ثَنَا وَكِيعٌ عَنْ إِسْمَاعِيلَ بْنِ أَبِي خَالِدٍ عَنْ قَيْسِ بْنِ أَبِي حَازِمٍ عَنْ عُقْبَةَ بْنِ عَمْرٍو أَبِي مَسْعُودٍ قَالَ

انْكَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ فَقَالَ أُنَاسٌ إِنَّمَا انْكَسَفَتِ الشَّمْسُ لِمَوْتِ إِبْرَاهِيمَ عَلَيْهِ السَّلَامُ فَقَالَ النَّبِيُّ ﷺ «إِنَّ الشَّمْسَ وَالْقَمَرَ لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَا لِحَيَاتِهِ وَلَكِنَّهُمَا آيَتَانِ مِنْ آيَاتِ اللهِ فَإِذَا رَأَيْتُمُوهَا فَصَلُّوا»