Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

anrix

Server unexpectedly closed network connection

Thank you for your support,
apparently my network partner made a change in the firewall and for the moment he has not given the message again, I am monitoring it, if the fault is presented again I will mention it, thank you very much!
regards!
martin

Re: Server unexpectedly closed network connection

anrix wrote:

Also I used the Keepalives option, but the problem still remains.

So please show us a log file for that.
Keepalives are turned off in the log you have posted.
anrix

Server unexpectedly closed network connection

Version WINSCP: At the beginning of the problem 5.13.4.8731
After updating: last 20-sept-2019

Windows Version: Windows server 2012 R2
Transfer Protocol: SFTP
Interface Style: GUI - Explorer
Error Message: Server unexpectedly closed network connection
Description Issue: When the WINSCP is working correctly, it randomly sends the disconnection message, to continue working we run WINSCP again. The problem is repeated multiple times in the day.


Hello,

I have the error that the server is disconnecting the WINSCP by giving the message "Server unexpectedly closed network connection".

I have reviewed the area of reports and bugs reports and found the following report:

https://winscp.net/eng/docs/message_unexpected_close

In my case, it happens “in the middle of a session”,

The report indicates that I should review the log file. I done and the log shows the following message:

____________________________

. 2019-09-17 14:44:52.092 20190916_015258.xml;-;924;2019-09-16T01:52:59.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:44:52.092 20190917_012644.xml;-;977;2019-09-17T01:26:45.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:44:52.092 20190917_015400.xml;-;3450;2019-09-17T01:54:06.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:44:52.092 20190914_235820.xml;-;945;2019-09-14T23:58:21.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:44:52.182 Startup conversation with host finished.
. 2019-09-17 14:54:15.139 Server unexpectedly closed network connection
* 2019-09-17 14:54:15.140 (ESshFatal) El servidor cerró inesperadamente la conexión.

