• OpenKM failed to start from script

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #40695  by hariharan.gopal
 
Hi,

I used this below script:
Code: Select all
#!/bin/sh
 
### BEGIN INIT INFO
# Provides:          jboss
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start and stop JBoss AS
# Description:       Enable JBoss AS service provided by daemon.
### END INIT INFO
 
ECHO=/bin/echo
TEST=/usr/bin/test
JBOSS_USER=openkm
JBOSS_IP=127.0.0.1
JBOSS_HOME=/home/openkm/jboss-4.2.3.GA
JBOSS_START_SCRIPT=$JBOSS_HOME/bin/run.sh
JBOSS_STOP_SCRIPT=$JBOSS_HOME/bin/shutdown.sh
 
$TEST -x $JBOSS_START_SCRIPT || exit 0
$TEST -x $JBOSS_STOP_SCRIPT || exit 0
 
start() {
    $ECHO -n "Starting JBoss"
    su - $JBOSS_USER -c "$JBOSS_START_SCRIPT -b $JBOSS_IP > /dev/null &"
    $ECHO "."
}
 
stop() {
    $ECHO -n "Stopping JBoss"
    su - $JBOSS_USER -c "$JBOSS_STOP_SCRIPT -s $JBOSS_IP > /dev/null &"
    while [ "$(ps -fu $JBOSS_USER | grep java | grep jboss | wc -l)" -gt "0" ]; do
        sleep 5; $ECHO -n "."
    done
    $ECHO "."
}
 
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        sleep 30
        start
        ;;
    *)
        $ECHO "Usage: jboss {start|stop|restart}"
        exit 1
esac
exit 0
Made it executable using:
Code: Select all
$ sudo chmod 755 /etc/init.d/jbossokm
$ sudo update-rc.d jbossokm defaults
But I am getting the below error:
Code: Select all
$ sudo service jbossokm status
Code: Select all
jbossokm.service - LSB: Start and stop JBoss AS
   Loaded: loaded (/etc/init.d/jbossokm)
   Active: failed (Result: exit-code) since Sat 2015-10-10 11:53:48 IST; 1min 32s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 628 ExecStart=/etc/init.d/jbossokm start (code=exited, status=203/EXEC)

Oct 10 11:53:48 BackUp systemd[1]: Starting LSB: Start and stop JBoss AS...
Oct 10 11:53:48 BackUp systemd[1]: jbossokm.service: control process exited, code=exited status=203
Oct 10 11:53:48 BackUp systemd[1]: Failed to start LSB: Start and stop JBoss AS.
Oct 10 11:53:48 BackUp systemd[1]: Unit jbossokm.service entered failed state.
Oct 10 11:53:48 BackUp systemd[1]: jbossokm.service failed.

So could you please guide me on this.

Thanks in Advance.
 #40717  by jllort
 
This is a very old OpenKM version and we consider as "deprecated" we encourage upgrading to lastest 6.3

The older wiki section about jboss service is http://wiki.openkm.com/index.php/Config ... ss_service which is your linux distro ? because not on all distributions is registered in same way a service.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.