- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: 421 Idle Timeout (180 seconds): closing contro...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2013 01:06 AM
тАО01-15-2013 01:06 AM
Hi,
I am getting error message while uploading file to Vendor's FTP server as below, I have written Unix script to upload the file on Vendor's FTP server.
Connected to TEST.HOST.COM.
220 Server ready.
331 Password required for FTPUSER.
230 User FTPUSER logged in.
mput file4062.TXT? 200 PORT command successful.
421 Idle Timeout (180 seconds): closing control connection.
FTP return code is:0
SCRIPT_ftp.ksh:TRANSFER ftp ran OK
logout
Please can you let me know is there any settings i have to do in FTP Unix Script for above error? Or there is some problem on Vendor's FTP server. But some time it works perfectly.
Thanks,
Narendra
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2013 08:06 AM
тАО01-15-2013 08:06 AM
Re: 421 Idle Timeout (180 seconds): closing control connection(FTP).
The idle timeout occurrs because the FTP daemon does not detect any activity on the channel. For some reason, the transfer did not work and no data passed between the systems, resulting in the timeout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2013 10:27 AM
тАО01-15-2013 10:27 AM
Re: 421 Idle Timeout (180 seconds): closing control connection(FTP).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2013 06:53 AM
тАО01-16-2013 06:53 AM
Re: 421 Idle Timeout (180 seconds): closing control connection(FTP).
Hi Steven,
Please find the FTP script as below, And OS is (HP-UX server1 B.11.31 U ia64 0716105793 unlimited-user license)
#!/bin/ksh
cd /SID/outgoing
filecount=`ls | wc -l`
if test $filecount = 0
then
echo ""
echo "XXXXXXXXXXXXXXXXXXXXXXXXX"
echo "THERE ARE NO FILES TO SEND"
echo "XXXXXXXXXXXXXXXXXXXXXXXXX"
echo ""
#exit
fi
file=$(ls)
for x in $file
do
mv $x $x.TXT
chmod 444 $x.TXT
done
HOST='TEST.HOST.COM'
USER='FTPUSER'
PASSWD='password'
ftp -nv $HOST <<EOF
user $USER $PASSWD
mput *.TXT
EOF
RC=$?
echo "FTP return code is:$RC"
if test RC -ne 0
then
echo "Outgoing_ftp.ksh:Error running ftp for Outgoing"
else
echo "Outgoing_ftp.ksh:Outgoing ftp ran OK"
fi
echo ""
Datestamp=$(date +%Y%m%d%H%M)
file=$(ls)
for x in $file
do
mv $x ../old/$x.$Datestamp
done
And what i mean with some time it works perfectly... Is i won;t get error "421 Idle Timeout (180 seconds)" while file transfer...But some time i get an error Timeout.
Thanks,
Narendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2013 07:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2013 11:39 PM
тАО01-16-2013 11:39 PM
Re: 421 Idle Timeout (180 seconds): closing control connection(FTP).
>if test $filecount = 0
You should clean this up to use -eq:
if [ $(ls | wc -l) -eq 0 ]; then
>ftp -nv $HOST <<EOF
Based on Steven's comments, this will prompt for each file, even if 1. So you need:
ftp -niv $HOST <<EOF
>if test RC -ne 0
This should be:
if [ $RC -ne 0 ]; then
>file=$(ls)
>for x in $file; do
Any reason you don't use the previous list? Someone may put another file there and you wouldn't copy it.
for x in $file; do
mv $x.TXT ../old/$x.$Datestamp
done
>perhaps the FTP client doesn't ask about an "mget" or "mput" if the file list ("*.TXT") expands to only one file.
It asked for me.
>Which is why "prompt" is normally used
Or -i.
>(Apparently, your file names don't include spaces.)
That would be illegal, wouldn't it? ;-) It seems it is pushing from HP-UX to Windows.
And to fix this, you would also have to change the for loop to something like:
for x in "$(ls)"; do