The engine of a goods train derailed in Sonbhadra early on Monday, disrupting rail traffic for hours after debris from a nearby hill fell on the tracks due to heavy rains, railway officials said.