3 Replies Latest reply on Aug 7, 2003 6:16 AM by binary_runner

    How do I run JBoss 3.2.1 as a non-root user on Linux?

    da_alchemist Newbie

      I am currently trying to get JBoss 3.2.1 with Tomcat 4.1.24 running on Linux and I am having problems. It starts fine as user "root" when I use:

      [root]# $JBOSS_HOME/bin/run.sh -c default

      I am able to go to the jmx-console (http://myhost:8080/jmx-console) with no problems. But, when I try to startup JBoss as a non-root user, like "jboss", on Red Hat Linux 7.3 I get all sorts of errors using the exact same command as above. And no, it is not a permissions problem. I have changed the ownership of the entire JBoss distribution to the user "jboss" and it still does not work. My JAVA_HOME is set correctly. How do I fix this?

      TIA.

      The error returned when accessing the jmx-console is:

      *******************************************

      org.apache.jasper.JasperException: Unable to compile class for JSP

      An error occurred at line: -1 in the jsp file: null

      Generated servlet error:
      [javac] Compiling 1 source file



      at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
      at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
      at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
      ...
      *******************************************

        • 1. Re: How do I run JBoss 3.2.1 as a non-root user on Linux?
          Jon Barnett Master

          It is probably still a permissions problem. Tomcat needs to compile your JSPs and it will do this in a temporary directory. In a standalone Tomcat, it will be in a work directory under the Tomcat distribution. But in an embedded instance, I think it will use the /tmp directory. Someone can correct me here as I don't have a captive JBoss-Tomcat Linux install.

          In any case, look for JSP files that have been transformed into Java source code and the related classes and that will be where your compilations are going.

          For example, if you have a JSP called allocatecosts.jsp, Tomcat/Jasper will be looking to translate it into allocatecosts_jsp.java and compile it into allocatecosts_jsp.class. Jasper is probably complaining that it couldn't write the Java source because it can't overwrite the root-owned instance.

          • 2. Re: How do I run JBoss 3.2.1 as a non-root user on Linux?
            da_alchemist Newbie

            Thanks. Turns out that the RPM I built for installation had two problems and one of them was not setting the ownership on the $JBOSS_HOME/bin directory to "jboss".

            Thanks for the assistance.

            • 3. Re: How do I run JBoss 3.2.1 as a non-root user on Linux?
              binary_runner Newbie

              I had some difficulties with JBoss as non-root user too. It did not run and produced strange error msg and core dump. Using strace I've found VM tries to look at /etc/proc. Adding user "jboss" to group "proc" solved the problem. Hope it helps somebody.