many Problems with broken connections

Advertisement

int25
Guest

many Problems with broken connections

First to tell: I really like WinSCP and also would like to use it with Linux-Machines.

But there's still one heavy downer for this joy working with this tool:

I'm having a connection, that's somewhat unstable and found no way to fix it.
It's just only minimal discontinuity, that will not be registered with other software or connections, but that's disrupting the ssh.

If I so - like I do several times - had opened some files to work with on my server, all my work is broken, since there's no way of continuing, while the connection is long present again: it was just broken for maybe some millisecond.

So then I have to closed each editing-window, I was working with, discard the work, I done within them and start over again.

This is happening about all 5 minutes, and thus a good deal of my working is resumig such broken connections within WinSCP.

Isn't there a smarter way of dealing with broken connections, saving the work that's done in editing windows and resume them, best automatically ?

I just appreciate any helpful hint on this vexatious issue - while in any other regard I really like the use of your tool.

Reply with quote

Advertisement

v-devim
Joined:
Posts:
2

Automatically reconnect without prompting

I call WinScp from a C# code to download a file. If the connection gets disturbed for a few seconds the following prompt appears
----------------------------------------------------------------------
Network error: Connection reset by peer
(A)bort, (R)econnect:
----------------------------------------------------------------------

So the program goes on hang until some input is given.
Is it possible to automatically reconnect / exit if there is any network failure for few seconds?
What is the commandline option in WinScp 3.8 to automatically reconnect if there is a network failure for few seconds?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Automatically reconnect without prompting

v-devim wrote:

Is it possible to automatically reconnect / exit if there is any network failure for few seconds?
What is the commandline option in WinScp 3.8 to automatically reconnect if there is a network failure for few seconds?
Automatic reconnection works only, it the connection is dropped in the middle of file transfer. It should be enabled by default.

Reply with quote

v-devim
Joined:
Posts:
2

automatic reconnection without causing any prompt

Thanks for your reply.

I am not using the UI to do transfer of files.

Is there a scripting command to enable or disable automatic reconnection without causing any prompt?

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: automatic reconnection without causing any prompt

v-devim wrote:

Is there a scripting command to enable or disable automatic reconnection without causing any prompt?
No. It's enabled by default. You can disable it from GUI only.

Reply with quote

//matt
Guest

Re: Automatically reconnect without prompting

v-devim wrote:

I call WinScp from a C# code to download a file. If the connection gets disturbed for a few seconds the following prompt appears
----------------------------------------------------------------------
Network error: Connection reset by peer
(A)bort, (R)econnect:
----------------------------------------------------------------------

So the program goes on hang until some input is given.
Is it possible to automatically reconnect / exit if there is any network failure for few seconds?
What is the commandline option in WinScp 3.8 to automatically reconnect if there is a network failure for few seconds?

I have this same problem. Auto-reconnect does nothing to fix the issue. It is extremely irritating when dealing with very large files and a slow upload.

I don't understand how to fix the problem.

//matt

Reply with quote

BlackVoid
Guest

I have the same problem it is MAJOR ONE. I get an email: connection reset by peer.
Screen saver activates: connection reset by peer. Monitor switches off to save power: connection reset by peer.

It is close to impossible to upload large files with the program. :evil: :evil: :evil: :evil: :evil: :evil: :evil:

Reply with quote

Advertisement

BitBanger
Guest

No reliable reconnect

I have this same problem with connection "reset by peer". WinSCP never recovers with a new successful login.

Don't get me wrong, I think this is a great program myself and my hat is off to the developers/contributors. I would even contribute financially to this project, if someone could prove that this program will work.

I am an expatriate working outside the US, and I want to download video from my home where I legally record the video on a PC. However, I also know that if that content is not secured I would be creating a problem for everyone that uses content legally (pays for it). However, I can't find any "reliable" way to move the content between the PC's which can go unattended for days at a time. This software is/was my best hope.

Please post/inform me if this situation changes. I would actually like to see the "reconnect" feature get some parameters that are adjustable, and possibly even get some logging data on just the feature, so that I could see when ISPs might be "breaking" or "resetting" the connection, and how often.

Best regards,

BitBanger

Reply with quote

martin
Site Admin
martin avatar

Re: No reliable reconnect

BitBanger wrote:

I have this same problem with connection "reset by peer". WinSCP never recovers with a new successful login.
Can you post a log file?

Reply with quote

VidZone
Guest

Same problem with reconnect

