/srv/irclogs.ubuntu.com/2012/03/09/#upstart.txt

=== bradleyayers_ is now known as bradleyayers
axisyswhy do I get stop/waiting for a process I just started using start 03:24
axisyshere it shows03:24
ionSee syslog.03:25
axisys http://dpaste.com/hold/713891/03:25
axisysion: that was to me?03:26
ionyeah03:27
axisysion: /var/log/syslog shows nothing03:27
axisysrelated to autossh03:27
ionStrange03:27
axisyslet me stop and start again on one window while monitoring syslog on another window03:28
axisysion: i was wrong03:32
axisysion: i get all these when I start autossh03:32
axisysion: http://dpaste.com/713902/03:33
axisysi guess i should not use autossh.. but just ssh03:33
axisysautossh has i think a feature to respawn when ssh dies03:34
ionPerhaps the problem is with the process 19509 using the port already.03:34
axisysion: it is not used already.. i checked.. before starting.. i think it is how it starts.. 03:35
axisys/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.21003:35
axisysi need to find a better way to start..03:35
axisysautossh converts to that command03:36
ionThere’s no longer a pid 19509 on the system?03:36
axisysion: no03:36
ionIf you run the “su user -c …” command from the shell, does it start correctly and stay in the foreground?03:37
axisyskind of..03:39
axisysit does start.. but it also gives these messages03:39
axisyskeyctl_search: Required key not available03:39
axisysPerhaps try the interactive 'ecryptfs-mount-private'03:39
axisyskeyctl_search: Required key not available03:39
axisysPerhaps try the interactive 'ecryptfs-mount-private'03:39
axisysi dont really need to start as root.. since I am picking a higher port03:40
axisyscan upstart process start as user? i guess not.. 03:40
axisysif I start like this "autossh -f -M .. " as the user.. no issue03:41
axisysas a matter of fact I dont really need to start it as user..03:42
ionI looked up the man page of autossh, -f apparently should make it daemonize. Are you *sure* it stays in the foreground?03:42
axisysso "su user -c .." is not needed to activate the port03:42
axisysion: it goes in the background.. 03:43
ionOk, that needs to be fixed.03:43
axisyskeyctl_search: Required key not available <-- this ?03:43
ionNo, the -f03:44
axisysok03:44
axisysanything you want me to try?03:44
iondropping it03:44
ionI’ve had better success with “sudo” than “su”, too: exec sudo -H -u user -- autossh …03:45
axisysfor that I will need NOPASSWD 03:45
ionsudo doesn’t ask for a password from root.03:46
axisysion: how do you those cool double quotes ?03:46
axisysion: doh! right03:46
ionUS International (AltGr dead keys) layout; altgr-shift-[ and ]03:46
axisysi know whats alt.. i guess i dont have altgr in my keyboard.. i am in VA03:47
axisysanyways.. back to the issue.. let me try with sudo03:47
axisysok using sudo -H -u user -- autossh ... , same issue.. let me remove the -f03:49
axisysI lied.. sudo -H -u user -- autossh not going to work for me if run as root03:51
axisysDefaults        !root_sudo in sudoers03:51
ionRemove that line; fixed. :-P03:52
axisysion: thanks for your help03:53
axisys$ status autossh03:53
axisysautossh start/running, process 1134103:53
axisysand syslog looks good too03:53
axisysno more -f03:53
axisysnow that it is supervised.. if i kill autossh .. it should restart?03:53
ionyeah03:54
axisyscool! worked.. awesome!03:54
axisysion: thanks a lot03:54
ionnp03:54
axisysi have another nfs issue i like to resolve with upstart.. 04:03
axisysmount /foo /bar && run_cmd does not always work04:03
axisysif it is not mounted it is fine..04:04
axisysbut if it is already mounted.. mount still gives non zero exit code.. so run_cmd does not get called04:05
axisyss/nfs/mount/04:05
axisysit is a mount issue.. 04:05
axisysstart on mounted MOUNTPOINT=/bar04:06
axisysrun_cmd04:06
axisys^ this should work ?04:06
axisysmounted seems like a better condition that looking at the exit code of mount04:06
axisysis there some cookbook related to mount that I can look into for example?04:07
axisyshttp://dpaste.com/hold/713910/ <-- this is what we are using.. but I am not confident about line 5104:08
axisysplus looks ugly compare to "start on mounted MOUNTPOINT=/bar" 04:09
axisyswow.. tons of mount related upstart scripts under init/ doh!04:29
SpamapSaxisys: 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 though07:03
=== JanC_ is now known as JanC

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