Post a reply

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

Guest

Troubleshooting SFTP Connections
Verify that the server you are connecting to supports SFTP connections (see Note below).
Verify the connection port.
Try toggling the compression options in the SSH2 Security page.
Verify the authentication mechanism supported and required by the server.

This may help you,
Rachel Gomez
Identis

Re: SFTP script error

Firewall disabled :(
martin

Re: SFTP script error

I indeed cannot see any difference. For a test, try to disable your firewall.
Guest

Re: SFTP script error

Adding logs.
martin

Re: SFTP script error

So please post complete logs for all scenarios.
Identis

Re: SFTP script error

Yes I can connect with WinSCP GUI without problem. And if I run script with PowerShell manually it's working. But with Task Scheduler it's failing randomly (it can fail every second run or 2-3 times from 5).
martin

Re: SFTP script error

Can you connect to that SFTP server anyhow from that specific local machine? Using WinSCP GUI? Using any other SFTP client?
Identis

Different errors:
* 2022-10-31 10:56:32.730 **Timeout waiting for server to respond.**
. 2022-10-31 10:56:32.730 Closing connection.
< 2022-10-31 10:56:32.730 Script: Timeout waiting for server to respond.
-------------------------------------------------------------------------
< 2022-10-31 11:10:19.280 Script: Host is not communicating for more than 15 seconds.
< 2022-10-31 11:10:19.280 Still waiting...
< 2022-10-31 11:10:19.280 Note: If the problem repeats, try turning off 'Optimize connection buffer size'.
< 2022-10-31 11:10:19.280 Warning: Aborting this operation will close connection!
. 2022-10-31 11:10:22.421 Data has arrived, closing query to user.
. 2022-10-31 11:10:22.421 Answer: OK
. 2022-10-31 11:10:22.421 Network error: Software caused connection abort
< 2022-10-31 11:10:22.421 Script: Network error: Software caused connection abort
< 2022-10-31 11:10:22.421 Cannot initialize SFTP protocol. Is the host running an SFTP server?
-------------------------------------------------------------------------------
. 2022-10-31 11:50:18.898 Wait for another 15 seconds?** ()
< 2022-10-31 11:50:18.898 Script: Host is not communicating for more than 15 seconds.
< 2022-10-31 11:50:18.898 Still waiting...
< 2022-10-31 11:50:18.898 Note: If the problem repeats, try turning off 'Optimize connection buffer size'.
< 2022-10-31 11:50:18.898 Warning: Aborting this operation will close connection!
. 2022-10-31 11:51:33.319 Answer: No
. 2022-10-31 11:51:33.319 Attempt to close connection due to fatal exception:
* 2022-10-31 11:51:33.319 **Timeout waiting for server to respond.**
. 2022-10-31 11:51:33.319 Closing connection.
< 2022-10-31 11:51:33.319 Script: Timeout waiting for server to respond.
< 2022-10-31 11:51:33.319 Authentication log (see session log for details):
< 2022-10-31 11:51:33.319 Using username "paukstynas.sftp".
< 2022-10-31 11:51:33.319
< 2022-10-31 11:51:33.319 Authentication failed.
Identis

SFTP script error

Hello,
maybe you can help me. I get random time error about connection to SFTP. I'm running script with Task scheduler. If I run script manually I didn't receive error. Where is the problem?