Solved

java.rmi.server.ExportException: Port already in use

Posted on 2002-04-01
7
10,531 Views
Last Modified: 2007-11-27
I'm writing an RMI application.
When running the RMIRegistry I get the following exception:

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:405)
at java.net.ServerSocket.<init>(ServerSocket.java:170)
at java.net.ServerSocket.<init>(ServerSocket.java:82)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:30)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:312)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
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:125)
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)

What could be the cause and how I can solve this?
0
Comment
Question by:s_lavie
  • 4
  • 2
7 Comments
 
LVL 9

Expert Comment

by:Venci75
Comment Utility
probably you are trying to run a second instance of the RMI registry
0
 
LVL 2

Author Comment

by:s_lavie
Comment Utility
I'm afraid this is not the reason...
0
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
Comment Utility
There is an application that already uses the RMI registry default port (1099). If this is not another instance if the registry you can try to start your RMI registry on a different port:
rmiregistry 1111
where 1111 is the new port.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Author Comment

by:s_lavie
Comment Utility
It does run on another port, but how I can find which application uses port 1099.
My OS is win2000 - and I have no clue which application uses that port.
0
 
LVL 9

Expert Comment

by:Venci75
Comment Utility
I don't know how you can do this. But you can try to check whether it is not done by a service.
0
 
LVL 9

Expert Comment

by:Venci75
Comment Utility
... or may be another instance of the registry is started as a service
0
 

Expert Comment

by:rashidkamranbs
Comment Utility
Of course another process using the 1099 port.. in windows 200 ya can execute a command like

c:\netstat -a

it will list all the process with listening ports..

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now