/srv/irclogs.ubuntu.com/2012/11/14/#upstart.txt

jamescarr%16:49
jamescarrhey guys, I'm having some problems getting the following init script to run: https://gist.github.com/b23e5c2469400d1ca9a416:51
jamescarrany guidance?16:51
jamescarrwhen I run the exec command manually, it works16:51
SpamapSjamescarr: first off, 'shutdown' is not an event, so this will never be stopped16:52
SpamapSjamescarr: other than that it looks somewhat normal. hm16:53
SpamapSjamescarr: here's how I would write that job tho16:55
SpamapSjamescarr: http://paste.ubuntu.com/1358381/16:56
jamescarrSpamapS: thanks16:58
jamescarrSpamapS: still exits with a status of 1 :(16:59
jamescarrConfused... I've set these up tons of times before16:59
jamescarrwhen I copy the exec command and run it, it works17:00
jamescarrwhat could I be missing?17:00
SpamapSjamescarr: what version of upstart? if its 1.4 or later, you'll have a log in /var/log/upstart/$jobname.log17:01
jamescarrfrak17:01
jamescarrI got it17:01
jamescarrdammit!17:01
SpamapSjamescarr: you forgot to hook up the doll?17:01
jamescarrownership is off17:01
jamescarrstill shouldn't make a difference, let me check on that17:02
jamescarrnot it, still failing17:03
jamescarrupstart --help17:03
jamescarrversion 0.6.5 of upstart17:03
SpamapSah ok that one you'll need to pipe to logger or something17:04
jamescarradvice on that?17:04
jamescarr%17:05
SpamapSjust add 2>&1 | logger -t foo  to the exec line17:05
jamescarrNov 14 11:05:56 ultipro-api ultiproapi: sudo: sorry, you must have a tty to run sudo  :-D17:06
SpamapSAHa17:07
SpamapSjamescarr: http://upstart.ubuntu.com/cookbook/#changing-user17:08
SpamapSjamescarr: read that, it may help17:08
jamescarrSpamapS: thanks, got it running17:18
SpamapSjamescarr: cool17:18
jamescarrno longer writes to log, but I think that is a separate issue 17:22
jamescarrI mean, no longer writes to my app log17:22
jamescarrSpamapS: is there something I might have off with this? 17:24
jamescarrexec su -s /bin/sh -c "/usr/local/bin/bundle exec /usr/local/bin/ruby token_service.rb >> /home/ultipro/ultipro-api/shared/log/token_refresh.log 2>&1" ultipro 17:24
jamescarrI expected >> /home/ultipro/ultipro-api/shared/log/token_refresh.log 2>&1 to populate the log17:25
jamescarrwith STDOUT from the ruby script17:25
jamescarrit used to do it when running as sudo17:30
jMCgSomething seems off: we just did a reload (multiple times, actually) on upstart 1.5 of a tomcat process, and it seems to have restarted it instead18:16
jMCgWhich is bad, because that means 45 sec downtime (each time) and cutting off of online user sessions18:17
jMCgfalse alarm.18:25
jMCgJVM sends shutdown hooks when it receives SIGHUP, which I consider to be exceptionally inane.18:25
SpamapSjMCg: reload sends SIGHUP. If tomcat restarts on HUP, thats why20:05
SpamapSjMCg: oh, and now I read your false alarm, so disregard ;)20:06
simenseni'm having a really horrible time with upstart today. :(22:42
simenseni always seem to struggle with it. debugging on a remote system is very painful. i'm getting "[  783.498605] init: uploader-gunicorn main process (1650) terminated with status 1" and that is about as much info as I can get about what is wrong.22:42
simensenall attempts i've made to try and get something to output to a file have failed. i have yet to get anything to write to anything in /tmp/22:43
simensenuploader@precise64:~$ sudo start uploader-gunicorn22:43
simensenuploader-gunicorn start/running, process 166522:43
SpamapSsimensen: what version of upstart? version 1.4 and later log to /var/log/upstart (Ubuntu 12.04 should log there for instance)23:14
simensenhow do i find out which version of upstart i am running? and yes, i finally found some reference to /var/log/upstart23:15
simensenhttps://gist.github.com/09b1f607c6a5955164d323:15
simensenit now looks like i'm running into the problem of LOGFILE actually looking like $LOGDIR/gunicorn.log on my commandline.23:16
simenseni think this is actually what gets run: /opt/uploader/current/ve/bin/gunicorn -w 3 -b 0.0.0.0:996 -u uploader -g uploader --log-level=debug um.wsgi --log-file=$LOGDIR/gunicorn.log23:16
simensenif there is a way for me to do that it would be awesome to know. i just assumed this would work. :-/23:20

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!