question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"sftp: Unexpected end event raised by server" after inbound request for a channel window adjust

See original GitHub issue

Hi there, I am facing a strange issue where I am trying to connect to an sftp server and grab a file. Im able to connect to the sftp server but it makes a request to adjust the channel window size and then fails 5 minutes after receiving the request. I have been able to connect to multiple other servers without issue, some of which also made requests to adjust the window size and this is the first instance where its failed. I think this may be some sort of misconfiguration on the SFTP server but I have no idea what that could be. Im hoping that someone more familiar with the project might be able to help me figure out what is going wrong here. Any suggestions as to what I could try?

Here are the relevant logs:

"Handshake completed"
"Outbound: Sending SERVICE_REQUEST (ssh-userauth)"
"Inbound: Received SERVICE_ACCEPT (ssh-userauth)"
"Outbound: Sending USERAUTH_REQUEST (none)"
"Inbound: Received USERAUTH_FAILURE (publickey,password)"
"Client: none auth failed"
"Outbound: Sending USERAUTH_REQUEST (publickey -- check)"
"Inbound: Received USERAUTH_PK_OK"
"Outbound: Sending USERAUTH_REQUEST (publickey)"
"Inbound: Received USERAUTH_SUCCESS"
"CLIENT[sftp]: Removing listener from ready"
"CLIENT[sftp]: sftp: Removing end listener"
"CLIENT[sftp]: sftp: Removing close listener"
"CLIENT[sftp]: sftp: Removing error listener"
"Outbound: Sending CHANNEL_OPEN (r:0, session)"
"Inbound: CHANNEL_OPEN_CONFIRMATION (r:0, s:0)"
"Outbound: Sending CHANNEL_REQUEST (r:0, subsystem: sftp)"
"Inbound: CHANNEL_SUCCESS (r:0)"
"Inbound: CHANNEL_WINDOW_ADJUST (r:0, 524288)"
"Socket ended"
"CLIENT[sftp]: sftp: Unexpected end event raised by server"
"Socket closed"
"CLIENT[sftp]: sftp: Unexpected close event raised by server"
"CLIENT[sftp]: SFTP Channel Error: Received unexpected SFTP session termination"

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mscdexcommented, Apr 27, 2022

@richard-peters It will be merged. I wanted to confirm the fix with @kelly1266 first.

0reactions
mscdexcommented, Apr 27, 2022

Thanks for the confirmations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled 'error' event when calling end() · Issue #195 - GitHub
That error indicates the remote sftp server is resetting the connection. Why it is doing this and raising it as an error when...
Read more >
SFTP Connection Error Received unexpected end-of-file from ...
I installed lamp and configured dns server after that I'm unable to access to my server via sftp. It say's Received unexpected end-of-file ......
Read more >
SFTP Client Begin session failing with "SFTP session channel ...
SFTP Client Begin session failing with "SFTP session channel closed by server" after upgrading Sterling B2B Integrator to version 60303.
Read more >
Connecting to a SFTP server with ssh2-sftp-client in a AWS ...
When I run this on my local machine it works and lists the documents. async function main (event){ let Client = require('ssh2-sftp ......
Read more >
Channel - Paramiko documentation
Request a subsystem on the server (for example, sftp ). If the server allows it, the channel will then be directly connected to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found