Possible issues when deploying a LANSA application to Linux
|Product/Release:||Visual LANSA on Linux|
|Abstract:||Possible import or compilation issues after deploying a LANSA application to Linux via SFTP|
|Submitted By:||LANSA Technical Support|
Issues may arise when deploying a LANSA application to Linux. In particular, in the areas of importing data and executing the ctd files. However, compilation errors could also occur (depending on the compiler) as a result of doing the imports using SFTP (Secure FTP).
Importing to a Linux box running RedHat has successfully been achieved in the past. Problems have occurred when deploying to RedHat AS3, which didn't arise with previous versions of RedHat. The difference between the two was the result of the FTP transfer of some deployed files. Some of the deployed files need to be FTPd in binary mode and some in ASCII mode (as specified in LANSA documentation).
The problem is that text files, which should be FTPd in ASCII mode, ended up being FTPd as binary files. As it turned out, the ASCII conversion is happening on the server, not the client, and RedHat AS3 was not doing any conversion at all. RedHat AS3, using a secure FTP (vsftpd, Very Secure FTP Daemon), disables ASCII mode by default, so all files end up FTPd to the RedHat AS3 box as binary files, causing the issue.
The following is an extract from the vsftpd.conf configuration file (/etc/vsftpd/vsftpd.conf) explaining the reason for why ascii mode is disabled by default.
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
In order for the text files to be transferred correctly the above two options should be enabled. However, for various reasons, this may not be considered an appropriate solution at some sites. Another option is to keep these two options disabled, but run dos2unix on the relevant files after FTP has completed.
AS3 - Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3)
DoS - Denial of Service