[jboss-user] [Remoting] - Cannot connect to socket on Fedora Core 6

rob_blake do-not-reply at jboss.com
Thu Mar 15 09:31:45 EDT 2007


Hi all,

i'm struggling to connect to a socket on Fedora Core 6 using JBoss remoting.

I have a client on a Windows XP box that simply attempts to connect to the socket based Connector running on port 9999 of the Fedora box. Currently I am only getting CannotConnectExcecpton. The strange thing being that this works perfectly in reverse with the Windows XP box acting as the server, and the Fedora box running as the client. 

Some info on the fedora box:


java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode)

uname -r
2.6.18-1.2798.fc6


Firstly, here is my client code:


connectArgs = "/?clientMaxPoolSize=10&timeout=30000";
locator = new InvokerLocator(transport + "://" + hostname + ":" + port + connectArgs);
client = new Client(locator);
client.setSubsystem("executeCheck");
client.connect();

// commandName is simply a string. processResponse method simply echos any response
processResponse(client.invoke(commandName,commandArgs);


The followinig is the server code that runs on the Fedora box:


locator = new InvokerLocator(transport + "://" + hostname + ":" + port + "/?clientLeasePeriod=10000&timeout=120000"0;
connector = new Connector();
connector.setInvokerLocator(locator.getLocatorURI);
connector.create();
connector.addInvocationHandler("executeCheck",new AgentPluginInvocationHandler());
connector.start();


The above server code starts without issue on the Fedora box, but i cannot connect to it using the client code from the Windows machine, receiving the aforementioned CannotConnectException.

I have tried turning off SELinux and the firewall for Fedora, as well as the Windows Firewall. 

I have also put together a small app that opened a ServerSocket on port 9999 and then exited once a connection was made. I was able to connect to this without issue from the Windows machine.

One other thing of note is that i can connect to the port if running 'telnet localhost 9999' from the Fedora machine.

As I say, i'm sure it's something small that I'm missing and I probably just need another set of eyes to point out what it is.

cheers

Rob 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028362#4028362

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028362



More information about the jboss-user mailing list