I get the same problem with broken connection, and the message comes up:
Connection reset by peer. and the options Abort and Reconnect are given. However, if i choose Reconnect, there is an abnormal program termination and i have to restart the program. This is a big issue for us as we the program on over night for large file deliveries. So if the connection breaks, we then have to deliver the files the next morning, which takes up valuable time and bandwidth.

Any help with this issue would be greatly appreciated.

Thanks
Faze

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Same problem with reconnect

VidZone wrote:

I get the same problem with broken connection, and the message comes up:
Connection reset by peer. and the options Abort and Reconnect are given. However, if i choose Reconnect, there is an abnormal program termination and i have to restart the program. This is a big issue for us as we the program on over night for large file deliveries. So if the connection breaks, we then have to deliver the files the next morning, which takes up valuable time and bandwidth.
Can you post a log file? Also what version of WinSCP are you using?

Reply with quote

Advertisement

Vidzone
Guest

Re: Same problem with reconnect

Can you post a log file? Also what version of WinSCP are you using?

I will as soon as i get the error again. It hasn't happened since i turned logging on. I am using version 3.7.6

Reply with quote

martin
Site Admin
martin avatar

Re: Same problem with reconnect

Vidzone wrote:

I will as soon as i get the error again. It hasn't happened since i turned logging on. I am using version 3.7.6
Thanks. But please, first of all, upgrade to the latest release. Log file from 3.7.6 would be useless.

Reply with quote

Guest

Re: Same problem with reconnect

martin wrote:

Vidzone wrote:

I will as soon as i get the error again. It hasn't happened since i turned logging on. I am using version 3.7.6
Thanks. But please, first of all, upgrade to the latest release. Log file from 3.7.6 would be useless.


Run from Perl using Win32 Process.
It just hangs and runs forever, with no CPU time. How can I force it to exit?



