This post is not particular generic and will only affect a few, but I will write it because the problem caused me huge frustration, and much time was wasted.
We currently use CommVault for backup and the Galaxy agent to make it work with Linux. I had a freshly installed Linux box which simply would not back up. The Controller and agent could communicate and there were no errors raised on either. Every time a backup was run, the scan would work, but as soon as data transfer was ready a communication error was raised.
It turns out that a clean install of Debina/Ubuntu adds an entry for your FQDN which point to 127.0.1.1. This is included for machines which swap networks and possibly hostnames form time to time (think laptops) so app suites like GNOME still work. It is also, in my opinion, stupid.
This entry was breaking Galaxy. I can only guess what was happening as it is a closed source suite. But I think at some point in the backup process, even though communication is already happening, the agent gives the Controller the IP address to talk to. As the hosts file had a pointer to a localhost IP, this IP address was handed back to the Controller. and everything breaks.
So simple lesson, if you have a Debian/Ubuntu machine with static networking, replace the 127.0.1.1 entry in /etc/hosts for the FQDN to the real IP address.