Hasan Basri narrates from Ibn Abbas (may Allah be pleased with them) that there was a lunar eclipse and Ibn Abbas (may Allah be pleased with them) was in Basra. Ibn Abbas (may Allah be pleased with them) came out and led us in two rak‘ahs, performing two bowings (ruku‘) in each rak‘ah. Then he mounted (his ride) and delivered a sermon to us, saying: Indeed, I have prayed in the same manner as I saw the Messenger of Allah (ﷺ) pray. And he said: Indeed, the sun and the moon are two signs among the signs of Allah; they do not eclipse due to anyone’s death or life. When you see anything of the eclipse in them, you should hasten towards the remembrance of Allah.
Hadith Referenceمسند الإمام الشافعي / كتاب الكسوف / 550
Hadith Takhrijاسناده ضعيف لضعف شيخ الشافعي والحسن البصري مدلس وعنعن اخرجه البيهقي في المعرفة السنن والآثار (1992)۔