Thank you so much for this post! Our tech named our Windows 2008 server using underscores. We were trying to get EJB connections from a variety of Windows Services and they all came up without a port.
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://192.168.247.33//?dataType=invocation&enableTcpNoDelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&socketTimeout=600000&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
As soon as we renamed the computer, the connections succeeded. This would have taken me years to figure out without your post. Thanks again!