cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

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

Hello Team,

Hope you're doing good!

Below is the issue which am facing while starting the manage server. Please assist on this and let me know the way forward.

The scenario here is have assigned a port to the admin server in Oracle WebLogic and tried to start the Admin server and it was starting successfully, But when I tried to start the managed server it is throwing an error saying "Error: Exception thrown by the agent: java.rmi.server.ExportException: Port already in use: 9010; nested exception is: java.net.BindException: Address already in use".

Below is the configuration which has been be done at WebLogic level as suggested by SolarWinds Docs. The below arguments are added in "setDomainEnv.sh" file.

JAVA_OPTIONS="$JAVA_OPTIONS -Djava.rmi.server.hostname=**********************"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.port=9010"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.ssl=false"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.authenticate=false"

export JAVA_OPTIONS

Regards,

Naveen.

0 Kudos
3 Replies
Level 13

is your weblogic server using port 9010 when you access via a web browser? If so, then the JMX port needs to be set to a port that is currently isn't in use.

And you might want to check out this article too that outlines java monitoring

Understanding Java Remote JMX - Initial Setup/Config Overview

0 Kudos

Hello All,

We have Weblogic domain server with cluster(cluster_FFE) environment under which we have 2 managed servers running refer below screenshot.

pastedImage_0.png

Now we need to configure the SolarWinds monitoring for all this server by enabling the JMX port.

To do so we have added the below configuration in the setDomainEnv.sh

JAVA_OPTIONS="$JAVA_OPTIONS -Djava.rmi.server.hostname=xxx.xxx.xx.xxx"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.port=8686"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.ssl=false"

JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote.authenticate=false"

export JAVA_OPTIONS

Now when we started the WebLogic server using the command (nohup ./startWebLogic.sh  &), Admin server started successfully.

And when we try to start the managed server from the Weblogic AdminConsole, server state going to FAILED_NOT_RESTARTABLE state.

pastedImage_3.png

When we checked the logs for the same (Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8686; nested exception is:

        java.net.BindException: Address already in use)

pastedImage_5.png

This means that Admin server which was started before this managed server using the 8686 port. hence the managed server cannot use this port failed to start because of this.

Is there a way to enable the jmx for the all the server with the same port, kind of cluster level jmx enablement is the exact requirement for us.

Thanks in Advance.

Regards,

Naveen.

0 Kudos

It is a requirement of Java that each instance use it's own JMX port. They cannot be shared. So you'd have to make sure the remote JMX for each instance is unique.

0 Kudos