Google grupe više ne podržavaju nove postove ni pretplate na Usenetu. Stari sadržaj ostaje vidljiv.

RMI problem

0 prikaza
Preskoči na prvu nepročitanu poruku

Manuela Onu

nepročitano,
13. maj 2001. u 13:31:1113. 5. 2001.
za
Hi everybody !

I have the following RMI problem:

I am running a server object which I try to access from 100 threads running
simultaneously. In each thread I am calling Naming.lookup(serverObjectName)
to acquire the server object reference. Every once in a while I am getting
the following exception:

java.net.ConnectException: Connection refused: no further
information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
<<<< one of the methods in my application here >>>

I am running on a W2K platform and I checked
HKEY_LOCAL_MACHINE/SYSTEM/Services/Tcpip/Parameters which seems to be OK.
However it looks like the system is unable to create a new socket
connection.

netstat shows around 200 sockets being active when the exception is thrown
(I am running both the client, server and rmiregistry on the same machine).

Does anybody know what the problem might be ? If I reduce the number of
threads (and implicitly the number of connections) I am consistently not
getting the error any longer.

Thanks very much

0 novih poruka