. 2006-10-13 08:16:53.843 --------------------------------------------------------------------------
. 2006-10-13 08:16:53.843 WinSCP Version 3.8.1 (Build 328) (OS 5.2.3790 Service Pack 1)
. 2006-10-13 08:16:53.843 Login time: Friday, October 13, 2006 8:16:53 AM
. 2006-10-13 08:16:53.843 --------------------------------------------------------------------------
. 2006-10-13 08:16:53.843 Session name: Jost2
. 2006-10-13 08:16:53.843 Host name: ftp2.corp.com (Port: 22)
. 2006-10-13 08:16:53.843 User name: zz001 (Password: Yes, Key file: No)
. 2006-10-13 08:16:53.843 Transfer Protocol: SFTP
. 2006-10-13 08:16:53.843 SSH protocol version: 2; Compression: No
. 2006-10-13 08:16:53.843 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2006-10-13 08:16:53.843 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2006-10-13 08:16:53.843 Ping type: -, Ping interval: 30 sec; Timeout: 300 sec
. 2006-10-13 08:16:53.843 SSH Bugs: -,-,-,-,-,-,-,-
. 2006-10-13 08:16:53.843 SFTP Bugs: -,-,-
. 2006-10-13 08:16:53.843 Proxy: none
. 2006-10-13 08:16:53.843 Return code variable: Autodetect; Lookup user groups: Yes
. 2006-10-13 08:16:53.843 Shell: default, EOL: 0
. 2006-10-13 08:16:53.843 Local directory: default, Remote directory: DropOff, Update: No, Cache: Yes
. 2006-10-13 08:16:53.843 Cache directory changes: Yes, Permanent: Yes
. 2006-10-13 08:16:53.843 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2006-10-13 08:16:53.843 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2006-10-13 08:16:53.843 --------------------------------------------------------------------------
. 2006-10-13 08:16:53.843 Looking up host "ftp2.corp.com"
. 2006-10-13 08:16:58.343 Connecting to DU.MM.YY.XX port 22
. 2006-10-13 08:16:58.390 Server version: SSH-2.0-SSHD
. 2006-10-13 08:16:58.390 We claim version: SSH-2.0-WinSCP_release_3.8.1
. 2006-10-13 08:16:58.390 Using SSH protocol version 2
. 2006-10-13 08:16:58.405 Using Diffie-Hellman with standard group "group1"
. 2006-10-13 08:16:58.405 Doing Diffie-Hellman key exchange
. 2006-10-13 08:16:58.640 Host key fingerprint is:
. 2006-10-13 08:16:58.640 ssh-rsa 1024 37:e6:57:bd:1c:1a:af:69:3e:e5:c5:24:a4:c1:24:d5
. 2006-10-13 08:16:58.640 Initialised Blowfish client->server encryption
. 2006-10-13 08:16:58.640 Initialised HMAC-SHA1 client->server MAC algorithm
. 2006-10-13 08:16:58.874 Initialised Blowfish server->client encryption
. 2006-10-13 08:16:58.874 Initialised HMAC-SHA1 server->client MAC algorithm
! 2006-10-13 08:16:58.890 Using username "user01".
! 2006-10-13 08:16:58.921 This computer system is for authorized use only. All use of this computer system and all messages and files on this system (including deleted files) may be monitored, recorded, searched, copied and/or disclosed to authorized personnel and/or to law enforcement personnel. By using this system, you (the user) hereby consent to all such monitoring, recording, searching, copying and disclosure. No user of this system can expect any use to be private. Unauthorized or improper use of this system may result in disciplinary action and/or in civil or criminal penalties. By continuing to use this computer system you indicate your consent to all these conditions of use. LOG OFF IMMEDIATELY if you do not agree to ALL the conditions stated in this Notice.
. 2006-10-13 08:16:59.140 Session password prompt (user01@ftp2.corp.com's password: )
. 2006-10-13 08:16:59.140 Using stored password.
! 2006-10-13 08:16:59.140 Authenticating with pre-entered password.
. 2006-10-13 08:16:59.140 Sent password
. 2006-10-13 08:17:02.515 Access granted
. 2006-10-13 08:17:02.530 Opened channel for session
. 2006-10-13 08:17:03.733 Started a shell/command
. 2006-10-13 08:17:03.733 --------------------------------------------------------------------------
. 2006-10-13 08:17:03.733 Using SFTP protocol.
. 2006-10-13 08:17:03.733 Doing startup conversation with host.
> 2006-10-13 08:17:03.733 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2006-10-13 08:17:03.968 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2006-10-13 08:17:03.968 SFTP version 3 negotiated.
. 2006-10-13 08:17:03.968 We believe the server has signed timestamps bug
. 2006-10-13 08:17:03.968 We will use UTF-8 strings for status messages only
. 2006-10-13 08:17:03.968 Changing directory to "DropOff".
. 2006-10-13 08:17:03.968 Getting real path for 'DropOff'
> 2006-10-13 08:17:03.968 Type: SSH_FXP_REALPATH, Size: 16, Number: 16
< 2006-10-13 08:17:06.327 Type: SSH_FXP_NAME, Size: 57, Number: 16
. 2006-10-13 08:17:06.327 Real path is '/DropOff'
. 2006-10-13 08:17:06.327 Trying to open directory "/DropOff".
> 2006-10-13 08:17:06.327 Type: SSH_FXP_LSTAT, Size: 17, Number: 263
< 2006-10-13 08:17:08.655 Type: SSH_FXP_ATTRS, Size: 29, Number: 263
. 2006-10-13 08:17:08.655 Getting current directory name.
. 2006-10-13 08:17:08.655 Startup conversation with host finished.
. 2006-10-13 08:17:08.655 Copying 1 files/directories to remote directory "/DropOff"
. 2006-10-13 08:17:08.655 PrTime: Yes; PrRO: Yes; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask:
. 2006-10-13 08:17:08.655 TM: M; ClAr: No; ExclM(No):
. 2006-10-13 08:17:08.655 AscM: *.*html; *.htm; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2006-10-13 08:17:08.655 File: "E:\ftp\Corp\Data\200610130816300616.dat"
. 2006-10-13 08:17:08.655 Copying "E:\ftp\Corp\Data\200610130816300616.dat" to remote directory started.
. 2006-10-13 08:17:08.655 Binary transfer mode selected.
. 2006-10-13 08:17:08.655 Checking existence of file.
> 2006-10-13 08:17:08.655 Type: SSH_FXP_LSTAT, Size: 46, Number: 519
< 2006-10-13 08:17:09.468 Type: SSH_FXP_STATUS, Size: 79, Number: 519
< 2006-10-13 08:17:09.468 Status/error code: 2
. 2006-10-13 08:17:09.468 Checking existence of partially transfered file.
> 2006-10-13 08:17:09.468 Type: SSH_FXP_LSTAT, Size: 55, Number: 775
< 2006-10-13 08:17:10.249 Type: SSH_FXP_STATUS, Size: 88, Number: 775
< 2006-10-13 08:17:10.249 Status/error code: 2
. 2006-10-13 08:17:10.249 Opening remote file.
> 2006-10-13 08:17:10.249 Type: SSH_FXP_OPEN, Size: 71, Number: 1027
< 2006-10-13 08:17:12.109 Type: SSH_FXP_HANDLE, Size: 10, Number: 1027
> 2006-10-13 08:17:12.109 Type: SSH_FXP_WRITE, Size: 4118, Number: 1542
. 2006-10-13 08:18:02.891 Network error: Connection reset by peer
. 2006-10-13 08:18:02.891 Connection was lost, asking what to do.
. 2006-10-13 08:18:02.891 Asking user:
. 2006-10-13 08:18:02.891 Network error: Connection reset by peer ()

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Same problem with reconnect

Anonymous wrote:

Run from Perl using Win32 Process.
It just hangs and runs forever, with no CPU time. How can I force it to exit?
Have you tried command "option batch abort"?

Reply with quote

Advertisement

cdlvj
Joined:
Posts:
13

Re: Same problem with reconnect

martin wrote:

Anonymous wrote:

Run from Perl using Win32 Process.
It just hangs and runs forever, with no CPU time. How can I force it to exit?
Have you tried command "option batch abort"?

martin wrote:

Anonymous wrote:

Run from Perl using Win32 Process.
It just hangs and runs forever, with no CPU time. How can I force it to exit?
Have you tried command "option batch abort"?

That worked. But what is causing this problem. This has worked for months, and for the past week and a half, nothing but problems. Is it on the client side or on the server side? ISP problems, hardware problems?

I am trying restarts, but having all kinds of problems. I run this as a Win32 process, and try to rename the logs with a date time but it continues to put the info into the same log file.

Then on subsequent tries, it says that a partial file exist and then quits.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Same problem with reconnect

cdlvj wrote:

That worked. But what is causing this problem. This has worked for months, and for the past week and a half, nothing but problems. Is it on the client side or on the server side? ISP problems, hardware problems?
You may first check the log file to see whether it indicates why the server closes the connection.

Reply with quote

Advertisement

mounika.baddam
Guest

FTP file transfer Resume

I am trying to upload a large file to FTP site. I want to resume the file transfer whenever interruptions occurs in connections. Here is my code.
I am trying to resumes the file transfer by manually closing the connection but file is uploading irrespective of connection breaks

Public Function UploadFile(ByVal LocalPath As String, ByVal RemotePath As String) As Boolean
Return UploadFile(LocalPath, RemotePath, True)
End Function

Public Function UploadFile(ByVal LocalPath As String, ByVal RemotePath As String, resumeFileUpload As Boolean) As Boolean
'uploads files to FTP Directory
Dim myUri As New Uri(RemotePath.Replace("\", "/"))
Dim TargetPath As String = GetTargetPath(RemotePath, True)
Dim result As Boolean = False

Using session As New Session
session.Open(GetSessionOptions(myUri))

' Upload files
Dim transferResult As TransferOperationResult
transferResult = session.PutFiles(LocalPath, TargetPath, False, Me.GetTransferOptions(resumeFileUpload))

' Throw on any error
transferResult.Check()
If transferResult.IsSuccess Then
result = True
End If

' Display results
Dim transfer As TransferEventArgs
For Each transfer In transferResult.Transfers
Console.WriteLine("Upload of " & transfer.FileName & " succeeded")
Next
End Using

Return result
End Function

Protected Function GetSessionOptions(ByVal Uri As Uri) As SessionOptions
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Ftp
.UserName = Me.Credentials.UserName
.Password = Me.Credentials.Password
.HostName = Uri.Host
.PortNumber = Uri.Port
If Me.EnableSsl Then
.FtpSecure = FtpSecure.Explicit
End If
End With

Return sessionOptions
End Function

Private Function GetTransferOptions(resumeFileUpload As Boolean) As TransferOptions
Dim myTransferOptions As New TransferOptions

If resumeFileUpload Then
myTransferOptions.ResumeSupport.State = TransferResumeSupportState.On
myTransferOptions.OverwriteMode = OverwriteMode.Resume
Else
myTransferOptions.OverwriteMode = OverwriteMode.Overwrite
End If

myTransferOptions.TransferMode = TransferMode.Binary

Return myTransferOptions
End Function

Reply with quote

Guest

Authentication failed.
Using TLSv1.2, cipher TLSv1/SSLv3: AES128-SHA, 2048 bit RSA, AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1

Connection failed.
User KOM988Pz@10.227.77.86:51669 access denied.
*********************
Solutions please?

Reply with quote

Advertisement

You can post new topics in this forum