I'm trying to use the request_port_forward and cancel_port_forward methods of 
paramiko.transport objects to manage a set of remote port forwards.  
Unfortunately I'm having trouble resuming remote port forwarding after extended 
network interrupts which require reconnecting to the remote server.

I've got code like this to initialize port forwarding in my monitor class:
> self.get_transport().cancel_port_forward(bindhost, bindport)
> try:
>       self.get_transport().request_port_forward(bindhost, bindport, handler)

The call to cancel_port_forward succeeds even if there had never been a 
previous port forward request, however if a port forwarding request succeeded 
earlier from a different interrupted connection, both calls will fail.

Specifically here's the sequence of calls that will generate a failure:
1. transport1.request_port_forward(bindhost, bindport, handler)
2. extended network timeout
3. reconnect to host, initialize transport2
4. both transport2.cancel_port_forward(bindhost, bindport) and 
transport2.request_port_forward(bindhost, bindport, handler) calls will fail -- 
giving me no way to re-initialize the port forwarding ...

Am I doing something wrong?  Or if not is there anyway I can solve this?

Thanks,
Ben Cohen
Programmer/Analyst (STS)
Scripps Institution of Oceanography
nco...@ucsd.edu


_______________________________________________
paramiko mailing list
paramiko@lag.net
http://www.lag.net/cgi-bin/mailman/listinfo/paramiko

Reply via email to