I am using the CO:Z FTP server on MVS... I am trying to put to a dataset on the MVS server from an MVS CO:Z client batch job... The dataset that I am trying to put to has the following attributes:
Organization . . . : PS
Record format . . . : FB
Record length . . . : 0
Block size . . . . : 0
1st extent megabytes: 20
I realize that these are bad attributes... But when I try the transfer, I get the following on the clients error log:
cozsftp> put //DD:DOWNLOAD //D.SYP.TABAUDIT.RETURN.BACK
Uploading //DD:DOWNLOAD to //D.SYP.TABAUDIT.RETURN.BACK
ZosDatasetÝI¨: Opening dataset DD:DOWNLOAD for read
Ý33.969¨ Couldn't get handle: Failure
ZosDatasetÝI¨: Closing dataset //DD:DOWNLOAD - 0 records read, 0 bytes sent
debug2: channel 0: read<=0 rfd 4 len 0
On the server side the log shows:
debug1: subsystem: exec() /u/coz/bin/sftp-server.sh
debug2: fd 14 setting O_NONBLOCK
debug2: fd 13 setting O_NONBLOCK
debug3: channel 0: close_fds r -1 w -1 e -1
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: read<=0 rfd 14 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug1: Received SIGCHLD.
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
debug2: notify_done: reading
I resolved the problem by deleting the bad dataset on the server...
But, my question is: Why aren't there better messages to describe the problem?
Tom Buchwalter
Couldn't get handle: Failure
The server side log messages (debug1, etc) are coming from the OpenSSH part of Co:Z sftp-server. Depending on how you have your logging configured, you are probably getting these from syslogd on your server.
For Co:Z sftp server, the z/OS specific logging goes to a per-session logfile, which by default is /tmp/sftp-server.<userid>.<dd.tttt>.log
If you look at this log file, you find more information about the failure.
Also, for convenience, the remote sftp client can download the logfile for the current session by doing:
Many people have asked why the client doesn't automatically see all of the error messages, and instead only "invalid handle". This is because the SFTP packet protocol doesn't allow for arbitrary messages, only a small set of error codes.
PS> You can also direct the OpenSSH debug messages to this log file by setting this in your profile:
This will cause the OpenSSH debug messages to be merged into the Co:Z session log file, and not go to syslogd.
For Co:Z sftp server, the z/OS specific logging goes to a per-session logfile, which by default is /tmp/sftp-server.<userid>.<dd.tttt>.log
If you look at this log file, you find more information about the failure.
Also, for convenience, the remote sftp client can download the logfile for the current session by doing:
Code: Select all
get /+error.log
PS> You can also direct the OpenSSH debug messages to this log file by setting this in your profile:
Code: Select all
export SFTP_SERVER_OPTIONS="-e"