[06:42] seems i was incorrect when using start stop daemon its tracking the wrong pid [06:58] pulz: would you mind pasting your job file somewhere so we can take a look? [07:53] hehe, i mangled it now, but i can put up here the orig and the new [07:56] SpamapS: http://pastebin.com/AkszchTK here you go [07:56] and thx for the intrest [14:01] pulz: you should probably use one of the matching options of start-stop-daemon [14:02] e.g. the -p/--pidfile option [14:40] pulz: just drop the -D and the 'expect fork' [14:41] amazing how many things do daemonization *wrong* [14:42] https://github.com/gamelinux/passivedns/blob/master/src/passivedns.c [14:42] should not daemonize until after compiling the pcap config and setting up the filters [15:48] SpamapS: so the program is wrong ? [15:54] pulz: well, its silly that it crashes after daemonize() is called, thats all [15:55] pulz: anyway, there's no reason to need -D and use 'expect fork'.. just run it without -D, and without expect fork, and you'll have an easier time.... [15:56] pulz: that said, if it immediately crashes, you should see something about that in /var/log/syslog, like "passivedns exitted with exit code 1" [16:00] im assigning it the wrong interface to listen to, so it doesnt crash just exit to quick ? [16:05] pulz: yeah not much upstart can do about that :) [16:05] pulz: note that if you are on Ubuntu 11.10 or later you should have a log of its output in /var/log/upstart/passivedns.log (assuming your job is /etc/init/passivedns.conf) [16:39] SpamapS: yes it does, just tells you that it cant open the interface ([*] Error pcap_open_live: eth1: No such device exists (SIOCGIFHWADDR: No such device)) [19:07] hello. i'm trying to daemonize node.js, with upstart. i follow this tut http://howtonode.org/deploying-node-upstart-monit , it gives a configuration sample, but it never mentions where it should go. any tips? [19:11] meme: reading [19:12] meme: /etc/init/yourprogram.conf [19:12] meme: which, it says [19:20] huh? really? [19:21] meme: yes, its in the paragraph right under the upstart config block [19:24] oh, yes. now i see, i just got confused, thanks for pointing that out [19:25] meme: thanks for using upstart. :) Thats a pretty good article btw :) [19:25] oky :) [19:25] meme: note that the pre-start and pre-stop in that job file are *completely* unnecessary [19:26] meme: as is the script section.. it could be rewritten quite a bit simpler [19:26] alright, cheers [19:26] meme: also 'start on startup' is dead wrong [19:27] ok never mind that article is not so smart ;) [19:27] o.O [19:27] lol [19:27] i just need the basics, for now [19:27] http://paste.ubuntu.com/1170475/ [19:27] thats all you need [19:28] meme: start on startup just won't work unfortunately.. startup is before the filesystems are mounted, before networking is up.. [19:28] it probably accidentally works only because the root FS is mounted (readonly) and the thing listens on 0.0.0.0 [19:29] but the monit stuff is, I think, alright :) [19:30] it's ok, it is just for my personal site now, not a multi million traffic site :D [19:31] who knows in the future.... I have nginx as a proxy, so the power is there [19:37] `start on (filesystem and net-device-up IFACE!=lo)` [19:38] ew [19:38] don't use that [19:38] ever [19:38] meme: thats going to get you into trouble. Just trust that runlevel 2 is "when things are basically ready" [19:38] lol, someone at node,js is telling me, cauze i have asked the same question there also, lol [19:39] yeah [19:39] its a common misconception because a lot of official Ubuntu packages use it still [19:39] but having rewritten the code th delay runlevel 2 until things are ready.. I'm well aware.. use runlevel 2. :) [19:39] i see, thanks god i meet you, you seems like an expert [19:39] actually, having participated in the rewrite that smoser did .. :) [19:39] meme: its only good in 11.10 and later. In 10.04 .. runlevel 2 is too early usually [19:40] i see [19:40] so i will just stick with the bin you gave me for now, let's see what's happen [20:49] SpamapS, i cannot get it to work. do you think that for the fact i'm using nginx as a proxy, it could be there some conflict? [20:49] meme: nginx would be a completely different process, so no [20:49] meme: why don't you try connecting directly to the node.js port, just to see if it works? [20:50] ok, but how? [20:50] i got the system message and all, app start/running, process 7613 [20:50] after i do sudo start app [20:51] where app, is the app.js file, in my node app, it is an express app(not sure if you know node ) [20:51] but i got a 502, if i visit the domain [20:52] when using the upstart [20:53] if i just do a normal node app.js command, all works with nginx [20:54] meme: oh, I think you might need $HOME set [20:55] meme: so add a line.. 'env HOME=/wherever/users/home/is' [20:55] meme: i bet node is printing stuff into /var/log/upstart/app.log tho [20:55] lemme me check [20:56] i will vim'it [20:56] ;P [20:57] nope, it is not, it is empty [20:58] i have the app in my $HOME user folder [20:59] if i env HOME=/wherever/users/home/is same as env HOME=/home/[username] ? [20:59] or env HOME=/home/[username]/sites/domain.com/public/app.js ? [21:05] ugh, i'm getting a lil bit frustrated, i will try this now https://github.com/nodejitsu/forever [21:05] i just need a quick hack for now [21:37] SpamapS: about your fix, when disabling the daemon flag and just using exec it forks 13 procs [21:42] pulz: yeah that shouldn't really matter though [21:45] mm, i think i have a clue now, when trying to unistall i got npm WARN uninstall not installed in /usr/lib/node_modules: "npm" [21:46] ops, sry [22:15] SpamapS: "runlevel 2" should be renamed to something more sensible IMO ;) [22:16] JanC: *100%* agree [22:16] JanC: I meant to work on that this cycle but it got pushed out by other stuff [22:16] JanC: I think 'start on starting network-services' and 'stop on stopping network-services' makes a *lot* more sense. [22:16] JanC: there's another benefit to that which is that we can then have back our sequencing of things we want to start "after everything normal" [22:17] like cron [22:19] as long as it uses human-understandable names that are more or less self-explanatory ☺ [22:21] and of course well-documented [22:22] yeah, runlevels are just left overs [22:23] But I intend to have that network-services job 'start on runlevel [2345]' and 'stop on runlevel [016]' [22:23] but having a job to follow gives us sequencing so its better then runlevel whcih is just a signal