[16:49] % [16:51] hey guys, I'm having some problems getting the following init script to run: https://gist.github.com/b23e5c2469400d1ca9a4 [16:51] any guidance? [16:51] when I run the exec command manually, it works [16:52] jamescarr: first off, 'shutdown' is not an event, so this will never be stopped [16:53] jamescarr: other than that it looks somewhat normal. hm [16:55] jamescarr: here's how I would write that job tho [16:56] jamescarr: http://paste.ubuntu.com/1358381/ [16:58] SpamapS: thanks [16:59] SpamapS: still exits with a status of 1 :( [16:59] Confused... I've set these up tons of times before [17:00] when I copy the exec command and run it, it works [17:00] what could I be missing? [17:01] jamescarr: what version of upstart? if its 1.4 or later, you'll have a log in /var/log/upstart/$jobname.log [17:01] frak [17:01] I got it [17:01] dammit! [17:01] jamescarr: you forgot to hook up the doll? [17:01] ownership is off [17:02] still shouldn't make a difference, let me check on that [17:03] not it, still failing [17:03] upstart --help [17:03] version 0.6.5 of upstart [17:04] ah ok that one you'll need to pipe to logger or something [17:04] advice on that? [17:05] % [17:05] just add 2>&1 | logger -t foo to the exec line [17:06] Nov 14 11:05:56 ultipro-api ultiproapi: sudo: sorry, you must have a tty to run sudo :-D [17:07] AHa [17:08] jamescarr: http://upstart.ubuntu.com/cookbook/#changing-user [17:08] jamescarr: read that, it may help [17:18] SpamapS: thanks, got it running [17:18] jamescarr: cool [17:22] no longer writes to log, but I think that is a separate issue [17:22] I mean, no longer writes to my app log [17:24] SpamapS: is there something I might have off with this? [17:24] exec 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:25] I expected >> /home/ultipro/ultipro-api/shared/log/token_refresh.log 2>&1 to populate the log [17:25] with STDOUT from the ruby script [17:30] it used to do it when running as sudo [18:16] Something 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 instead [18:17] Which is bad, because that means 45 sec downtime (each time) and cutting off of online user sessions [18:25] false alarm. [18:25] JVM sends shutdown hooks when it receives SIGHUP, which I consider to be exceptionally inane. [20:05] jMCg: reload sends SIGHUP. If tomcat restarts on HUP, thats why [20:06] jMCg: oh, and now I read your false alarm, so disregard ;) [22:42] i'm having a really horrible time with upstart today. :( [22:42] i 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:43] all 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] uploader@precise64:~$ sudo start uploader-gunicorn [22:43] uploader-gunicorn start/running, process 1665 [23:14] simensen: what version of upstart? version 1.4 and later log to /var/log/upstart (Ubuntu 12.04 should log there for instance) [23:15] how do i find out which version of upstart i am running? and yes, i finally found some reference to /var/log/upstart [23:15] https://gist.github.com/09b1f607c6a5955164d3 [23:16] it now looks like i'm running into the problem of LOGFILE actually looking like $LOGDIR/gunicorn.log on my commandline. [23:16] i 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.log [23:20] if there is a way for me to do that it would be awesome to know. i just assumed this would work. :-/