Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

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


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?


Comment on Re: Net::SSH::Perl hangs(during cmd), but only in Mason environment
Select or Download Code
Re^2: Net::SSH::Perl hangs(during cmd), but only in Mason environment
by perldragon80 (Sexton) on Mar 10, 2005 at 06: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
Node Status?
node history
Node Type: note [id://438169]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-12-27 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls