SSH with -N and -f in an upstart job

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Wed Mar 21 14:19:57 UTC 2012


On 03/20/2012 10:34 AM, Jamon Camisso wrote:
> On 12-03-20 10:30 AM, Ted wrote:
>> put a
>>
>>>> /tmp/log.1 2>> /tmp/log.2
>> on end of first one, maybe glean some info.
>>
>> I mentioned before about the fact it may be prompting for password, but
>> i didn't mean for the ssh command but rather the sudo,
>> as if run by another user, and also ssh may involve other resources that
>> may render present sudoer file setting not adequate enough?
> 
> Good idea to debug that way, though the upstart job is running as root.
> Moreover, if there is just a single command in the upstart job, it
> completes successfully. It is almost like the first command is being run
> but improperly forked. Am currently investigating fork/daemonize options.

Nothing gets written when logging, I've tried a combination of stdout,
and stdout 2>&1 stderr redirection. Next step seems like strace or
ltrace would be a way to get more info.

I also tried using 'script' and 'expect fork' but neither changed the
behaviour of either locking up, or only executing one of the port
forwarding SSH tunnels.

UnfortunatelyI think it is rc.local for now.

Thanks all, Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list