2 Replies Latest reply on Dec 18, 2002 10:15 PM by techmonkey

    failed to start catalina on port 80

    navjeetc

      I am trying to start catalina on port 80. To do this I edited jboss.jcml inb $JBOSS_DIST/jboss/conf/catalina folder
      and changed the port from 8080 to 80 as shown below:

      <!-- A HTTP Connector on port 8080 -->


      But now when I start jboss it throws the following exception:

      [INFO,Engine] HttpConnector Opening server socket on all host IP addresses
      [ERROR,EmbeddedCatalinaServiceSX] Stopped
      LifecycleException: null.open: java.net.BindException: Permission denied:80
      at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1130)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:962)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.startService(EmbeddedCatalinaServiceSX.java:185)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)


      I am using JBoss-2.4.6/Tomcat-4.0.3 bundle and Apache web server is no more running on port 80 as I stopped the service thru xinetd. And also when I telnet to localhost on port 80 it does not connect.

      Changing the port 8080 to other values like 8089 works.

      Does anybody know why this is happening ?

      --Navjeet

        • 1. Re: failed to start catalina on port 80
          navjeetc

          I was able to run catalina on port 80 by running JBOSS as root, but I had rather run as non-root user. Is there a way out ? I read in Catalina release notes RELEASE-NOTES-4.0-B7.txt saying:

          Connectors - Refactored the startup code so that Catalina can run on port 80
          (without being root) when started by JavaService or equivalent service
          managers.


          How can that be done on Redhat 7.3 ? Can I add a xinetd service ?

          --Navjeet

          • 2. Re: failed to start catalina on port 80
            techmonkey

            I had the same problem. I wanted to run JBoss as a non-root user for security reasons. I got an error trying to bind to port 80. So here is how I solved it (for Linux)

            I setup my JBoss to run on port 8080 as user JBoss.

            I changed Linux to redirect port 80 to port 8080, effectively bypassing the security restriction of non-root users binding to port 80.

            The redirect command is as follows:

            iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

            You will need to integrate this into whatever iptables commands you are already using.