Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Net::SSH::Perl hangs(during cmd), but only in Mason environment

by mdillon (Priest)
on Mar 10, 2005 at 00:56 UTC ( [id://438169]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Net::SSH::Perl hangs(during cmd), but only in Mason environment

From the docs, it doesn't look like the output goes anywhere by default. In an example from the distribution, the code has print $out after the call to cmd.

What does the code after the snippet you've provided look like?

Replies are listed 'Best First'.
Re^2: Net::SSH::Perl hangs(during cmd), but only in Mason environment
by perldragon80 (Sexton) on Mar 10, 2005 at 01:18 UTC

    Well, the problem is that the code hangs during the call to $session->cmd. I actually have tried die("Output is $out"); , as well as writing to the Apache logs after the cmd call, but it just doesn't get there. I tried stepping through it with Komodo, but didn't have enough time today...probably try again tomorrow. The exact same sequence and user environment works as long as Mason isn't involved, and the ssh interaction gets almost to the point where the output is returned from the cmd call...
    Here is what the end of the sshd debug should look like (done with the CGI::Application test)

    debug3: channel 1: will not send data after close debug1: channel 1: is dead debug1: channel 1: garbage collecting debug1: channel_free: channel 1: server-session, nchannels 2 debug3: channel_free: status: The following connections are open: #0 server-session (t4 r0 i1/0 o16/0 fd 7/7) #1 server-session (t4 r1 i8/0 o128/0 fd 8/8) debug3: channel_close_fds: channel 1: r 8 w 8 e -1 Connection closed by remote host. debug1: channel_free: channel 0: server-session, nchannels 1 debug3: channel_free: status: The following connections are open: #0 server-session (t4 r0 i1/0 o16/0 fd 7/7) debug3: channel_close_fds: channel 0: r 7 w 7 e 9 debug1: session_close: session 0 pid 18607 Closing connection to 192.168.200.231 debug1: Received SIGCHLD.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://438169]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.