=== bradleyayers_ is now known as bradleyayers [03:24] why do I get stop/waiting for a process I just started using start [03:24] here it shows [03:25] See syslog. [03:25] http://dpaste.com/hold/713891/ [03:26] ion: that was to me? [03:27] yeah [03:27] ion: /var/log/syslog shows nothing [03:27] related to autossh [03:27] Strange [03:28] let me stop and start again on one window while monitoring syslog on another window [03:32] ion: i was wrong [03:32] ion: i get all these when I start autossh [03:33] ion: http://dpaste.com/713902/ [03:33] i guess i should not use autossh.. but just ssh [03:34] autossh has i think a feature to respawn when ssh dies [03:34] Perhaps the problem is with the process 19509 using the port already. [03:35] ion: it is not used already.. i checked.. before starting.. i think it is how it starts.. [03:35] /usr/bin/ssh -L 2000:127.0.0.1:2000 -R 2000:127.0.0.1:2001 -N -L 9025:smtp.example.com:25 192.168.1.210 [03:35] i need to find a better way to start.. [03:36] autossh converts to that command [03:36] There’s no longer a pid 19509 on the system? [03:36] ion: no [03:37] If you run the “su user -c …” command from the shell, does it start correctly and stay in the foreground? [03:39] kind of.. [03:39] it does start.. but it also gives these messages [03:39] keyctl_search: Required key not available [03:39] Perhaps try the interactive 'ecryptfs-mount-private' [03:39] keyctl_search: Required key not available [03:39] Perhaps try the interactive 'ecryptfs-mount-private' [03:40] i dont really need to start as root.. since I am picking a higher port [03:40] can upstart process start as user? i guess not.. [03:41] if I start like this "autossh -f -M .. " as the user.. no issue [03:42] as a matter of fact I dont really need to start it as user.. [03:42] I looked up the man page of autossh, -f apparently should make it daemonize. Are you *sure* it stays in the foreground? [03:42] so "su user -c .." is not needed to activate the port [03:43] ion: it goes in the background.. [03:43] Ok, that needs to be fixed. [03:43] keyctl_search: Required key not available <-- this ? [03:44] No, the -f [03:44] ok [03:44] anything you want me to try? [03:44] dropping it [03:45] I’ve had better success with “sudo” than “su”, too: exec sudo -H -u user -- autossh … [03:45] for that I will need NOPASSWD [03:46] sudo doesn’t ask for a password from root. [03:46] ion: how do you those cool double quotes ? [03:46] ion: doh! right [03:46] US International (AltGr dead keys) layout; altgr-shift-[ and ] [03:47] i know whats alt.. i guess i dont have altgr in my keyboard.. i am in VA [03:47] anyways.. back to the issue.. let me try with sudo [03:49] ok using sudo -H -u user -- autossh ... , same issue.. let me remove the -f [03:51] I lied.. sudo -H -u user -- autossh not going to work for me if run as root [03:51] Defaults !root_sudo in sudoers [03:52] Remove that line; fixed. :-P [03:53] ion: thanks for your help [03:53] $ status autossh [03:53] autossh start/running, process 11341 [03:53] and syslog looks good too [03:53] no more -f [03:53] now that it is supervised.. if i kill autossh .. it should restart? [03:54] yeah [03:54] cool! worked.. awesome! [03:54] ion: thanks a lot [03:54] np [04:03] i have another nfs issue i like to resolve with upstart.. [04:03] mount /foo /bar && run_cmd does not always work [04:04] if it is not mounted it is fine.. [04:05] but if it is already mounted.. mount still gives non zero exit code.. so run_cmd does not get called [04:05] s/nfs/mount/ [04:05] it is a mount issue.. [04:06] start on mounted MOUNTPOINT=/bar [04:06] run_cmd [04:06] ^ this should work ? [04:06] mounted seems like a better condition that looking at the exit code of mount [04:07] is there some cookbook related to mount that I can look into for example? [04:08] http://dpaste.com/hold/713910/ <-- this is what we are using.. but I am not confident about line 51 [04:09] plus looks ugly compare to "start on mounted MOUNTPOINT=/bar" [04:29] wow.. tons of mount related upstart scripts under init/ doh! [07:03] axisys: start on mounted MOUNTPOINT=/bar works fine if you want your job to only start right after that mountpoint is available.. it can be tough to make that useful in generic situations though === JanC_ is now known as JanC