10 Replies Latest reply on Jul 17, 2014 3:52 PM by motoenth

    how to run jboss 7 on linux cmd line

    kblurry

      I keep getting "permission denied" when i try to start standalone.sh on the jboss directory which i placed in usr/lib. I am logged in as root.

      Anyone have any thoughts?

        • 1. Re: how to run jboss 7 on linux cmd line
          jbertram

          Can you provide the output of the "ls -al" command from the <JBOSS_HOME>/bin directory?

          • 2. Re: how to run jboss 7 on linux cmd line
            kblurry

            here is the output justin

             

            total 104

            drwxr-xr-x  4 root root 4096 Mar  1 09:23 .

            drwxr-xr-x 10 root root 4096 Mar  1 09:29 ..

            -rw-r--r--  1 root root 1627 Dec 23 16:19 add-user.bat

            -rw-r--r--  1 root root 1769 Dec 23 16:19 add-user.sh

            -rw-r--r--  1 root root 2342 Dec 23 16:19 appclient.bat

            -rw-r--r--  1 root root 1941 Dec 23 16:19 appclient.conf

            -rw-r--r--  1 root root 2666 Dec 23 16:19 appclient.conf.bat

            -rw-r--r--  1 root root 3428 Dec 23 16:19 appclient.sh

            -rw-r--r--  1 root root 2911 Dec 23 16:19 domain.bat

            -rw-r--r--  1 root root 2577 Dec 23 16:19 domain.conf

            -rw-r--r--  1 root root 3244 Dec 23 16:19 domain.conf.bat

            -rw-r--r--  1 root root 6244 Dec 23 16:19 domain.sh

            drwxr-xr-x  2 root root 4096 Mar  1 09:23 init.d

            -rw-r--r--  1 root root 1375 Dec 23 16:19 jboss-admin.bat

            -rw-r--r--  1 root root 1413 Dec 23 16:19 jboss-admin.sh

            -rw-r--r--  1 root root 2736 Feb 27 15:16 standalone.bat

            -rw-r--r--  1 root root 2058 Dec 23 16:19 standalone.conf

            -rw-r--r--  1 root root 2694 Dec 23 16:19 standalone.conf.bat

            -rw-r--r--  1 root root 5758 Dec 23 16:19 standalone.sh

            -rw-r--r--  1 root root    0 Feb 29 10:57 transaction.log

            drwxr-xr-x  2 root root 4096 Mar  1 09:23 util

            -rw-r--r--  1 root root  851 Dec 23 16:19 wsconsume.bat

            -rw-r--r--  1 root root 2016 Dec 23 16:19 wsconsume.sh

            -rw-r--r--  1 root root  790 Dec 23 16:19 wsprovide.bat

            -rw-r--r--  1 root root 1838 Dec 23 16:19 wsprovide.sh

            [root@MDJBoss01 bin]# total 104

            drwxr-xr-x  4 root root 4096 Mar  1 09:23 .

            drwxr-xr-x 10 root root 4096 Mar  1 09:29 ..

            -rw-r--r--  1 root root 1627 Dec 23 16:19 add-user.bat

            -bash: total: command not found

            [root@MDJBoss01 bin]# drwxr-xr-x  4 root root 4096 Mar  1 09:23 .

            -bash: drwxr-xr-x: command not found

            [root@MDJBoss01 bin]# drwxr-xr-x 10 root root 4096 Mar  1 09:29 ..

            -rw-r--r--  1 root root 2342 Dec 23 16:19 appclient.bat

            -bash: drwxr-xr-x: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 1627 Dec 23 16:19 add-user.bat

            -rw-r--r--  1 root root 1941 Dec 23 16:19 appclient.conf

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 1769 Dec 23 16:19 add-user.sh

            -bash: -rw-r--r--: command not found

            -rw-r--r--  1 root root 2666 Dec 23 16:19 appclient.conf.bat

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2342 Dec 23 16:19 appclient.bat

            -bash: -rw-r--r--: command not found

            -rw-r--r--  1 root root 3428 Dec 23 16:19 appclient.sh

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 1941 Dec 23 16:19 appclient.conf

            -rw-r--r--  1 root root 2911 Dec 23 16:19 domain.bat

            -rw-r--r--  1 root root 2577 Dec 23 16:19 domain.conf

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2666 Dec 23 16:19 appclient.conf.bat

            -bash: -rw-r--r--: command not found

            -rw-r--r--  1 root root 3244 Dec 23 16:19 domain.conf.bat

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 3428 Dec 23 16:19 appclient.sh

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2911 Dec 23 16:19 domain.bat

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2577 Dec 23 16:19 domain.conf

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 3244 Dec 23 16:19 domain.conf.bat

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 6244 Dec 23 16:19 domain.sh

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# drwxr-xr-x  2 root root 4096 Mar  1 09:23 init.d

            -rw-r--r--  1 root root 1375 Dec 23 16:19 jboss-admin.bat

            -bash: drwxr-xr-x: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 1375 Dec 23 16:19 jboss-admin.bat

            -rw-r--r--  1 root root 1413 Dec 23 16:19 jboss-admin.sh

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 1413 Dec 23 16:19 jboss-admin.sh

            -rw-r--r--  1 root root 2736 Feb 27 15:16 standalone.bat

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2736 Feb 27 15:16 standalone.bat

            -bash: -rw-r--r--: command not found

            -rw-r--r--  1 root root 2058 Dec 23 16:19 standalone.conf

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2058 Dec 23 16:19 standalone.conf

            -rw-r--r--  1 root root 2694 Dec 23 16:19 standalone.conf.bat

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2694 Dec 23 16:19 standalone.conf.bat

            -rw-r--r--  1 root root 5758 Dec 23 16:19 standalone.sh

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 5758 Dec 23 16:19 standalone.sh

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root    0 Feb 29 10:57 transaction.log

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# drwxr-xr-x  2 root root 4096 Mar  1 09:23 util

            -bash: drwxr-xr-x: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root  851 Dec 23 16:19 wsconsume.bat

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 2016 Dec 23 16:19 wsconsume.sh

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root  790 Dec 23 16:19 wsprovide.bat

            -bash: -rw-r--r--: command not found

            [root@MDJBoss01 bin]# -rw-r--r--  1 root root 1838 Dec 23 16:19 wsprovide.sh

            -bash: -rw-r--r--: command not found

            • 3. Re: how to run jboss 7 on linux cmd line
              jbertram

              Your standalone.sh is not executable which is why you get "Permission denied."  Use this command to make it executable:

               

                chmod +x standalone.sh

               

              Let me know how it goes.

              • 4. Re: how to run jboss 7 on linux cmd line
                kblurry

                okay i tried that and it shows this:

                 

                [root@MDJBoss01 jboss-as-7.1.0.CR1b]# bin/standalone.sh

                =========================================================================

                 

                  JBoss Bootstrap Environment

                 

                  JBOSS_HOME: /usr/lib/jboss

                 

                  JAVA: /usr/java/jre/bin/java

                 

                  JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

                 

                =========================================================================

                 

                Invalid option '-mbeanserverbuildermodule'

                Usage: java [-jvmoptions...] -jar jboss-modules.jar [-options...] <module-spec> [args...]

                       java [-jvmoptions...] -jar jboss-modules.jar [-options...] -jar <jar-name> [args...]

                       java [-jvmoptions...] -jar jboss-modules.jar [-options...] -cp <class-path> <class-name> [args...]

                       java [-jvmoptions...] -jar jboss-modules.jar [-options...] -class <class-name> [args...]

                where <module-spec> is a valid module specification string

                and options include:

                    -help         Display this message

                    -modulepath <search path of directories>

                    -mp <search path of directories>

                                  A list of directories, separated by ':', where modules may be located

                                  If not specified, the value of the "module.path" system property is used

                    -class        Specify that the final argument is a

                                  class to load from the class path; not compatible with -jar

                    -cp,-classpath <search path of archives or directories>

                                  A search path for class files; implies -class

                    -dep,-dependencies <module-spec>[,<module-spec>,...]

                                  A list of module dependencies to add to the class path;

                                  requires -class or -cp

                    -jar          Specify that the final argument is the name of a

                                  JAR file to run as a module; not compatible with -class

                    -config <config-location>

                                  The location of the module configuration.  Either -mp or -config

                                  may be specified, but not both

                    -logmodule <module-name>

                                  The module to use to load the system logmanager

                    -jaxpmodule <module-name>

                                  The default JAXP implementation to use of the JDK

                    -version      Print version and exit

                 

                [root@MDJBoss01 jboss-as-7.1.0.CR1b]#

                 

                I have two jboss instance running by the way. I'm trying to run the one that points to usr/lib/jboss-as-7.1.0.CR1b. but the above output shows jboss dir as

                 

                  JBOSS_HOME: /usr/lib/jboss?

                • 5. Re: how to run jboss 7 on linux cmd line
                  jbertram

                  Looks like at least part of the problem now is:

                   

                    Invalid option '-mbeanserverbuildermodule'

                   

                  Do you know where this is coming from?

                   

                  Also, I see you are using 7.1.0.CR1b.  You should really move to 7.1.0.Final as it contains numerous fixes.

                  • 6. Re: how to run jboss 7 on linux cmd line
                    kblurry

                    okay i downloaded the 7.1.0.Final and the error went away. but now it shows this:

                     

                    [root@MDJBoss01 jboss-as-7.1.0.Final]# bin/standalone.sh

                    WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.

                     

                    =========================================================================

                     

                      JBoss Bootstrap Environment

                     

                      JBOSS_HOME: /usr/lib/jboss

                     

                      JAVA: /usr/java/jre/bin/java

                     

                      JAVA_OPTS:  -server -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml

                     

                    =========================================================================

                     

                    Exception in thread "main" java.lang.ExceptionInInitializerError

                            at org.jboss.as.server.Main.main(Main.java:85)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.modules.Module.run(Module.java:272)

                            at org.jboss.modules.Main.main(Main.java:313)

                    Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")

                            at org.jboss.logmanager.Logger.getLogger(Logger.java:60)

                            at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)

                            ... 7 more

                    [root@MDJBoss01 jboss-as-7.1.0.Final]# WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.

                     

                     

                    It's not pointing to the right jboss directory i assume(i have to jboss instances). Can i point the standalone.sh to run the one that is in usr/lib/jboss-as-7.1.0.Final

                    • 7. Re: how to run jboss 7 on linux cmd line
                      jbertram

                      Try executing this before you run standalone.sh:

                       

                        export JBOSS_HOME=/usr/lib/jboss-as-7.1.0.Final

                      • 8. Re: how to run jboss 7 on linux cmd line
                        kblurry

                        Ok! It deployed. This may sound stupid but where can i find the port that it links to cause i tried 127.14.80.988:8080/project which was running the other jboss and it wasnt there

                        • 9. Re: how to run jboss 7 on linux cmd line
                          kblurry

                          thanks a lot justin. i had to put -b then <ipaddress> and boom. Thanks again!

                          • 10. Re: how to run jboss 7 on linux cmd line
                            motoenth

                            THANK YOU!!