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