returned the exit code 3

Advertisement

bhavank.g
Joined:
Posts:
11

returned the exit code 3

Hi,

I use WinSCP(5.1.7.0) to upload/download files to/from SFTP/FTP locations. I use WinSCP portable exe since 2013 and I use command line to run WinSCP from another integration tool, suddenly today morning all FTP calls are failing with message "returned the exit code 3" on live environment.

Can anyone help me on this issue? I checked error code list at https://winscp.net/eng/docs/sftp_codes but could not understand why its stopped suddenly after 3 years?

Thanks,
Bhavank

Reply with quote

Advertisement

Makc666
Joined:
Posts:
50
Location:
MSK-RU

Re: returned the exit code 3

Bhavank, you have to look into logs. If you don't have enough information then enable Debug level for logs.

May be your remote host (remote server) switched to a newer SFTP protocol version which WinSCP(5.1.7.0) doesn't know. If so the only way to upgrade to a new version of WinSCP.

Reply with quote

bhavank.g
Joined:
Posts:
11

Hi Mack,

I am not sure, how to check logs for WinSCP. Also I use multiple parties FTP locations and all FTP gives this error message which is strange.

Thanks,

Reply with quote

Advertisement

Makc666
Joined:
Posts:
50
Location:
MSK-RU

Try to backup you current WinSCP and then reinstall WinSCP with a new version. May be you have some probmlems with .NET which was updated at your system and now old version of WinSCP is not compatible with a new vewrsion of .NET.

Or wait for any comments from Martin - may be he can give you better comments.

Reply with quote

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

Re: returned the exit code 3

What is the "returned the exit code 3"? Where do you get that? Is that a message from WinSCP (than we need an exact wording) or from some environment that runs WinSCP?

Anyway, you correctly found this topic:
https://winscp.net/eng/docs/message_library_process_terminated_with_exit_code_3

The version you are using suffers from this bug:
https://winscp.net/tracker/996

So the first step to resolve your problem would be to upgrade.

Reply with quote

martin
Site Admin
martin avatar

bhavank.g wrote:

I am not sure but restarting Live environment helped to resolve this issue.
If you didn't upgrade, the problem will repeat.

Reply with quote

Advertisement

bhavank.g
Joined:
Posts:
11

Hi Martin,

I use portable WinSCP EXE and third party application use WinSCP EXE to transfer files between local server and FTP using scripting.

Can you advise what is the step to upgrade this portable EXE please?

Thanks,
Bhavank

Reply with quote

bhavank.g
Joined:
Posts:
11

Hi Martin,

I read on forum to replace Portable EXE with new version EXE. I did same and replace WinSCP(5.1.7.0) EXE with WinSCP(5.9.3). All FTP/SFTP works fine except one SFTP where it gives error of "Password authentication failed". if I use old version EXE then its work fine.

Please advise.

. 2017-01-05 12:45:56.181 Server offered these authentication methods: publickey,password
. 2017-01-05 12:45:56.181 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2017-01-05 12:45:56.181 Using stored password.
. 2017-01-05 12:45:56.181 Sent password
. 2017-01-05 12:45:57.351 Password authentication failed
! 2017-01-05 12:45:57.351 Access denied
. 2017-01-05 12:45:57.351 Server offered these authentication methods: publickey,password
. 2017-01-05 12:45:57.351 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2017-01-05 12:45:57.351 Disconnected: Unable to authenticate

Thanks,
Bhavank

Reply with quote

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

bhavank.g wrote:

I read on forum to replace Portable EXE with new version EXE. I did same and replace WinSCP(5.1.7.0) EXE with WinSCP(5.9.3). All FTP/SFTP works fine except one SFTP where it gives error of "Password authentication failed". if I use old version EXE then its work fine.
Do you have any non-ascii characters in a password for this server? The latest version of WinSCP uses UTF-8 for passwords (what is a correct behavior). But some servers still incorrectly use some legacy encoding (like WinSCP used to do too in its old versions). With such servers, you won't be able to login, if the password is not pure ASCII.

Reply with quote

bhavank.g
Joined:
Posts:
11

martin wrote:

bhavank.g wrote:

I read on forum to replace Portable EXE with new version EXE. I did same and replace WinSCP(5.1.7.0) EXE with WinSCP(5.9.3). All FTP/SFTP works fine except one SFTP where it gives error of "Password authentication failed". if I use old version EXE then its work fine.
Do you have any non-ascii characters in a password for this server? The latest version of WinSCP uses UTF-8 for passwords (what is a correct behavior). But some servers still incorrectly use some legacy encoding (like WinSCP used to do too in its old versions). With such servers, you won't be able to login, if the password is not pure ASCII.

I checked my password for SFTP and all characters from password string are pure ASCII characters. Please advise further on this.

Thanks,
Bhavank

Reply with quote

Advertisement

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

bhavank.g wrote:

I checked my password for SFTP and all characters from password string are pure ASCII characters. Please advise further on this.
Enable password logging with /loglevel=* and check that the correct password is used.
Also, is there any special (even if ASCII) character in the password?

Reply with quote

bhavank.g
Joined:
Posts:
11

martin wrote:

bhavank.g wrote:

I checked my password for SFTP and all characters from password string are pure ASCII characters. Please advise further on this.
Enable password logging with /loglevel=* and check that the correct password is used.
Also, is there any special (even if ASCII) character in the password?

Hi Martin,

I guess special ASCII character ; is causing issue. I found some difference between working and non working version logs

. 2017-01-09 10:17:02.059 Host name: *** (Port: 22)
. 2017-01-09 10:17:02.059 User name: *** (Password: **, Key file: No, Passphrase: No)

Password Section is Yes on working version Log where as on Non working version it picked Initial characters before ; and shown on log.

Is this identification is true? which causing bug on SFTP connection through new version? Kindly let me know once you have look.

Thanks,
Bhavank

Reply with quote

Advertisement

bhavank.g
Joined:
Posts:
11

Hi Martin,

That's very helpful.

After encoding special character ;(Semicolon) to %3B on password resolved this issue. I will observe this for next few days and provide update.

Thanks,
Bhavank

Reply with quote

bhavank.g
Joined:
Posts:
11

Hi Martin,

I have monitored changes applied to mask special character semicolon and it works all good last week. Thank you for your help on this issue.

Thanks,
Bhavank

Reply with quote

Advertisement

You can post new topics in this forum