3 Replies Latest reply on Oct 24, 2017 11:36 AM by chad.every

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

    naveen3340

      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.

        • Re: java.rmi.server.ExportException: Port already in use
          chad.every

          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

            • Re: java.rmi.server.ExportException: Port already in use
              naveen3340

              Hello All,

               

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

               

               

              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.

               

               

              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)

               

              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.