6 Replies Latest reply on Apr 2, 2014 6:58 AM by ctomc

    Not able to start JBoss as service.

    lalitshaktawat

      Hi All

       

      I am trying to add JBoss as Service but it is showing error. Steps that I adopts was :

      1] I created Soft link by using below command on

               cd /etc/init.d

                ln -s /usr/share/JBoss_7.1.3_FINAL/jboss-as-7.1.3.Final/build/target/jboss-as-7.1.3.Final/bin/init.d/jboss-as-standalone.sh

      2] Now I checked for this link

               ls -l j*

                lrwxrwxrwx 1 root root 117 Apr  2 09:53 jboss-as-standalone.sh -> /usr/share/JBoss_7.1.3_FINAL/jboss-as-7.1.3.Final/build/target/jboss-as-7.1.3.Final/bin/init.d/jboss-as-standalone.sh

      3] It was correct.

      4] When I want to start it as a Service It is showing following errors :

                /etc/init.d/jboss-as-standalone.sh start

               /etc/init.d/jboss-as-standalone.sh: 12: .: Can't open /etc/init.d/functions

      Steps to solve it :

      I used

             ./etc/init.d/jboss-as-standalone.sh start

            -su: ./etc/init.d/jboss-as-standalone.sh: No such file or directory

       

      How to resolve this issue.

       

      Is there any steps is missing?

       

      Thanks in an advanced.

        • 1. Re: Not able to start JBoss as service.
          sfcoy

          Which Linux distro are you using?

           

          The script that you're using above is designed for a RHEL style distribution such as RHEL itself, CentOS or Fedora.

           

          Anything else will probably need script changes.

          • 2. Re: Not able to start JBoss as service.
            lalitshaktawat

            Hi Stephen

             

            I am using UBUNTU 12.04

             

            I am having CentOS also. But from the same procedure it is showing error.

            Usage: /etc/init.d/jboss-as-standalone.sh {start|stop|status|restart|reload}

            [root@localhost init.d]# /etc/init.d/jboss-as-standalone.sh start

            Starting jboss-as: chown: missing operand after `/var/run/jboss-as'

            Try `chown --help' for more information.

             

            On Both I am not able to solve this issue.

             

            guide me about this for both CentOS and Ubuntu also.

             

            What are the changes I have to do for Ubuntu and CentOS.

            I installed JBOSS AS PATH .. on Ubuntu

            /usr/share/JBoss_7.1.3_FINAL/jboss-as-7.1.3.Final/build/target/jboss-as-7.1.3.Final/bin/init.d

             

            JAVA :

            export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/jre

            export PATH=$PATH:$JAVA_HOME/bin

             

            Guide me I want to resolve this issue. I will not only help me it will help to other also.

             

            I am trying lots of time with different different method but did not get any solution...

             

            Thanks in an advanced.

            • 3. Re: Re: Not able to start JBoss as service.
              rhusar

              Not sure if helpful, but running WildFly 8 on Fedora 20 it is as trivial as:

               

              [rhusar@x220 ~]$ sudo yum install wildfly
              Loaded plugins: changelog, langpacks, refresh-packagekit
              Package wildfly-8.0.0-1.fc20.noarch already installed and latest version
              Nothing to do
              [rhusar@x220 ~]$ sudo service wildfly start
              Redirecting to /bin/systemctl start  wildfly.service
              [rhusar@x220 ~]$ curl localhost:8080
              ...
              <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
              <html>
              <head>
                  <title>Welcome to WildFly Application Server 8</title>
              ...
              
              • 4. Re: Not able to start JBoss as service.
                sfcoy

                Hi there,

                 

                You're on your own with Ubuntu.

                 

                With RHEL based environments you need to copy ..jboss-as-7.1.3.Final/bin/init.d/jboss-as.conf to /etc/jboss-as/ and edit it's values for your environment. You should also add your JBOSS_HOME and JAVA_HOME environment vars in this file.

                 

                You should be good to go after that.

                • 5. Re: Not able to start JBoss as service.
                  lalitshaktawat

                  Can you please tell me steps...

                  • 6. Re: Not able to start JBoss as service.
                    ctomc

                    We ship ubuntu scripts in WildFly 8, you could use those on 7.1 without much problems.