BIZLINK SFTP issue

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
apesce
Posts: 10
Joined: Thu Mar 29, 2012 3:26 pm

BIZLINK SFTP issue

Post by apesce »

Anyone have any issues using BIZLINK SFTP settings and CO:Z? It appears that my SFTP settings are not being honored.
I have files on my Bizlink server that FTP up to our mainframe. We just installed a new version of BIZLINK that supports
SFTP. When I try and SFTP to the mainframe, the files get transferred, but the settings are not honored. I have tried
issue site commands and tried using the translations of TEXT files. The files get sent with a recfm=u and lrecl of 6144.
The data is not being converted to EBCDIC. I am seeing ASCII (20) in fields. In the commands before execution, I try
and do "ls /+mode=text" and it doesn't seem to honor that. Any suggestions?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: BIZLINK SFTP issue

Post by dovetail »

The best place to start diagnosing this problem is to verify what is being sent by this client to the Co:Z SFTP server.

To do this, enable tracing in the user-specific Co:Z SFTP Server configuration file
(see: http://dovetail.com/docs/sftp/config.ht ... _server_rc)

by adding or uncommenting these lines:

export SFTP_SERVER_OPTIONS="-e -l debug3"
export COZ_LOG=T

This will cause a trace to be written to each session log file for this userid. So, you may not want to do this in production if this userid is shared with a bunch of jobs/sites.

By default, the session log file(s) are written to files named:

/tmp/sftp-server.<userid>.<timestamp>.<pid>.log
apesce
Posts: 10
Joined: Thu Mar 29, 2012 3:26 pm

Re: BIZLINK SFTP issue

Post by apesce »

OK. I was able to do that and saw the commands executed by the BIZLINK product.
However for every command that was entered, it received a "not found" message.
I am running with "COZ_SFTP=true". I was able to get it to execute a script. In the
command I entered "/u/edimfu/.ssh/sftp-server.rc". This worked and I was able
to set the mode=text. Now to figure out how to put in for lrecl, blksize, and recfm!
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: BIZLINK SFTP issue

Post by dovetail »

It would be helpful to see the session log to undestand what/why commands were not found. Please feel free to post here, excluding any confidential information.
apesce
Posts: 10
Joined: Thu Mar 29, 2012 3:26 pm

Re: BIZLINK SFTP issue

Post by apesce »

Here is the trace:
Co:Z SFTP Server version: 1.10.1 (5.0p1) 2011-11-07
Copyright (C) Dovetailed Technologies, LLC. 2011. All rights reserved.
ZosSettingsÝT¨: -> readConfiguration()
ZosSettingsÝT¨: -> processConfigurationFile(/u/edimfu/.ssh/cozsftp_server_config
ZosSettingsÝD¨: no configuration file (/u/edimfu/.ssh/cozsftp_server_config) fou
ZosSettingsÝT¨: <- processConfigurationFile()
ZosSettingsÝT¨: -> processConfigurationFile(/etc/ssh/cozsftp_server_config)
ZosSettingsÝT¨: processConfigurationFile: Processing fixed: configuration fil
ZosSettingsÝT¨: processConfigurationFile: Processing default: configuration f
ZosSettingsÝT¨: <- processConfigurationFile()
ZosSettingsÝT¨: <- readConfiguration()
ZosSettingsÝE¨: Unknown option: 'recmf'
ZosExitInterfaceÝT¨: -> checkCommand(SITE LRECL=840)
ZosExitInterfaceÝT¨: <- checkCommand(true (module not available))
ZosUtilÝT¨: -> zos_log_region_size()
ZosUtilÝD¨: region size requested = 55296K, Actual below/above limit = 10216K /
ZosUtilÝT¨: <- zos_log_region_size()
Ý84.200¨ session opened for local user EDIMFU from Ý169.198.76.218¨
ZosExitInterfaceÝT¨: -> checkIP()
ZosExitInterfaceÝT¨: checkIP: unable to load CZCHKIP - EDC5239S Fetched modul
ZosExitInterfaceÝT¨: <- checkIP(true (module not found))
ZosExitInterfaceÝT¨: -> checkPwd()
ZosExitInterfaceÝT¨: checkPwd: unable to load CZCHKPWD - EDC5239S Fetched mod
ZosExitInterfaceÝT¨: <- checkPwd(true (module not found))
Ý84.201¨ received client version 4
Ý84.203¨ realpath "."
Ý84.204¨ debug1: request 1: sent names count 1
Ý84.206¨ realpath "."
Ý84.206¨ debug1: request 2: sent names count 1
Ý90.007¨ realpath "/u/edimfu/dummy"
Ý90.008¨ sent status No such file
Ý90.009¨ realpath "/u/edimfu///tsftp.ap.utility3.iface(+1)"
Ý90.009¨ sent status No such file
Ý90.011¨ open "//tsftp.ap.utility3.iface(+1)" flags WRITE,CREATE,TRUNCATE mode 0
ZosExitInterfaceÝT¨: -> checkCommandWithFileArg(STOR //tsftp.ap.utility3.iface(
ZosExitInterfaceÝT¨: <- checkCommandWithFileArg(true (module not available))
ZosDatasetÝT¨: -> open("//tsftp.ap.utility3.iface(+1)", 0x0091, 0x01B6)
CatalogSearchÝD¨: filterKey="TSFTP.AP.UTILITY3.IFACE"
CatalogSearchÝT¨: -> search()
CatalogSearchÝT¨: search: total_length=1024, min_required=0, used=168, num_fi
CatalogSearchÝT¨: <- search()
DatasetHandlerÝT¨: -> setDSN(TSFTP.AP.UTILITY3.IFACE(+1))
DatasetHandlerÝT¨: <- setDSN(effectiveDSN=TSFTP.AP.UTILITY3.IFACE(+1))
ZosDatasetÝI¨: Opening dataset TSFTP.AP.UTILITY3.IFACE(+1) for write with option
DatasetHandlerÝT¨: -> open()
DatasetHandlerÝT¨: <- open()
ZosDatasetÝT¨: <- open()
Ý90.164¨ debug1: request 5: sent handle handle 0
Ý90.183¨ debug1: request 6: write "//tsftp.ap.utility3.iface(+1)" (handle 0) off
ZosDatasetÝT¨: -> write(off=0 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=39, totalBytesWritten=32768)
Ý90.188¨ sent status Success
Ý90.190¨ debug1: request 7: write "//tsftp.ap.utility3.iface(+1)" (handle 0) off
ZosDatasetÝT¨: -> write(off=32768 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=79, totalBytesWritten=65536)
Ý90.242¨ sent status Success
Ý90.243¨ debug1: request 8: write "//tsftp.ap.utility3.iface(+1)" (handle 0) off
ZosDatasetÝT¨: -> write(off=65536 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=118, totalBytesWritten=98304)
Ý90.251¨ sent status Success
Ý90.251¨ debug1: request 9: write "//tsftp.ap.utility3.iface(+1)" (handle 0) off
ZosDatasetÝT¨: -> write(off=98304 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=158, totalBytesWritten=131072)
Ý90.257¨ sent status Success
Ý90.258¨ debug1: request 10: write "//tsftp.ap.utility3.iface(+1)" (handle 0) of
ZosDatasetÝT¨: -> write(off=131072 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=197, totalBytesWritten=163840)
Ý90.293¨ sent status Success
Ý90.293¨ debug1: request 11: write "//tsftp.ap.utility3.iface(+1)" (handle 0) of
ZosDatasetÝT¨: -> write(off=163840 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=237, totalBytesWritten=196608)
Ý90.300¨ sent status Success
Ý90.300¨ debug1: request 12: write "//tsftp.ap.utility3.iface(+1)" (handle 0) of
ZosDatasetÝT¨: -> write(off=196608 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=277, totalBytesWritten=229376)
Ý90.307¨ sent status Success
Ý90.307¨ debug1: request 13: write "//tsftp.ap.utility3.iface(+1)" (handle 0) of
ZosDatasetÝT¨: -> write(off=229376 len=32768)
ZosDatasetÝT¨: <- write(32768, recordCount=316, totalBytesWritten=262144)
Ý90.315¨ sent status Success
Ý90.316¨ debug1: request 14: write "//tsftp.ap.utility3.iface(+1)" (handle 0) of
.
.then it writes about 40 records
.
Ý90.779¨ sent status Success
Ý90.780¨ debug1: request 39: write "//tsftp.ap.utility3.iface(+1)" (handle 0) of
ZosDatasetÝT¨: -> write(off=1081344 len=14100)
ZosDatasetÝT¨: <- write(14100, recordCount=1323, totalBytesWritten=1095444)
Ý90.783¨ sent status Success
Ý90.784¨ close "//tsftp.ap.utility3.iface(+1)" bytes read 0 written 1095444
ZosDatasetÝT¨: -> close( )
ZosDatasetÝT¨: -> write(off=1095444 len=0)
ZosDatasetÝT¨: <- write(0, recordCount=1323, totalBytesWritten=1095444)
ZosDatasetÝI¨: Closing dataset //TSFTP.AP.UTILITY3.IFACE(+1) - 1095444 bytes rec
DatasetHandlerÝT¨: -> close()
DatasetHandlerÝT¨: -> freeDD(SYS00007)
DatasetHandlerÝT¨: <- freeDD(rc=0)
DatasetHandlerÝT¨: <- close()
ZosDatasetÝT¨: <- close(rc=0)
DatasetHandlerÝT¨: -> close()
DatasetHandlerÝT¨: <- close()
ZosSmf119RecordÝD¨: Unable to send SMF 119 record to monitor socket "/var/log/co
ZosExitInterfaceÝT¨: -> postProcessExit()
ZosExitInterfaceÝT¨: postProcessExit: unable to load CZPOSTPR - EDC5239S Fetc
ZosExitInterfaceÝT¨: <- postProcessExit(true (module not loaded))
Ý90.813¨ sent status Success
Ý90.816¨ debug1: request 41: setstat name "//tsftp.ap.utility3.iface(+1)"
Ý90.816¨ sent status Success
apesce
Posts: 10
Joined: Thu Mar 29, 2012 3:26 pm

Re: BIZLINK SFTP issue

Post by apesce »

OK. I took my "sftp-server.rc" file that everyone uses and copied it into my
/u/edimfu/.ssh directory. I then changed the line:
export SFTP_ZOS_OPTIONS="mode=text,recfm=fb,lrecl=840"
to include the options that I want and it works great.
However, that means that any file that this user sends will get these attributes.
I need to be able to different files to have different attributes. I believe that is
where the cozsftp_config file comes in, but don't really understand how it works.
Does anyone have an example they can share?
Jhenry
Posts: 1
Joined: Wed Apr 22, 2015 2:19 am

Re: BIZLINK SFTP issue

Post by Jhenry »

Does the Uploading message appear to be correct, where it is appending the /DD:UPLOAD to the name? Would this be causing the "No such file or directory" message?
Post Reply