• Post Reply Bookmark Topic Watch Topic
  • New Topic

rmi exception

 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting this exception as soon as I try to start the rmiregistry. I tried rebooting, but it does not help. Can somebody help me with this?
___________________________________________
java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address in use: JVM_Bind
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:452)
at java.net.ServerSocket.<init>(ServerSocket.java:170)
at java.net.ServerSocket.<init>(ServerSocket.java:82)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMI
DirectSocketFactory.java:30)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMI
MasterSocketFactory.java:312)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:55
9)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:222)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:176
)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:12
5)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:95)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:81)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:320)
 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I rebooted it again and it fixed it....
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am getting this exception as soon as I try to start the rmiregistry. I tried rebooting, but it does not help. Can somebody help me with this?

My guess is that you start the registry externally, then start the server. If you shut down the server, the registry might still be up, so you get this exception when you start the server again. A convinient way to avoid this is to start the registry from within the server itself.
Eugene.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!