Naming Server
Jump to navigation
Jump to search
RmiRegistry
Problems
Port already in use
When you start rmiregistry
the following error can occur:
java.rmi.server.ExportException: Port already in use: 1099; nested exception is: java.net.BindException: Address already in use: JVM_Bind
You can check the usage of the ports on your machine:
netstat -a Proto Local Address Foreign Address State TCP L3AFY65:epmap L3AFY65:0 LISTENING TCP L3AFY65:microsoft-ds L3AFY65:0 LISTENING TCP L3AFY65:1099 L3AFY65:0 LISTENING ... ... ... ...
This can happen if RMI had accepted any clients in the last two minutes.
Don't restart your PC, just wait two minutes for all the TIME_WAIT states displayed by netstat -a
to disappear.
On Windows most common you have started once a registry, use Task Manager
to check for an entry containing rmiregistry
and kill that process.