Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 38

Thread: Install jboss as daemon (autostart at boot)

  1. #21
    Join Date
    Jul 2006
    Location
    Sweden
    Beans
    52
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Install jboss as daemon (autostart at boot)

    m2000

    Try to move jboss to start later in the boot sequence. Since the script works when you start it manually later. Maybe something that jboss is dependent on hasn't been started yet (the network maybe?).

  2. #22
    Join Date
    May 2009
    Beans
    3

    Re: Install jboss as daemon (autostart at boot)

    Quote Originally Posted by CuBone View Post
    m2000

    Try to move jboss to start later in the boot sequence. Since the script works when you start it manually later. Maybe something that jboss is dependent on hasn't been started yet (the network maybe?).

    Ok, this seems to be the root of the problem.

    I defined the jboss to start in run level 3. The system stayed in run level 2 although I log in and network and gui works ok (I have Ubuntu server with Gnome installed).

    If I force level 3 (sudo init 3) jboss starts normally.

    I'm new to Linux and now confused again. Why didn't the system reach run level 3?

    Thanks,
    m2000

  3. #23
    Join Date
    Jul 2006
    Location
    Sweden
    Beans
    52
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Install jboss as daemon (autostart at boot)

    You shouldn't change the runlevel for it. Just make sure it starts later in the boot sequence

  4. #24
    Join Date
    Jun 2007
    Beans
    88

    Re: Install jboss as daemon (autostart at boot)

    See also: Installing JBoss Server on Ubuntu. It covers more recent versions of Ubuntu (8.10) and also JDK 6.
    Last edited by needhelpplease; July 17th, 2009 at 09:17 PM.

  5. #25
    Join Date
    Aug 2009
    Beans
    1

    Re: Install jboss as daemon (autostart at boot)

    Hi all,
    I am a linux newbie and i couldn't get the jboss run.
    I did everything described here also read some other post on internet. The problem is that jboss don't run even if i type:
    Code:
    /etc/init.d/jboss start
    this doesnt give any error but jboss doesn't start either. when i say:
    Code:
    /etc/init.d/jboss stop
    it says there is no jbossas currently running so system recognizes the file..
    Can someone help me?

    Thanks

  6. #26
    Join Date
    Sep 2009
    Beans
    1

    Re: Install jboss as daemon (autostart at boot)

    Hi all -

    I also am having trouble getting JBoss (4.2.3) started via an init script on Ubuntu 9.04.

    I presume this is because the tutorial above is targeted at Ubuntu 8.10. Does anyone know if a revised version of the init script has been produced?

    Thanks -

  7. #27
    Join Date
    Sep 2009
    Beans
    4
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Install jboss as daemon (autostart at boot)

    Hi all

    Seems like I've encountered a similar problem. I've tried to adapt the instructions to my environment but in the end there's never any reaction on port 80 or 8080.

    Trying to start the daemon by hand results in the following line:
    Code:
    user@ubuntu904desktop:/opt/jboss$ sudo /etc/init.d/jboss start
    JBOSS_CMD_START = cd /opt/jboss/bin; /opt/jboss/bin/run.sh -c default -b 0.0.0.0
    I'm trying to install Jboss (and later on Jboss Seam) in a virtual machine running a current Ubuntu 9.04 with the java-6-sun-1.6.0.16 installed from the repository.

    The archive has been unpacked to /opt and given a symbolic link for easier maintenance.
    Code:
    user@ubuntu904desktop:/opt$ ls -lach
    total 16K
    drwxr-xr-x  4 user  user  4.0K 2009-09-27 03:50 .
    drwxr-xr-x 21 root  root  4.0K 2009-09-27 04:14 ..
    lrwxrwxrwx  1 root  root    14 2009-09-27 03:48 jboss -> jboss-5.1.0.GA
    drwxr-xr-x  9 jboss jboss 4.0K 2009-09-27 05:50 jboss-5.1.0.GA
    lrwxrwxrwx  1 root  root    19 2009-09-27 03:48 jboss-seam -> jboss-seam-2.2.0.GA
    drwxr-xr-x 11 jboss jboss 4.0K 2009-09-27 05:09 jboss-seam-2.2.0.GA
    My only changes to the start script are the following lines:
    Code:
    JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss"}
    JBOSS_USER=${JBOSS_USER:-"jboss"}
    JAVAPTH=${JAVAPTH:-"/usr/bin"}
    JBOSS_BIND_ADDR=${JBOSS_HOST:-"-b 0.0.0.0"}
    Here's an excerpt from the current /etc/init.d/jboss file:
    Code:
    #define where jboss is - this is the directory containing directories log, bin, conf etc
    JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss"}
    
    #define the user under which jboss will run, or use 'RUNASIS' to run as the current user
    JBOSS_USER=${JBOSS_USER:-"jboss"}
    
    #make sure java is in your path
    JAVAPTH=${JAVAPTH:-"/usr/bin"}
    
    #configuration to use, usually one of 'minimal', 'default', 'all'
    JBOSS_CONF=${JBOSS_CONF:-"default"}
    
    #if JBOSS_HOST specified, use -b to bind jboss services to that address
    JBOSS_BIND_ADDR=${JBOSS_HOST:-"-b 0.0.0.0"}
    
    #define the classpath for the shutdown class
    JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}
    
    #define the script to use to start jboss
    JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF $JBOSS_BIND_ADDR"}
    
    if [ "$JBOSS_USER" = "RUNASIS" ]; then
    SUBIT=""
    else
    SUBIT="su - $JBOSS_USER -c "
    fi
    
    if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then
    # ensure the file exists
    touch $JBOSS_CONSOLE
    if [ ! -z "$SUBIT" ]; then
    chown $JBOSS_USER $JBOSS_CONSOLE
    fi
    fi
    
    if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then
    echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
    echo "WARNING: ignoring it and using /dev/null"
    JBOSS_CONSOLE="/dev/null"
    fi
    
    #define what will be done with the console log
    #JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
    JBOSS_CONSOLE=${JBOSS_CONSOLE:-"$JBOSS_HOME/log/console.log"}
    
    JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
    JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JAVAPTH/java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"}
    
    if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
    export PATH=$PATH:$JAVAPTH
    fi
    
    if [ ! -d "$JBOSS_HOME" ]; then
    echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
    exit 1
    fi
    
    echo JBOSS_CMD_START = $JBOSS_CMD_START
    
    case "$1" in
    start)
    cd $JBOSS_HOME/bin
    if [ -z "$SUBIT" ]; then
    eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
    else
    $SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
    fi
    ;;
    stop)
    if [ -z "$SUBIT" ]; then
    $JBOSS_CMD_STOP
    else
    $SUBIT "$JBOSS_CMD_STOP"
    fi
    ;;
    restart)
    $0 stop
    $0 start
    ;;
    *)
    echo "usage: $0 (start|stop|restart|help)"
    esac
    As you can imagine, any help in the right direction would be greatly appreciated.
    Thanks in advance for your opinion.


    -----------------------------------------------------------------------------



    Addendum:

    Managed to find the source of one of my problems but there's still a catch.

    Out of curiosity I started it directly using the run.sh file and found out that some of the Java during the init was complaining about a port being in use.

    A quick Google search turned up the following result: http://www.lamscommunity.org/dotlrn/...sage_id=508530
    And the 5th entry in that thread contains the solution:
    If you are using linux, see if another instance is running (ps -ef|grep java). If it is JBoss, stop it by running /path-to-jboss/bin/shutdown.sh -S Once you are sure that Jboss or tomcat is running, then restart JBoss and you start up properly.
    Thanks,
    Ernie
    A quick lookup using ps -ef|grep java showed that VMware Server 2 (the one with that annoying web interface) and Apache were still running.
    Told them to annoy someone else (read: stopped the services using sudo /etc.init.d/vmware stop and so on) and JBoss didn't complain anymore (or so I thought).

    Starting it using the run.sh works just fine (JBoss AS page shows up on localhost:8080) but using the modified Red Hat script only results in some serious CPU load without any reply from port 8080.


    -----------------------------------------------------------------------------



    Addendum 2:
    I'm not sure why but after making the following change the init script starts up the server and I get a sign of life from port 8080:
    Code:
    #define what will be done with the console log
    #JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
    JBOSS_CONSOLE=${JBOSS_CONSOLE:-"$JBOSS_HOME/log/console.log"}
    I've also attached an example of the log output since there are still errors but at least it seems to react again.
    Attached Files Attached Files
    Last edited by MikeZ83; September 28th, 2009 at 01:17 PM.

  8. #28
    Join Date
    Oct 2009
    Beans
    1

    Re: Install jboss as daemon (autostart at boot)

    abhishek@abhishek-laptop:~$ sudo /etc/init.d/jboss start
    [sudo] password for abhishek:
    JBOSS_CMD_START = cd /home/jboss/jboss-5.1.0.GA/bin; /home/jboss/jboss-5.1.0.GA/bin/run.sh -c default -b 0.0.0.0

    I got the message like above.
    Even in eclipse, its not working....
    I'm even unable to change the port number..
    Plzzzz do help me....

  9. #29
    Join Date
    Apr 2007
    Beans
    33

    Re: Install jboss as daemon (autostart at boot)

    I've created a fairly robust init script for JBoss here: https://jira.jboss.org/jira/browse/JBPAPP-3194

    The /etc/init.d/jboss script doesn't need editing, all configuration is done in /etc/default/jboss

    All feedback is welcome.

  10. #30
    Join Date
    Dec 2009
    Beans
    1

    Re: Install jboss as daemon (autostart at boot)

    Refering to the post #16

    I have the same problem. Did you get a solution?
    Last edited by adrianodfo; December 16th, 2009 at 11:31 AM. Reason: I have replied to the post 16, but no references to the post was linked.

Page 3 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •