A “ghost ship” abandoned by its crew has run aground on rocks on the south coast of Ireland after drifting in the Atlantic for 17 months.