5 Replies Latest reply on Nov 22, 2002 12:23 PM by Trish Hartnett

    Changing Default Ports on JBoss

    Robert Brown III Newbie

      Greetings:

      I am running JBoss 3.04 with the Tomcat Bundle on a Linux machine. I am also running other servers which are using ports 8080, 8082, and 1099.

      I would like to change JBoss so that it uses other ports -- like changing its default port from 8080 to 9001, changing its management port fron 8082 to 9003, and changing the naming service port from 1099 to (maybe) 9004.

      Could someone please tell me how to do this? Thank you.

      -Robert

        • 1. Re: Changing Default Ports on JBoss
          Martijn Lindhout Newbie

          For tomcat, open the server.xml in the TOMCAT_DIR\conf dir. Search for CoyoteConnector and change the HTTP port.

          JBoss specific services are configured in the JBOSS_DIST\server\<conf-set>\conf dir. For example, the naming service (default 1099) is configured in the jboss-service.xml. You can change that port. I'm not very sure if some ports are referenced from other config files.

          Note: <conf-set> is one of you server configurations. JBoss comes with all, default and minimal.

          • 2. Re: Changing Default Ports on JBoss
            Robert Brown III Newbie

            Greetings:

            First, thanks to mlindhout for attempting to help me. Unfortunately, your information concerning Tomcat is inaccurate. I attempted changing the entry in server.xml as suggested, but Jboss continued to use port 8080.

            After looking over other (inaccurate) information about this subject in this forum, and searching through the Jboss distribution, I discovered a file called tomcat41-service.xml in the deploy directory under server/default. In this file is an entry called "Connector" which points to port 8080. Changing the port in this entry appears to cause Tomcat to change ports when Jboss is run.

            I do, however, have one more problem: though Jboss now receives HTTP requests on a different port, the shutdown.sh script still seems to think Jboss is using port 8080. Does anyone know how to update the shutdown script so that it uses the correct port?

            Thanks in advance for any advice.

            -Robert

            • 3. Re: Changing Default Ports on JBoss
              Martijn Lindhout Newbie

              I tried your suggestion of modifying tomcat41-service.xml to port 81. This works, thanx.

              I stopped jboss as follows: shutdown localhost 81.

              Greetz,

              • 4. Re: Changing Default Ports on JBoss
                Robert Brown III Newbie

                Your shutdown sequence works for me, too.

                Thanks.

                -Robert

                • 5. Re: Changing Default Ports on JBoss
                  Trish Hartnett Newbie

                  How do you change the default port for Jetty ?
                  I'm trying to use Oracle 9i with JBoss. I got this error message when I started JBoss:
                  "2002-11-22 14:13:16,506 ERROR [org.jboss.jetty.JettyService] multiple exceptions...
                  2002-11-22 14:13:16,506 ERROR [org.jboss.jetty.JettyService] exception
                  java.net.BindException: Address already in use: JVM_Bind
                  at java.net.PlainSocketImpl.socketBind(Native Method)
                  at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
                  at java.net.ServerSocket.bind(ServerSocket.java:308)
                  at java.net.ServerSocket.bind(ServerSocket.java:266)
                  at java.net.ServerSocket.(ServerSocket.java:182)"

                  Thanks,
                  Trish.