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

No replies? :(
Ray_Smith

Wait for another 15 seconds?

Hello! I've read about this error around the forum but nothing I've tried have worked for me...

My script is:
"C:\WinSCP.exe" /log=C:\LogFiles\winscp.log /command "open scp://user:passwd@server" "put C:\file.txt /home/user/folder/" "call sh /home/user/folder/script.sh" "exit"

And the log say:
. 2017-01-25 12:11:32.497 --------------------------------------------------------------------------

. 2017-01-25 12:11:32.497 WinSCP Version 5.9.3 (Build 7136) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Enterprise)
. 2017-01-25 12:11:32.497 Configuration: C:\WinSCP.ini
. 2017-01-25 12:11:32.497 Log level: Normal
. 2017-01-25 12:11:32.497 Local account: XXX
. 2017-01-25 12:11:32.497 Working directory: XXX
. 2017-01-25 12:11:32.497 Process ID: 4768
. 2017-01-25 12:11:32.497 Command-line: "C:\WinSCP.exe" /log=C:\LogFiles\winscp.log /command "open scp://user:password@server" "put C:\file.txt /home/user/folder/" "call sh /home/user/folder/script.sh" "exit"
. 2017-01-25 12:11:32.497 Time zone: Current: GMT+1, Standard: GMT+1 (W. Europe Standard Time), DST: GMT+2 (W. Europe Daylight Time), DST Start: 3/26/2017, DST End: 10/29/2017
. 2017-01-25 12:11:32.497 Login time: Wednesday, January 25, 2017 12:11:32 PM
. 2017-01-25 12:11:32.497 --------------------------------------------------------------------------
. 2017-01-25 12:11:32.497 Script: Retrospectively logging previous script records:
> 2017-01-25 12:11:32.497 Script: open scp://user:password@server
. 2017-01-25 12:11:32.497 --------------------------------------------------------------------------
. 2017-01-25 12:11:32.497 Session name: user@password (Ad-Hoc site)
. 2017-01-25 12:11:32.497 Host name: server (Port: 22)
. 2017-01-25 12:11:32.497 User name: user (Password: Yes, Key file: No, Passphrase: No)
. 2017-01-25 12:11:32.497 Tunnel: No
. 2017-01-25 12:11:32.497 Transfer Protocol: SCP
. 2017-01-25 12:11:32.497 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2017-01-25 12:11:32.497 Disable Nagle: No
. 2017-01-25 12:11:32.497 Proxy: None
. 2017-01-25 12:11:32.497 Send buffer: 262144
. 2017-01-25 12:11:32.497 SSH protocol version: 2; Compression: No
. 2017-01-25 12:11:32.497 Bypass authentication: No
. 2017-01-25 12:11:32.497 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-01-25 12:11:32.497 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-01-25 12:11:32.497 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2017-01-25 12:11:32.497 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2017-01-25 12:11:32.497 Simple channel: Yes
. 2017-01-25 12:11:32.497 Return code variable: Autodetect; Lookup user groups: Auto
. 2017-01-25 12:11:32.497 Shell: default
. 2017-01-25 12:11:32.497 EOL: LF, UTF: Auto
. 2017-01-25 12:11:32.497 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2017-01-25 12:11:32.497 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-01-25 12:11:32.497 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-01-25 12:11:32.497 Cache directory changes: Yes, Permanent: Yes
. 2017-01-25 12:11:32.497 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2017-01-25 12:11:32.497 DST mode: Unix;Timezone offset: 0h 0m
. 2017-01-25 12:11:32.497 --------------------------------------------------------------------------
. 2017-01-25 12:11:32.497 Looking up host "server" for SSH connection
. 2017-01-25 12:11:32.497 Connecting to IPaddress port 22
. 2017-01-25 12:11:32.497 We claim version: SSH-2.0-WinSCP_release_5.9.3
. 2017-01-25 12:11:32.887 Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
. 2017-01-25 12:11:32.887 We believe remote version has SSH-2 channel request bug
. 2017-01-25 12:11:32.887 Using SSH protocol version 2
. 2017-01-25 12:11:32.887 Have a known host key of type ssh-ed25519
. 2017-01-25 12:11:32.887 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2017-01-25 12:11:33.339 Server also has ecdsa-sha2-nistp256/ssh-dss/ssh-rsa host keys, but we don't know any of them
. 2017-01-25 12:11:33.339 Host key fingerprint is:
. 2017-01-25 12:11:33.339 ssh-ed25519 256 XXX
. 2017-01-25 12:11:33.339 Verifying host key ssh-ed25519 XXX with fingerprint ssh-ed25519 256 XXX
. 2017-01-25 12:11:33.339 Host key matches cached key
. 2017-01-25 12:11:33.339 Initialised AES-256 SDCTR client->server encryption
. 2017-01-25 12:11:33.339 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2017-01-25 12:11:33.339 Initialised AES-256 SDCTR server->client encryption
. 2017-01-25 12:11:33.339 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2017-01-25 12:11:33.386 Using username "user".
. 2017-01-25 12:11:33.402 Server offered these authentication methods: publickey,password
. 2017-01-25 12:11:33.402 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2017-01-25 12:11:33.402 Using stored password.
. 2017-01-25 12:11:33.402 Sent password
. 2017-01-25 12:11:33.417 Access granted
. 2017-01-25 12:11:33.417 Opening session as main channel
. 2017-01-25 12:11:33.511 Opened main channel
. 2017-01-25 12:11:33.511 Started a shell/command
. 2017-01-25 12:11:33.511 --------------------------------------------------------------------------
. 2017-01-25 12:11:33.511 Using SCP protocol.
. 2017-01-25 12:11:33.511 Doing startup conversation with host.
. 2017-01-25 12:11:33.511 Skipping host startup message (if any).
> 2017-01-25 12:11:33.511 echo "WinSCP: this is end-of-file:0"
< 2017-01-25 12:11:33.511 Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-63-generic x86_64)
< 2017-01-25 12:11:33.511  * Documentation:  https://help.ubuntu.com/
< 2017-01-25 12:11:33.511 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.511 Detecting variable containing return code of last command.
. 2017-01-25 12:11:33.511 Trying "$status".
> 2017-01-25 12:11:33.511 echo "$status" ; echo "WinSCP: this is end-of-file:0"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.527 The response is not numerical exit code
. 2017-01-25 12:11:33.527 Trying "$?".
> 2017-01-25 12:11:33.527 echo "$?" ; echo "WinSCP: this is end-of-file:0"
< 2017-01-25 12:11:33.527 0
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.527 Return code variable "$?" selected.
> 2017-01-25 12:11:33.527 printenv LANG ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 en_US.UTF-8
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.527 We will use UTF-8
. 2017-01-25 12:11:33.527 Clearing all aliases.
> 2017-01-25 12:11:33.527 unalias "ls" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 5: unalias: ls: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "echo" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 6: unalias: echo: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "pwd" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 7: unalias: pwd: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "cd" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 8: unalias: cd: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "groups" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 9: unalias: groups: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "scp" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 10: unalias: scp: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "rm" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 11: unalias: rm: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "mv" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 12: unalias: mv: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "mkdir" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 13: unalias: mkdir: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "chmod" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 14: unalias: chmod: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "chgrp" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 15: unalias: chgrp: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "chown" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 16: unalias: chown: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "unset" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 17: unalias: unset: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "unalias" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 18: unalias: unalias: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "ln" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 19: unalias: ln: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "cp" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 20: unalias: cp: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
> 2017-01-25 12:11:33.527 unalias "printenv" ; echo "WinSCP: this is end-of-file:$?"
! 2017-01-25 12:11:33.527 -bash: line 21: unalias: printenv: not found
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:1
. 2017-01-25 12:11:33.527 Clearing national user variables.
> 2017-01-25 12:11:33.527 unset "LANG" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LANGUAGE" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_CTYPE" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_COLLATE" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_MONETARY" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_NUMERIC" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_TIME" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_MESSAGES" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "LC_ALL" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:33.527 unset "HUMAN_BLOCKS" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.527 Looking up groups and users.
> 2017-01-25 12:11:33.527 groups ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 bitnami adm dialout cdrom floppy audio dip video plugdev netdev admin
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.527 Following groups found:
. 2017-01-25 12:11:33.527   "mygroup" [0]
. 2017-01-25 12:11:33.527   "adm" [0]
. 2017-01-25 12:11:33.527   "dialout" [0]
. 2017-01-25 12:11:33.527   "cdrom" [0]
. 2017-01-25 12:11:33.527   "floppy" [0]
. 2017-01-25 12:11:33.527   "audio" [0]
. 2017-01-25 12:11:33.527   "dip" [0]
. 2017-01-25 12:11:33.527   "video" [0]
. 2017-01-25 12:11:33.527   "plugdev" [0]
. 2017-01-25 12:11:33.527   "netdev" [0]
. 2017-01-25 12:11:33.527   "admin" [0]
. 2017-01-25 12:11:33.527 Following membership found:
. 2017-01-25 12:11:33.527   "user" [0]
. 2017-01-25 12:11:33.527   "adm" [0]
. 2017-01-25 12:11:33.527   "dialout" [0]
. 2017-01-25 12:11:33.527   "cdrom" [0]
. 2017-01-25 12:11:33.527   "floppy" [0]
. 2017-01-25 12:11:33.527   "audio" [0]
. 2017-01-25 12:11:33.527   "dip" [0]
. 2017-01-25 12:11:33.527   "video" [0]
. 2017-01-25 12:11:33.527   "plugdev" [0]
. 2017-01-25 12:11:33.527   "netdev" [0]
. 2017-01-25 12:11:33.527   "admin" [0]
. 2017-01-25 12:11:33.527 No users found.
. 2017-01-25 12:11:33.527 Getting current directory name.
> 2017-01-25 12:11:33.527 pwd ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 /home/user
< 2017-01-25 12:11:33.527 WinSCP: this is end-of-file:0
. 2017-01-25 12:11:33.527 Startup conversation with host finished.
< 2017-01-25 12:11:33.527 Script: Active session: [1] user@server
> 2017-01-25 12:11:33.527 Script: put C:\file.txt /home/user/folder/
. 2017-01-25 12:11:33.527 Copying 1 files/directories to remote directory "/home/user/folder/"
. 2017-01-25 12:11:33.527   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2017-01-25 12:11:33.527   TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2017-01-25 12:11:33.527   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
> 2017-01-25 12:11:33.527 echo "WinSCP: this is begin-of-file" ; scp -r  -d -t "/home/bitnami/ODM2006" ; echo "WinSCP: this is end-of-file:$?"
< 2017-01-25 12:11:33.527 WinSCP: this is begin-of-file
. 2017-01-25 12:11:33.527 SCP remote side confirmation (0)
. 2017-01-25 12:11:33.527 File: "C:\file.txt"
. 2017-01-25 12:11:33.527 File: 'C:\file.txt' [2017-01-25T11:00:17.888Z] [44522303]
. 2017-01-25 12:11:33.527 Copying "C:\file.txt" to remote directory started.
. 2017-01-25 12:11:33.527 Binary transfer mode selected.
> 2017-01-25 12:11:33.527 T1485342017 0 1483544573 0
. 2017-01-25 12:11:33.527 SCP remote side confirmation (0)
> 2017-01-25 12:11:33.527 C0644 44522303 imp.log
. 2017-01-25 12:11:33.527 SCP remote side confirmation (0)
. 2017-01-25 12:11:33.527 Sending BINARY data (first block, 32768 bytes)
. 2017-01-25 12:11:34.619 Sending NULL.
. 2017-01-25 12:11:34.619 SCP remote side confirmation (0)
. 2017-01-25 12:11:34.619 Transfer done: 'C:\file.txt' [44522303]
. 2017-01-25 12:11:34.619 Copying "C:\file.txt" to remote directory finished.
> 2017-01-25 12:11:34.619 E
. 2017-01-25 12:11:34.619 SCP remote side confirmation (0)
< 2017-01-25 12:11:34.619 WinSCP: this is end-of-file:0
> 2017-01-25 12:11:34.619 Script: call sh /home/user/folder/script.sh
. 2017-01-25 12:11:34.619 Executing user defined command.
> 2017-01-25 12:11:34.619 sh /home/user/folder/script.sh ; echo "WinSCP: this is end-of-file:$?"
. 2017-01-25 12:11:51.061 Waiting for data timed out, asking user what to do.
. 2017-01-25 12:11:51.061 Asking user:
. 2017-01-25 12:11:51.061 **Host is not communicating for 15 seconds.
. 2017-01-25 12:11:51.061
. 2017-01-25 12:11:51.061 Wait for another 15 seconds?** ()
< 2017-01-25 12:11:51.061 Script: Host is not communicating for more than 15 seconds.
< 2017-01-25 12:11:51.061 Still waiting...
< 2017-01-25 12:11:51.061 Note: If the problem repeats, try turning off 'Optimize connection buffer size'.
< 2017-01-25 12:11:51.061 Warning: Aborting this operation will close connection!
. 2017-01-25 12:12:52.508 Attempt to close connection due to fatal exception:
* 2017-01-25 12:12:52.508 **Terminated by user.**
. 2017-01-25 12:12:52.508 Closing connection.
. 2017-01-25 12:12:52.508 Sending special code: 12
. 2017-01-25 12:12:52.508 Sent EOF message
< 2017-01-25 12:12:52.508 Script: Terminated by user.
! 2017-01-25 12:12:52.508 [sudo] password for user:


Many thanks for your help!!