After spending a day trying to get past this problem, I thought that I would share what I learned. In my setup, I am deploying a WAR file from clientA (clienta.mydomain) to serverB (serverb.mydomain). JBoss 5.1.0 / Cargo 1.2.1
If clientA is windoze, you should not have any problems (I can't believe I just put that in writing). If clientA is *nix, you could run into the dreaded 'Problem establishing socket connection for InvokerLocator' problem. The operating system of serverB make no difference. The only requirement for serverB is that it must be able to resolve clienta.mydomain and be able to establish a socket connection to clientA on some random port.
I read through all of the instructions about modifying the hosts file but it did not help at all. Actually the hosts file on clientA already had clienta and clienta.mydomain resolving to 127.0.0.1. I also found some information on configuring the server to use a bisocket connector. No matter what I tried, the result continued to be the same. The client could connect to the server and create a 0 byte file and then fail.
It turns out that the problem really was the hosts file. According to the instructions, you should have the following line in your hosts file replacing 'myhost' with your actual hostname as per the hostname command.
127.0.0.1 myhost localhost localhost.localdomain
The output of the hostname command on clientA was clienta.mydomain. The problem is that the JBoss Remoting (used by Cargo to perform the deployment) figures out which IP address to bind to by looking up the hostname. Since clienta.mydomain resolved to 127.0.0.1, it was only listening for incoming socket connections on 127.0.0.1. Removing clienta.mydomain from the hosts file solved my problem.