Hi,
I'm having a problem with my client connecting to the server, and i haven't found any clue searching the posts, so here it goes...
I have a very simple server similar to the HelloUser example. I'm running it from within Eclipse with no problems. Startup log says:
May 1, 2007 9:16:48 PM com.sun.sgs.impl.kernel.Kernel <init>
INFO: The Kernel is ready, version: 0.9.1-r2129
May 1, 2007 9:16:50 PM com.sun.sgs.impl.kernel.Kernel applicationReady
INFO: FreeTraveller: application is ready
When I try to connect with my (also very simple) client, y get this:
ay 1, 2007 9:16:57 PM com.sun.sgs.impl.service.session.ClientSessionImpl$Listener exceptionThrown
WARNING: Handler.exceptionThrown handle:com.sun.sgs.impl.io.SocketConnection@95fd19
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$4(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(Unknown Source)
at org.apache.mina.util.NamePreservingRunnable.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The client just does this to connect:
...
client = new SimpleClient(this);
Properties connectProps = new Properties();
connectProps.setProperty("host", "localhost");
connectProps.setProperty("port", "1139");
try {
System.out.println("pre login");
client.login(connectProps);
System.out.println("post login");
} catch (IOException e) {
e.printStackTrace();
}
...
The server is running at localhost, port 1139 (but the connection is received and *then* shutdown by the client, so that info is ok). OS is Windows XP. I suspect either some kind of operating system/permission/security problem (but i even shut down the firewall to test this), or maybe some Eclipse thing with two apps. running inside trying to connect to each other (I'll try running some - or both - outside Eclipse). Could someone hint me on where could I look for the problem?
Thanks