Thanks Ross! Unfortunately I still have the same error. Although I can directly run galaxy via the command run.sh, the system service fails with the error I showed before. In other words this works as the galaxy user:./run.sh --restartThis does not work when I run it as root (or when root runs it as the machine starts up):service chapman-galaxy start
This is the init file which I slightly modified from the contrib directory (which now resides under /etc/init.d/). There must be some fundamental reason why running it as root does not work that I don't understand. I actually don't think it's this init script that is the problem because a vanilla install of Galaxy works fine using "system galaxy start" and when it is under init.d.#!/bin/bash# Author: James Casbon, 2009# Modified by Lee Katz 2013 for this specific system### BEGIN INIT INFO# Provides: chapman-galaxy# Required-Start: $network $local_fs $mysql# Required-Stop:# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Chapman-Galaxy### END INIT INFO. /lib/lsb/init-functions
USER="galaxy"GROUP="galaxy"DIR="/home/galaxy/bin/chapman-dist"PYTHON="/usr/bin/python"OPTS="-ES ./scripts/paster.py serve --log-file $DIR/galaxy.log universe_wsgi.ini"PIDFILE="/var/run/galaxy-chapman.pid"case "${1:-''}" in'start')log_daemon_msg "Starting Chapman-Galaxy"if start-stop-daemon --chuid $USER --group $GROUP --start --make-pidfile \--pidfile $PIDFILE --background --chdir $DIR --exec $PYTHON -- $OPTS; thenlog_end_msg 0elselog_end_msg 1fi;;'stop')log_daemon_msg "Stopping Chapman-Galaxy"if start-stop-daemon --stop --pidfile $PIDFILE; thenlog_end_msg 0elselog_end_msg 1fi;;'restart')# restart commands here$0 stop$0 start;;'status')if [ -f "$PIDFILE" ]; thenpid=`cat $PIDFILE`;log_daemon_msg "Chapman-galaxy pid is $pid"elselog_daemon_msg "Chapman-galaxy does not have a pid"fi;;*) # no parameter specifiedecho "Usage: $SELF start|stop|restart|reload|force-reload|status"exit 1;;esac--On Sat, Jun 15, 2013 at 12:38 AM, Ross <ross.lazarus@gmail.com> wrote:
My mistake - try(sudo) pip install pyamlThat's what the pip yaml repo is called...On Sat, Jun 15, 2013 at 11:38 AM, Ross <ross.lazarus@gmail.com> wrote:
Hi, Lee - the last line of that error dump might be worth thinking about.It seems clear enough. Your python interpreter seems unable to import a module called yamlPerhaps you need to (eg) dopip install yamlin the virtualenv (or sudo ... for the system one if not using a virtualenv) you're running your Galaxies with?I hope this helps.On Fri, Jun 14, 2013 at 11:52 PM, Lee Katz <lskatz@gmail.com> wrote:Hi, I am running into an error that I bet has a simple solution. I would appreciate any help. Thanks.I am running Brad Chapman's LIMS extension locally on Ubuntu 12. I also installed it as a service under /etc/init.d/chapman-galaxy using contrib/galaxy.debian-init . It works when I run it directly (./run.sh --reload)When I run a version of Galaxy without nglims as a service, there is no error.When I run a version of Galaxy with nglims, not as a service (run.sh), there is no error.However, when I run the same version of Galaxy with nglims as a service, there is an error. I don't understand well enough what the difference is when I run it as a service to diagnose this problem. The lines leading to the error from the log file is below. Something to do with yaml not being loaded, but I know I installed python-yaml through aptitude.galaxy.web.framework.base DEBUG 2013-06-14 09:46:26,873 Enabling 'requests' controller, class: Requestsgalaxy.webapps.galaxy.controllers library_common galaxy.webapps.galaxy.controllers.library_commongalaxy.web.framework.base DEBUG 2013-06-14 09:46:26,874 Enabling 'library_common' controller, class: LibraryCommongalaxy.webapps.galaxy.controllers nglims galaxy.webapps.galaxy.controllers.nglimsTraceback (most recent call last):File "./scripts/paster.py", line 34, in <module>command.run()File "/home/galaxy/bin/chapman-dist/eggs/PasteScript-1.7.3-py2.7.egg/paste/script/command.py", line 84, in runinvoke(command, command_name, options, args[1:])File "/home/galaxy/bin/chapman-dist/eggs/PasteScript-1.7.3-py2.7.egg/paste/script/command.py", line 123, in invokeexit_code = runner.run(args)File "/home/galaxy/bin/chapman-dist/eggs/PasteScript-1.7.3-py2.7.egg/paste/script/command.py", line 218, in runresult = self.command()File "/home/galaxy/bin/chapman-dist/eggs/PasteScript-1.7.3-py2.7.egg/paste/script/serve.py", line 276, in commandrelative_to=base, global_conf=vars)File "/home/galaxy/bin/chapman-dist/eggs/PasteScript-1.7.3-py2.7.egg/paste/script/serve.py", line 313, in loadapp**kw)File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/loadwsgi.py", line 204, in loadappreturn loadobj(APP, uri, name=name, **kw)File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/loadwsgi.py", line 225, in loadobjreturn context.create()File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/loadwsgi.py", line 625, in createreturn self.object_type.invoke(self)File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/loadwsgi.py", line 188, in invokefiltered = context.next_context.create()File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/loadwsgi.py", line 625, in createreturn self.object_type.invoke(self)File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/loadwsgi.py", line 110, in invokereturn fix_call(context.object, context.global_conf, **context.local_conf)File "/home/galaxy/bin/chapman-dist/eggs/PasteDeploy-1.3.3-py2.7.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_callval = callable(*args, **kw)File "/home/galaxy/bin/chapman-dist/lib/galaxy/webapps/galaxy/buildapp.py", line 44, in app_factorywebapp.add_ui_controllers( 'galaxy.webapps.galaxy.controllers', app )File "/home/galaxy/bin/chapman-dist/lib/galaxy/web/framework/__init__.py", line 274, in add_ui_controllersmodule = import_module( module_name )File "/home/galaxy/bin/chapman-dist/lib/galaxy/util/backports/importlib/__init__.py", line 37, in import_module__import__(name)File "/home/galaxy/bin/chapman-dist/lib/galaxy/webapps/galaxy/controllers/nglims.py", line 24, in <module>import yamlImportError: No module named yaml
Lee Katz, Ph.D.