A problem with a communications system forced Germany’s railway network to halt all trains late Tuesday, leaving passengers stranded across the country.