. 2019-09-17 14:54:24.243 Looking up host "35.236.103.56" for SSH connection
. 2019-09-17 14:54:24.243 Connecting to 35.236.103.56 port 60849
. 2019-09-17 14:54:24.286 We claim version: SSH-2.0-WinSCP_release_5.13.4
. 2019-09-17 14:54:24.344 Server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
. 2019-09-17 14:54:24.344 Using SSH protocol version 2
. 2019-09-17 14:54:24.344 Have a known host key of type ssh-ed25519
. 2019-09-17 14:54:24.363 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2019-09-17 14:54:25.349 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
. 2019-09-17 14:54:25.351 Host key fingerprint is:
. 2019-09-17 14:54:25.351 ssh-ed25519 256 44:2a:31:44:98:13:xy:ad:a2:a1:bd:dc:22:0c:42:14:f9:88 i9Gkdb2o9MhL+Cov3aIs9rjL5dDz2ZWsbHLUkqORdJY=
. 2019-09-17 14:54:25.366 Host key matches cached key
. 2019-09-17 14:54:25.366 Initialised AES-256 SDCTR client->server encryption
. 2019-09-17 14:54:25.366 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2019-09-17 14:54:25.366 Initialised AES-256 SDCTR server->client encryption
. 2019-09-17 14:54:25.366 Initialised HMAC-SHA-256 server->client MAC algorithm
. 2019-09-17 14:54:25.498 Reading key file "C:\Users\Administrator\Documents\ssh-vps\ssh-vps.ppk"
! 2019-09-17 14:54:25.499 Using username "mexico".
. 2019-09-17 14:54:25.565 Server offered these authentication methods: publickey,password
. 2019-09-17 14:54:25.565 Offered public key
. 2019-09-17 14:54:25.606 Offer of public key accepted
! 2019-09-17 14:54:25.606 Authenticating with public key "rsa-key-30180509"
. 2019-09-17 14:54:25.626 Prompt (passphrase, "SSH key passphrase", <no instructions>, "Passphrase for key "rsa-key-30180509": ")
. 2019-09-17 14:54:25.626 Using remembered password.
. 2019-09-17 14:54:25.857 Sent public key signature
. 2019-09-17 14:54:25.950 Access granted
. 2019-09-17 14:54:25.950 Opening session as main channel
. 2019-09-17 14:54:26.181 Opened main channel
. 2019-09-17 14:54:26.263 Started a shell/command
. 2019-09-17 14:54:26.283 Doing startup conversation with host.
> 2019-09-17 14:54:26.299 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-09-17 14:54:26.347 Type: SSH_FXP_VERSION, Size: 150, Number: -1
. 2019-09-17 14:54:26.347 SFTP version 3 negotiated.
. 2019-09-17 14:54:26.347 Unknown server extension posix-rename@openssh.com="1"
. 2019-09-17 14:54:26.347 Supports statvfs@openssh.com extension version "2"
. 2019-09-17 14:54:26.347 Unknown server extension fstatvfs@openssh.com="2"
. 2019-09-17 14:54:26.347 Supports hardlink@openssh.com extension version "1"
. 2019-09-17 14:54:26.347 Unknown server extension fsync@openssh.com="1"
. 2019-09-17 14:54:26.347 We believe the server has signed timestamps bug
. 2019-09-17 14:54:26.347 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-09-17 14:54:26.347 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-09-17 14:54:26.347 Changing directory to "/www/mexico_103/public/wp-content/uploads/k4/nuevos".
. 2019-09-17 14:54:26.347 Getting real path for '/www/mexico_103/public/wp-content/uploads/k4/nuevos'
> 2019-09-17 14:54:26.347 Type: SSH_FXP_REALPATH, Size: 71, Number: 21008
< 2019-09-17 14:54:26.404 Type: SSH_FXP_NAME, Size: 145, Number: 21008
. 2019-09-17 14:54:26.404 Real path is '/www/mexico_103/public/wp-content/uploads/k4/nuevos'
. 2019-09-17 14:54:26.404 Trying to open directory "/www/mexico_103/public/wp-content/uploads/k4/nuevos".
> 2019-09-17 14:54:26.404 Type: SSH_FXP_LSTAT, Size: 71, Number: 21255
< 2019-09-17 14:54:26.451 Type: SSH_FXP_ATTRS, Size: 37, Number: 21255
. 2019-09-17 14:54:26.451 Getting current directory name.
. 2019-09-17 14:54:26.644 Directory content loaded from cache.
. 2019-09-17 14:54:26.661 Cached directory not reloaded.
. 2019-09-17 14:54:26.681 Listing directory "/www/mexico_103/public/wp-content/uploads/k4/nuevos".
> 2019-09-17 14:54:26.681 Type: SSH_FXP_OPENDIR, Size: 71, Number: 21515
< 2019-09-17 14:54:26.723 Type: SSH_FXP_HANDLE, Size: 13, Number: 21515
> 2019-09-17 14:54:26.723 Type: SSH_FXP_READDIR, Size: 13, Number: 21772
< 2019-09-17 14:54:26.821 Type: SSH_FXP_NAME, Size: 14239, Number: 21772
> 2019-09-17 14:54:26.821 Type: SSH_FXP_READDIR, Size: 13, Number: 22028
< 2019-09-17 14:54:26.922 Type: SSH_FXP_NAME, Size: 14309, Number: 22028
> 2019-09-17 14:54:26.923 Type: SSH_FXP_READDIR, Size: 13, Number: 22284
< 2019-09-17 14:54:27.023 Type: SSH_FXP_NAME, Size: 1153, Number: 22284
> 2019-09-17 14:54:27.023 Type: SSH_FXP_READDIR, Size: 13, Number: 22540
< 2019-09-17 14:54:27.069 Type: SSH_FXP_STATUS, Size: 28, Number: 22540
< 2019-09-17 14:54:27.069 Status code: 1
> 2019-09-17 14:54:27.069 Type: SSH_FXP_CLOSE, Size: 13, Number: 22788
. 2019-09-17 14:54:27.069 ..;d;0;2019-05-07T22:57:36.000Z;3;"mexico" [1001];"www-data" [33];rwxr-xr-x;0
. 2019-09-17 14:54:27.069 20190916_001128.xml;-;1360;2019-09-16T00:11:30.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:54:27.069 20190916_010945.xml;-;2268;2019-09-16T01:09:47.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:54:27.069 20190917_012848.xml;-;1615;2019-09-17T01:28:54.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:54:27.069 20190916_004107.xml;-;4125;2019-09-16T00:41:12.000Z;3;"demexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:54:27.069 20190915_004229.xml;-;4271;2019-09-15T00:42:32.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:54:27.069 20190917_001240.xml;-;1352;2019-09-17T00:12:41.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0
. 2019-09-17 14:54:27.069 20190916_002033.xml;-;4057;2019-09-16T00:20:36.000Z;3;"mexico" [1001];"www-data" [33];rw-r--r--;0


____________________________


I have not been able to interpret the error except that the server unexpectedly closes the session.

Optimize the size of the connection buffer

The report indicates that If the problem is repeated, try to disable “Optimize the size of the connection buffer”.

Which has been turned off, but the problem persists.


Update WINSCP


The WINSCP was updated to the latest version that exists on the site (Sep 20, 2019)

And the problem still persists,


Connection Page (Advanced Site Settings dialog)

Also I used the Keepalives option, but the problem still remains.



can you support us to identify why the server disconnected from WinSCP?

Thank you

Antonio Ramírez