PDA

View Full Version : SLES 12 SP2 FTP issue after upgrading from SLES 11 SP4 to SLES 12 SP2



x0500hl
18-Sep-2017, 17:14
On September 5th, I upgraded one of my database servers from SLES 11 SP4 to SLES 12 SP2. I performed an upgrade in place.

The database admin let me know that he has been using a script (for years) to backup the DB2 database and FTP the backup to another server, if the backup is successful. The FTP is now failing with message

Wrapper for lftp to simulate compatibility with lukemftp
FTP failed. Return Code: 8

I chose the upgrade in place option to preserve all of the system settings (ssh keys, config files, etc.).

If I attempt to initiate an FTP from this same server I get "Wrapper for lftp to simulate compatibility with lukemftp" prior to the prompt for my login name.

If I attempt the initiate an FTP from a SLES 11 server I get a 'Connected to ..." message followed by that systems' ftp_banner.

What could be the cause of this issue?


Harley

ab
18-Sep-2017, 18:46
Just to be clear, you are okay with sending database information across
the wire without any kind of encryption? There are so many built-in,
secure, ubiquitous ways to transfer data using encryption that this makes
me cringe. Maybe the data mean nothing in any security context, but that
is so rare these days. Anyway....

A whole new major release (eleven (11) vs. twelve (12)) of the OS could
mean a lot of changes. I suppose I would start by figuring out what is
running, if the changelog documents the changes (probably does if you go
back far enough), and then find a new way to work with it, maybe by
dropping it and using something else entirely (scp/sftp/etc.). A few
commands that sometimes help:



alias | grep commandHere #see if an alias is involved
\commandHere #the backslash at the beginning disables alises

which commandHere #find the path to the command, and then:
rpm -qf $(which commandHere) #find the owning package
rpm -qif $(which commandHere) #get package Information
rpm -q --changelog -f $(which commandHere) #packge changelog info



--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

x0500hl
18-Sep-2017, 19:06
Hi Ab.

The data is being transferred on a private network within the data center. My Linux servers run under z/VM on the same mainframe that the data is being transferred to. The virtual servers don't have access to tape so the database backups are being FTP'ed to tape on a z/OS system. My clients' IT Governance team is VERY security conscious and approves of this.

I found that the FTP command on SLES 11 is a symbolic link to program pftp. Program pftp doesn't exist on SLES 12. The FTP command on SLES 12 is a symbolic link to program lftp.

I've spent the time before and after my first post searching Google and can't seem to figure out lftp. I will go and find the doc files what has changed with SLES 12 (and the SP's0 to see if that mentions anything.


Harley

ab
18-Sep-2017, 19:39
Could you post the commands you are/were using before, so we can try to
help come up wit equivalents for lftp? I presume you are trying to put
files elsewhere (on another server) and Google gave me some
promising-looking hits when I searched for 'lftp put file'.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

x0500hl
19-Sep-2017, 15:17
We were doing the standard FTP put command to call the file something different on the mainframe:

put filename.whatever mainframe-name

I found that the 'put' command under lftp requires switch '-o' between the filenames. A co-worker is performing the tests.

Thank you.

Franz Sirl
19-Sep-2017, 16:21
Am 2017-09-18 um 20:14 schrieb x0500hl:
> I found that the FTP command on SLES 11 is a symbolic link to program
> pftp. Program pftp doesn't exist on SLES 12. The FTP command on SLES
> 12 is a symbolic link to program lftp.

pftp is neither a SLES11 nor a SLES12 standard package. And on both 11
and 12 ftp is normally a symbolic link to lftp_wrapper (via
/etc/alternatives). So I guess someone installed pftp manually and
changed the symbolic link? And the SLES12 install reverted it back to
the default?

Franz.

ab
20-Sep-2017, 02:39
Looks like you have it figured out; thanks for posting back your results.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

x0500hl
20-Sep-2017, 14:03
Am 2017-09-18 um 20:14 schrieb x0500hl:
> I found that the FTP command on SLES 11 is a symbolic link to program
> pftp. Program pftp doesn't exist on SLES 12. The FTP command on SLES
> 12 is a symbolic link to program lftp.

pftp is neither a SLES11 nor a SLES12 standard package. And on both 11
and 12 ftp is normally a symbolic link to lftp_wrapper (via
/etc/alternatives). So I guess someone installed pftp manually and
changed the symbolic link? And the SLES12 install reverted it back to
the default?

Franz.

Franz,

I appreciate the response, thank you.

We did a clean install of SLES 11 (base) shortly after it was released and never installed a different package. I found that /usr/bin/pftp is part of package lukemftp-1.5-725.17 (command "rpm -qf /usr/bin/pftp") which was installed "Wed Dec 30 08:04:59 2009". This date is the oldest date for command "rpm -qa --last", and there are many screens of rpm files that were installed on that date.

On one of my SLES 11 systems, which were all cloned from a single golden-image and were upgraded from base to SP1, SP2, SP3, to SP4, the /usr/bin directory contains (all files containing 'ftp'):

lrwxrwxrwx 1 root root 21 Dec 30 2009 ftp -> /etc/alternatives/ftp
-rwxr-xr-x 1 root root 598 May 28 2009 ftp-rfc
-rwxr-xr-x 1 root root 10536 Jun 9 2015 ftpatchk
-rwxr-xr-x 1 root root 86880 Jun 29 2011 opieftpd
-r-xr-xr-x 1 root root 250288 Feb 21 2009 pftp
-rwxr-xr-x 1 root root 8803 May 28 2009 rftp
-rwxr-xr-x 1 root root 137752 Oct 5 2015 sftp

/etc/alternatives contains:

lrwxrwxrwx 1 root root 13 Dec 30 2009 ftp -> /usr/bin/pftp
lrwxrwxrwx 1 root root 29 Dec 30 2009 ftp.1 -> /usr/share/man/man1/pftp.1.gz
lrwxrwxrwx 1 root root 15 Nov 22 2015 ld -> /usr/bin/ld.bfd
lrwxrwxrwx 1 root root 27 Nov 22 2015 libblas.so.3 -> /usr/lib64/libblas.so.3.4.2
lrwxrwxrwx 1 root root 29 Nov 22 2015 liblapack.so.3 -> /usr/lib64/liblapack.so.3.4.2
lrwxrwxrwx 1 root root 15 Aug 12 2012 vim -> /bin/vim-normal
lrwxrwxrwx 1 root root 36 Aug 12 2012 xulrunner -> /usr/lib64/xulrunner-1.9.2/xulrunner


For anyone interested, the FTP commands that were used prior to SLES 12 follow. These commands are almost the same as what I would specify in a Windows Command prompt to FTP a file to the same server.

ftp -nv $HOST <<END_SCRIPT 2>&1 | tee $STDOUTFILE
quote USER $USER
quote PASS $PASSWD
site unit=cart retpd="$RETENTION"
bin
put "$FULLFILEIN" '$FILEOUT'
quit
END_SCRIPT


The FTP commands that now perform the same function with lftp:

ftp <<END_SCRIPT 2>&1 | tee $STDOUTFILE
lftp-open -u $USER,$PASSWD $HOST
site unit=cart retpd="$RETENTION"
bin
cd \'$FILEOUTDIR\'
put "$FULLFILEIN" -o '$FILEOUT'
quit
END_SCRIPT



Note that I could not find any mention of lftp becoming the default in any of the SLES 12 Release Notes (SLES 12 , SLES 12 SP1, and SLES 12 SP2). This is one of two changes to SLES 12 (that I am aware of) that isn't documented in the Release Notes.

Harley