[Twisted-Python] KeyError in SSHConnection.ssh_CHANNEL_OPEN_CONFIRMATION
Glyph
glyph at twistedmatrix.com
Wed Jul 5 21:01:37 MDT 2017
> On Jul 5, 2017, at 3:00 PM, Stephen McRoberts <steveo at mcroberts.org> wrote:
>
> I'm looking for suggestions why the channel key would be missing after it was just opened.
> I use persistent connections with a timeout but the timer is reset every call so it stays open.
Are you just using `twist conch`? Is any of your own code involved?
> Here's some of my logs:
>
> 2017-07-05 15:26:45-0500 [-] opening channel 4 with 65536 32768
> 2017-07-05 15:36:45-0500 [SSHService 'ssh-connection' on ClientTransport,client] Unhandled Error
> --- (snipped traceback for clarity) ---
> File "/usr/local/lib/python2.7/dist-packages/twisted/conch/ssh/connection.py", line 180, in ssh_CHANNEL_OPEN_CONFIRMATION
> channel = self.channels[localChannel]
> exceptions.KeyError: 4
>
> The same connection instance will work later on the next channel so it seems the connection is fine.
>
> Any suggestions on what would cause this behavior?
>
> Is this behavior typical?
I don't see an existing bug for it, but if you can provoke a traceback like this without monkeying around with any of Twisted's internal data structures, it's a bug. Perhaps it will turn out that the only bug has to do with error reporting and it should be logging something other than a traceback, but nevertheless this is almost certainly a bug in conch itself.
-g
More information about the Twisted-Python
mailing list