(Imām Bukhārī narrates): 'Abdullāh ibn Muhammad narrated to us, he said: Hāshim ibn al-Qāsim narrated to us, he said: Shaibān Abū Mu'āwiyah narrated to us, from Ziyād ibn 'Ilāqah, from al-Mughīrah ibn Shu'bah, may Allāh be pleased with him, he narrated that:
in the time of the Messenger of Allāh ﷺ the sun was eclipsed, on the day that (his son) Ibrāhīm, may Allāh be pleased with him, died. So the people said: The sun has been eclipsed because of the death of Ibrāhīm. Then the Messenger of Allāh ﷺ said: Indeed, the sun and the moon are not eclipsed because of anyone's death, nor because of anyone's life. So when you see (the eclipse), pray, and make du'ā' to Allāh, Mighty and Glorious.
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ قَالَ حَدَّثَنَا هَاشِمُ بْنُ الْقَاسِمِ قَالَ حَدَّثَنَا شَيْبَانُ أَبُو مُعَاوِيَةَ عَنْ زِيَادِ بْنِ عِلَاقَةَ عَنْ الْمُغِيرَةِ بْنِ شُعْبَةَ قَالَ كَسَفَتْ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَوْمَ مَاتَ إِبْرَاهِيمُ فَقَالَ النَّاسُ كَسَفَتْ الشَّمْسُ لِمَوْتِ إِبْرَاهِيمَ فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّ الشَّمْسَ وَالْقَمَرَ لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَا لِحَيَاتِهِ فَإِذَا رَأَيْتُمْ فَصَلُّوا وَادْعُوا اللَّهَ
Reference: Sahih Al Bukhari 1043