How to Run WSO2 WSAS as a Unix Daemon

Question:How can I run WSO2 WSAS as a daemon service on my Unix system? I would like to be able to start/stop/restart my WSAS instance as follows:

Date: Mon, 29th Oct, 2007
Level: Introductory
Reads: 0 Comments: 0 | Login or register to post comments
Afkham Azeez
Dir
WSO2
afkham_azeez's picture

/etc/init.d wsas [start | stop | restart]

Answer:

Locate the daemon.sh script in the WSAS_HOME directory. Make sure that the daemon.sh file is executable;

cd $WSAS_HOME/bin
chmod +x daemon.sh

Make sure that all the files in WSAS_HOME/bin/native are executable

cd $WSAS_HOME/bin/native
chmod +x *

Now from WSAS_HOME/bin, you can run the daemon.sh as follows:

  1. './daemon.sh console' - Run WSAS in console mode. All output will appear on the current console
  2. './daemon.sh start' - Start WSAS. Now WSAS will run as a background process
  3. './daemon.sh stop' - Stop a WSAS process which was started using the above command
  4. './daemon.sh restart' - Restart the running WSAS instance

You could also create a symbolic link from the /etc/init.d/ directory to the WSAS daemon.sh script as follows:

cd /etc/init.d/
  ln -s $WSAS_HOME/bin/daemon.sh wsas

Now you can start, stop and restart WSAS as follows:

/etc/init.d wsas [start | stop | restart]

To automatically start WSAS as a daemon when the machine boots up, you can add WSAS to the default run level as follows

  1. Download and install chckconfig.
  2. run, chkconfig --add wsas
  3. To verify that WSAS has been added to the proper run levels; chkconfig --list
  4. edit the $WSO2WSAS_HOME/conf/wrapper.conf file and provide the absolute path to the java command as the value of the wrapper.java.command entry.
  5. Reboot your machine
  6. Check the $WSO2WSAS_HOME/logs/wrapper.log and $WSO2WSAS_HOME/logs/wso2wsas.log files to make sure that WSAS has been properly started
  7. Access the WSAS Console at http://localhost:9762/

 

Applies To

WSO2 WSAS 2.1 & higher versions

Unix, Linux, Sun Solaris, MAC OS X

More Information

Rest of the WSAS HOWTO Series

 

library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)