From: Demian K. <dem...@vi...> - 2014-06-10 12:57:09
|
Those /dev/tty problems may be interfering. I think you can solve these by setting the JETTY_CONSOLE variable… e.g.: export JETTY_CONSOLE=/dev/null - Demian From: Osullivan L. [mailto:l.o...@sw...] Sent: Tuesday, June 10, 2014 5:35 AM To: vuf...@li... Subject: [VuFind-Tech] Starting / Stopping VuFind on Sever Start Up / Shutdown Hi Folks, I'm having a few problems with the automated start up and shutdown of VuFind on Ubuntu and was hoping someone may be able to spot any problems with my init script. #!/bin/sh ### BEGIN INIT INFO # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: VuFind init script ### END INIT INFO U=`id -nu` if [ $U != "root" ]; then echo "Script must be run from root. You are '$U'" exit 1 fi su -l cronfa -c "cd /usr/local/cronfa;./vufind.sh $* >> /var/log/cronfa/rc.log 2>&1" The init script works in that it calls start and stop routines are called and outputted to the rc.log file: Shutting down VuFind ... ./vufind.sh: 450: ./vufind.sh: cannot create /dev/tty: No such device or address Starting VuFind ... ./vufind.sh: 436: ./vufind.sh: cannot create /dev/tty: No such device or address /usr/lib/jvm/default-java/bin/java -server -d64 -Xms1024m -Xmx1024m -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+AggressiveOpts -XX:NewRatio=5 -Xloggc:/var/log/cronfa/gc.log -Dsolr.solr.home=/usr/local/cronfa/solr -Djetty.logs=/usr/local/cronfa/solr/jetty/logs -Djetty.home=/usr/local/cronfa/solr/jetty -jar /usr/local/cronfa/solr/jetty/start.jar /usr/local/cronfa/solr/jetty/etc/jetty.xml VuFind running pid=928 sh: 1: cannot create /dev/tty: No such device or address However, when I restart the server, the Java process isn't actually running. I think it may being called to early / late because vufind.sh complains about /dev/tty not being available. At first, I thought the pid file wasn't being removed but it seems that although the script is reporting VuFind is running, sudo ps -e | grep "java" reveals that a java instance hasn't been started. Any help would be gratefully received! Thanks, Luke |