• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Test with many threads

 
Sophie Siegel
Greenhorn
Posts: 9
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo,

I have a testclass for testing my methods with RMI Connection.

First the testclass starts the RMI Server and then it starts 500 threads in a for-Loop.
Every thread starts a client which make a registry.lookup and tests my methods on serverside.

With about less than 215 threads I don't have any problem. But more than about 215 threads I get this exception:

java.net.ConnectException: Connection refused: connect
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)
at

I test it with port 1099 and the following ipAddresses:
- my ip Address
- localhost
- 127.0.0.1

The test with starting server and all the clients runs on one machine.
Could this be the problem?

Thank you!
Sophie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic