[RMI] SocketTimeoutException: Read timed out

A

Andre Raue

Hello,

I just started to build a small RMI example for testing purpose.
everything works fine on Windoze. But when I try to start the Server
on Linux I get the exception shown below. I'm using Java SDK 1.4.2_04
on both machines. You'll find my server class and policy file below.

I would be glad about some help...

Greetings

Andre


Exception:
-----------------------------------
~/java/test > java -jar ByteGetterServer.jar
ByteGetterServer exception: error during JRMP connection establishment;
nested exception is:
java.net.SocketTimeoutException: Read timed out
java.rmi.ConnectIOException: error during JRMP connection establishment;
nested exception is:
java.net.SocketTimeoutException: Read timed out
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:274)
at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at
test.java.basics.rmi.server.ByteGetterServer.main(ByteGetterServer.java:47)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at java.io.DataInputStream.readByte(DataInputStream.java:331)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:215)
... 5 more
-------------------------------


Server class:
-------------------------------
package test.java.basics.rmi.server;

import java.rmi.Naming;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import test.java.basics.rmi.ByteGetter;

public class ByteGetterServer
extends UnicastRemoteObject
implements ByteGetter {

protected ByteGetterServer() throws RemoteException {
super();
}

public byte[] getBytes() throws RemoteException {
byte[] someBytes = "Hallo".getBytes();
return someBytes;
}

public static void main(String[] args) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
try {
ByteGetter aByteGetter = new ByteGetterServer();
Naming.rebind("rmi://localhost/ByteGetter", aByteGetter);
System.out.println("ByteGetter-Server gestartet!");
} catch (Exception e) {
System.err.println("ByteGetterServer exception: " + e.getMessage());
e.printStackTrace();
}
}
}
 
A

Andre Raue

Hello,

as I am still having trouble to get my RMI-Server started on Linux, I
would like to see, what is happening on port 1099 on Linux and on Win NT.

Does anybody know how to do this. Which software do I need? Any proposals?

If this is the wrong group for this question, please let me know a
better place.

Greetings

Andre
 
N

Nigel Wade

Andre said:
Hello,

as I am still having trouble to get my RMI-Server started on Linux, I
would like to see, what is happening on port 1099 on Linux and on Win NT.

Does anybody know how to do this. Which software do I need? Any proposals?

Ethereal is the best tool, a GUI driven packet dump/analyser.
Tcpdump is a similar command line tool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top