In correct IP address used in SMF record and log message

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
giltjr
Posts: 25
Joined: Wed Jul 07, 2010 9:06 pm

In correct IP address used in SMF record and log message

Post by giltjr »

While doing some research we found that in some instances COZSFTPC is putting the wrong IP address in the SMF record and in the Connection Established message. Below are two examples.

In the FOTS2274 message it shows the host name and the correct IP address that it resolves to. However in the "Connection established" message it show a totally different IP address. The SMF record also shows the incorrect IP address.

We know the files are getting to the correct host because the remote site is not reporting any missing files and if the were to miss a file the would notify us quickly.

It does not happen often I have found about 10 instances over the last 5 weeks and over 360,000 file transfers.

Any ideas? Anybody else reporting this?

Example #1:

User ID is = atpcop_pdc
Remote Server is = PDCEXTTransfer001.aa.com
Port is =-oPort=22
Wed Sep 14 08:17:48 EDT 2022
cozsftp> lzopts mode=binary
mode=binary
cozsftp> cd /Transfer/ATPCO/Mercury/Prod/ATPCOHourly/Inbound
cozsftp> put //DD:DOWNLOAD QAA.PROD.S03SCNC.D220914.T0800.zip
Uploading //DD:DOWNLOAD to /Transfer/ATPCO/Mercury/Prod/ATPCOHourly/Inbound/QAA.PROD.S03SCNC.D220914.T0800.zip
cozsftp> put //DD:EMPTY QAA.PROD.S03SCNC.D220914.T0800.trig
Uploading //DD:EMPTY to /Transfer/ATPCO/Mercury/Prod/ATPCOHourly/Inbound/QAA.PROD.S03SCNC.D220914.T0800.trig
Wed Sep 14 08:24:07 EDT 2022
Return Code: 0
FILE> CTMFTP.FP$AA326.J0778659.D0000112.?,2022.257,08:24:33 <FILE
Co:Z SFTP version: 7.0.2 (8.4p1) 2022-01-11
Copyright (C) Dovetailed Technologies, LLC. 2008-2022. All rights reserved.
Connecting to PDCEXTTransfer001.aa.com...
FOTS2274 Warning: Permanently added 'pdcexttransfer001.aa.com,144.9.46.173' (RSA) to the list of known hosts.

Connected to PDCEXTTransfer001.aa.com.
Connection established, local_addr=172.16.206.101 local_port=63676 remote_addr=114.251.243.33 remote_port=65522
ZosSettings.I.: Transfer options: gdgnt,mode=binary
ZosDataset.I.: Opening dataset DD:DOWNLOAD for read
ZosDataset.I.: Closing dataset //QAA.PROD.DIRSCONU.S07.AAA1.D220914.T0800.Z - 19128 records read, 535367647 bytes sent
ZosSettings.I.: Transfer options: gdgnt,mode=binary
ZosDataset.I.: Opening dataset DD:EMPTY for read
ZosDataset.I.: Closing dataset //DD:EMPTY - 0 records read, 0 bytes sent


Example 2:

User ID is = engumpub
Remote Server is = transfer.atpco.local
Port is =-oPort=22
Thu Sep 15 20:09:21 EDT 2022
cozsftp> lzopts mode=binary
mode=binary
cozsftp> -rm Q82B.PROD.S06SGJC.D220915.T2000.zip
Removing /Q82B.PROD.S06SGJC.D220915.T2000.zip
cozsftp> put //DD:DOWNLOAD Q82B.PROD.S06SGJC.D220915.T2000.tmp
Uploading //DD:DOWNLOAD to /Q82B.PROD.S06SGJC.D220915.T2000.tmp
cozsftp> rename Q82B.PROD.S06SGJC.D220915.T2000.tmp Q82B.PROD.S06SGJC.D220915.T2000.zip
Thu Sep 15 20:09:28 EDT 2022
Return Code: 0
FILE> CTMFTP.FP82B630.J0891624.D0000112.?,2022.258,20:10:06
Co:Z SFTP version: 7.0.2 (8.4p1) 2022-01-11
Copyright (C) Dovetailed Technologies, LLC. 2008-2022. All rights reserved.
Connecting to transfer.atpco.local...
FOTS2274 Warning: Permanently added 'transfer.atpco.local,10.103.69.209' (RSA) to the list of known hosts.

Connected to transfer.atpco.local.
Connection established, local_addr=172.16.206.101 local_port=14751 remote_addr=114.251.243.33 remote_port=65522
.20:09:26.944441. Couldn't delete file: No such file or directory
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Re: In correct IP address used in SMF record and log message

Post by coz »

If you can reproduce this issue, re-run your job (assuming it is a batch job) with tracing. If you are using the Co:Z sample batch scripts, you would add the following to your job's SFTPIN DD *before* the call to sftp_connect.sh (or sftp_get.sh, etc):

export COZ_LOG=SshSocketInfo=F
sftp_opts="$sftp_opts -vvv"

If you aren't using the sample scripts, you will need to set this information according to your job setup.

Once you have re-run, send the entire job log to info@coztoolkit.com and we'll take a look.
Post Reply