Sftp put problem

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Sftp put problem

Post by cagatayucuzal »

Hello,
We putfiles from host to windows.
When we put files windows,the other system take the file and delete it.

as I understood COZ checks the file after put file,that's why we get error rc=exitcode=1 even files transfer succesfully (because other system delete it)

cozsftp> put '//xxx.xxx.xxx' /test/test1.txt
Uploading //xxx.xxx.xxx to /test/test1.txt
ZosSettings$I¨: Transfer options: clientcp=IBM-1026,linerule=crlf,mode=text,serv
ZosDataset$I¨: Opening dataset xxx.xxx.xxx for rea
$56.366¨ remote open(Ütest/test1.txtÜ): No such
ZosDataset$I¨: Closing dataset //xxx.xxx.xxx - 0 r
CoZBatch$I¨: returning rc=exitcode=1

is there any settings close control or can coz lock the file?

Regards
Cagatay
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Sftp put problem

Post by cagatayucuzal »

is there any update?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Sftp put problem

Post by dovetail »

Your messages seem to be truncated, but this:

$56.366¨ remote open(Ütest/test1.txtÜ): No such

means that the remote server returned a failure because there was no such directory and it could not open the file.
This is a problem with the file/directory name or with the remote server.
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Sftp put problem

Post by cagatayucuzal »

The process

host->central sftp server<->biztalk server


host sends the file central sftp server. and biztalk server cut the file from there.

we can see file biztalk server after job finished with exit code=1

is there any comment?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Sftp put problem

Post by dovetail »

The error message shows that Co:Z SFTP send an "FX_OPEN" packet to the remote SFTP server and that it returned an error "No such file".

This is a problem with the remote server, or maybe the directory is simply not found. It is not a Co:Z SFTP server.
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Sftp put problem

Post by cagatayucuzal »

There is file and folder, it is certain. we checked it.

coz sftp batch after send the file remote machine, check the file?

we get error jcl even file transfer is succesful.


Regards

Cagatay
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Sftp put problem

Post by dovetail »

The log that you posted only shows that it *tried* to upload a file but the remote file open failed, so I don't see any evidence (in the log that you supplied) that a file was sent.

Please rerun this, but add tracing/logging options to the beginning of your script:

export COZ_LOG=T
sftp_options="$sftp_options -vvv "

Then, download entire output from the job and email it along with the input JCL and script to info@dovetail.com and we will review it.
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Sftp put problem

Post by cagatayucuzal »

can we take logs specied for this job?
I known that if I add all jobs "$sftp_options -vvv "it increases sftp time
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Sftp put problem

Post by dovetail »

I suggest that you only modify one job and run a test with tracing on.
You can test with a small data set if you are concerned about the amount of tracing output.
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Sftp put problem

Post by cagatayucuzal »

the problem accuar again

cozsftp> cd /Folder/Folder2
cozsftp> put '//xxx.xxx.xxx' test1.txt
Uploading //xxx.xxx.xxx to /Folder/Folder2/test1.txt
ZosDataset$I¨: Opening dataset xxx.xxx.xxx for rea......
remote open(Ü/Folder/Folder2/test1.txtÜ): No such file or directory


this is certain that , there is folder on remote folder
application server delete folder which put from host
host -> windows sftp server -> application server

is that about it?

regards
Cagatay
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Sftp put problem

Post by dovetail »

This message:

remote open("/Folder/Folder2/test1.txt"): No such file or directory

means that Co:Z SFTP sent an FXP_OPEN command to the remote server and that the server returned an error "No such file or directory".

Check the server logs for the failing cause or reason.
Post Reply