Troubleshooting
优质
小牛编辑
129浏览
2023-12-01
When facing an issue with WinSCP, following resources and hints may help you to resolve the issue yourself:
- Try to find solution in F.A.Q, in our numerous guides or in this documentation. Use Search box on the top right.
- If you are getting an error message, check the list of common error messages.
- Try to find a solution in tens of thousands answered questions on WinSCP support forum. Again, use the Search box on the top right, but navigate to the forum before you do so. – Alternatively, select “Support forum” in the search results.
- There are hundreds of WinSCP questions answered on Stack Overflow and Super User sites.
- Make sure you are using the latest version of WinSCP.
- If some feature of WinSCP is not working as you expect, check the documentation of the respective dialog box (use Help button). You may be missing a configuration option or may not understand what the feature actually does.
- If you wonder why some feature of WinSCP is or not available (is disabled/grayed), check the documentation of the respective dialog box (use Help button).
When you are not able to connect to the server:
- Make sure you use protocol that the server supports.
- Read guide for connecting to FTP/SFTP server.
- Try if you can connect with other clients using the same protocol.
- If you can connect with another client, see Why is WinSCP not able to connect to a server, when other clients are?.
- When using SFTP/SCP, it may be useful to try to connect with an SSH terminal client (such as PuTTY). You may get some useful messages back on the terminal screen.
- Check other F.A.Q. on connection.
- If you are getting an error message, check the list of common error messages.
- If the server refuses to accept your connection or drops the connection suddenly, you should better check the server (e.g. its log file) first to find out the reason. Contact the server administrator if you cannot check the server yourself.
When you are facing issue with scripting/automation:
- Read guide for automation/scripting and other related guides.
- Check F.A.Q. on scripting/automation.
- If you are getting an error message, check the list of common error messages.
- Turn on session logging using
/log
command-line switch and check the generated log file to see, if WinSCP actually does what you want it to do. IF you are having problems with password authentication, enable password logging using/loglevel=*
command-line switch and check the log, if a correct password is being used. - If no session log is created, chances are that some error prevented WinSCP from starting, creating a log, or starting a session. Check WinSCP console output for any error. It is recommended to execute
winscp.com
from existing console window (such as from Windowscmd.exe
). Thewinscp.com
inherits the console1 and when it exits with an error, the error is preserved on the console, allowing you to inspect it. - See also Debugging transfer task running in Windows Scheduler, SSIS, or another automation service.
- If you cannot log in or transfer the file using a script, yet you can log in or transfer the file in GUI, see Why I cannot connect/transfer using script, when I can using GUI (or vice versa)?
When the file timestamps you see in file panels are not what you expect them to be; or synchronization does not work:
- Read documentation on timestamps.
- Read about common problems causing synchronization not to work.
- With SFTP and FTP2 protocols, both client and server need to use UTC timestamps.
- Common problem is that the server misinterprets the UTC timestamps.
- To see how WinSCP and the server communicate the timestamps, turn on session logging and check the generated log file.
When inspecting the session log, look for following entries:
- Directory listing, including UTC file modification timestamps:
..;D;0;2013-04-24T08:43:23.000Z;"" [0];"" [0];rw-rw-rw-;1 .htaccess;-;33;2004-11-10T20:46:46.000Z;"" [0];"" [0];rw-rw-rw-;3 commandline.txt;-;9390;2013-04-15T09:01:52.000Z;"" [0];"" [0];rw-rw-rw-;1 config.txt;-;4490;2013-04-17T06:31:36.000Z;"" [0];"" [0];rw-rw-rw-;1 contributions.txt;-;1865;2012-08-24T07:08:58.000Z;"" [0];"" [0];rw-rw-rw-;1 directory_cache.txt;-;1892;2011-07-30T18:24:52.000Z;"" [0];"" [0];rw-rw-rw-;1 dragext.txt;-;4329;2013-04-09T11:50:48.000Z;"" [0];"" [0];rw-rw-rw-;1
- Modification timestamp being set on target file after file transfer (SFTP):
Preserving timestamp [2009-02-26T21:15:50.000Z]
- Timestamp comparing during synchronization:
Local file 'D:\Documents\wiki\config.txt' [2013-04-24T09:41:04.922Z] [4546] is modified comparing to remote file '/home/martinp/httpdocs/wiki/config.txt' [2013-04-17T06:31:36.000Z] [4490]
If this does not help you, and you decide to seek support, make sure you include a complete session log in your report, showing the above entries. Also mention a specific file that demonstrates the problem, what timestamp and behavior do you see; and what did you expect and why.
Learn what support you may get to WinSCP.