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