<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ftp error: 500 '': command not understood in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680137#M638191</link>
    <description>&lt;P&gt;&amp;gt;looking for someone who has encountered similar error to point me in the direction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like you'll need to start from scratch and provide more details.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2012 02:24:12 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2012-06-05T02:24:12Z</dc:date>
    <item>
      <title>ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678621#M638184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone be kind enough to explain the above error and how it can be resolved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a ftp script in HP UX that puts a file into a windows server daily at a pre-determined time (via crontab) during quiet hours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This script has been running without any problems for a while but today, we have the error "&lt;SPAN&gt;500 '': command not understood" and the file failed to transfer. &amp;nbsp;The log is attached :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connected to 1.2.3.4.&lt;BR /&gt;220 Microsoft FTP Service&lt;BR /&gt;331 Password required for myid.&lt;BR /&gt;230 User myid logged in.&lt;BR /&gt;200 Type set to A.&lt;BR /&gt;Local directory now /mydirectory&lt;BR /&gt;250 CWD command successful.&lt;BR /&gt;local: THISFILE.TXT remote: THISFILE.TXT&lt;BR /&gt;200 PORT command successful.&lt;BR /&gt;&lt;STRONG&gt;500 '': command not understood&lt;/STRONG&gt;&lt;BR /&gt;150 Opening ASCII mode data connection for THISFILE.TXT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the script has been running mostly fine, I'm puzzled as to how this error can occur plus it always runs at a time when there is very minimal user/system activity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 02:03:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678621#M638184</guid>
      <dc:creator>so.nimda</dc:creator>
      <dc:date>2012-06-04T02:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678739#M638185</link>
      <description>&lt;P&gt;Can't really help until you post the commands that were sent to the server. If your script uses a 'here' document method to send the commands, and the commands are formed with script variables, something in the script has failed. It would be best to turn on script tracing with: set -x just before the ftp section.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 05:24:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678739#M638185</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2012-06-04T05:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678953#M638186</link>
      <description>&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. &amp;nbsp;Appreciate your attempt to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Found another similar error but this one has an error 425 which the previous one didn't :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connected to 1.2.3.4.&lt;BR /&gt;220 Microsoft FTP Service&lt;BR /&gt;331 Password required for myid.&lt;BR /&gt;230 User myid logged in.&lt;BR /&gt;200 Type set to A.&lt;BR /&gt;Local directory now /mydirectory&lt;BR /&gt;250 CWD command successful.&lt;BR /&gt;local: THATFILE.TXT remote: THATFILE.TXT&lt;BR /&gt;200 PORT command successful.&lt;BR /&gt;&lt;STRONG&gt;500 '': command not understood&lt;/STRONG&gt;&lt;BR /&gt;local: THATFILE.TXT remote: THATFILE.TXT&lt;BR /&gt;150 Opening ASCII mode data connection for THATFILE.TXT.&lt;BR /&gt;&lt;STRONG&gt;425 Can't open data connection.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that error "425 Can't open data connection." could be network related whereby a connection couldn't be establish. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this disconnect cause the 500 error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 07:45:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678953#M638186</guid>
      <dc:creator>so.nimda</dc:creator>
      <dc:date>2012-06-04T07:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error: 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678977#M638187</link>
      <description>&lt;P&gt;&amp;gt;Found another similar error but this one has an error 425 which the previous one didn't&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, we need to see your commands, not just their results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;Could this disconnect cause the 500 error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not likely, since in wrong order.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 02:23:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5678977#M638187</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-06-05T02:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5679175#M638188</link>
      <description>&lt;P&gt;Thanks, once again, Bill for the reply.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 09:33:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5679175#M638188</guid>
      <dc:creator>so.nimda</dc:creator>
      <dc:date>2012-06-04T09:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5679535#M638189</link>
      <description />
      <pubDate>Mon, 04 Jun 2012 14:40:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5679535#M638189</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2012-06-04T14:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680117#M638190</link>
      <description>&lt;P&gt;Hi Steven,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't mean to waste anybody's time. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script has been running without any errors for many months and there was no change to the scripts nor how the data files were created and as such, I didn't post the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have googled prior to posting this message and most of the info I obtained are very broad and general in nature.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was, perhaps looking for someone who has encountered similar error to point me in the direction to narrow down to what to look for - I was certainly not looking for psychic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 01:47:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680117#M638190</guid>
      <dc:creator>so.nimda</dc:creator>
      <dc:date>2012-06-05T01:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error: 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680137#M638191</link>
      <description>&lt;P&gt;&amp;gt;looking for someone who has encountered similar error to point me in the direction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like you'll need to start from scratch and provide more details.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 02:24:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680137#M638191</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-06-05T02:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680139#M638192</link>
      <description />
      <pubDate>Tue, 05 Jun 2012 02:30:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680139#M638192</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2012-06-05T02:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: ftp error : 500 '': command not understood</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680297#M638193</link>
      <description>&lt;P&gt;Based on general knowledge of the FTP protocol, I'll try to reconstruct the protocol-level conversation.&lt;/P&gt;&lt;P&gt;Reconstructed FTP client commands are in &lt;FONT color="#FF0000"&gt;red&lt;/FONT&gt;; reconstructed protocol-level commands sent by the client are in &lt;FONT color="#0000FF"&gt;blue&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;According to the usual convention, the messages in black without a three-digit result code are created locally by the FTP client, and the messages with the result code are sent from the FTP server. I assume this is true in this case, too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: as the actual transfer script is not available to me, this includes some guesswork. Most people &lt;STRONG&gt;really hate&lt;/STRONG&gt; having to guess things if the original poster could easily supply the necessary information instead. The requests to see the script do &lt;STRONG&gt;not&lt;/STRONG&gt; necessarily mean people expect to find errors in the script: seeing the actual script would just make it easier to reconstruct the protocol-level conversation accurately, so there would be no doubt of what exactly is happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connected to 1.2.3.4.&lt;BR /&gt;220 Microsoft FTP Service&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;USER myid&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;331 Password required for myid.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;PASS something&lt;/FONT&gt;&lt;BR /&gt;230 User myid logged in.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ASCII&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;TYPE A&lt;/FONT&gt;&lt;BR /&gt;200 Type set to A.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;LCD /mydirectory&lt;/FONT&gt;&lt;BR /&gt;Local directory now /mydirectory&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;CD /some/directory&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;CWD /some/directory&lt;/FONT&gt;&lt;BR /&gt;250 CWD command successful.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;PUT THATFILE.TXT&lt;/FONT&gt;&lt;BR /&gt;local: THATFILE.TXT remote: THATFILE.TXT&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;PORT aa,bb,cc,dd,xx,yy&lt;/FONT&gt;&lt;BR /&gt;200 PORT command successful.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;???&lt;/FONT&gt; (should be &lt;FONT color="#0000FF"&gt;STOR THATFILE.TXT&lt;/FONT&gt; but the server seems to receive something else)&lt;BR /&gt;&lt;STRONG&gt;500 '': command not understood&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;PUT THATFILE.TXT&lt;/FONT&gt;&lt;BR /&gt;local: THATFILE.TXT remote: THATFILE.TXT&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;PORT aa,bb,cc,dd,xx,zz&lt;FONT color="#000000"&gt; (apparently ignored by the server)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;STOR THATFILE.TXT&lt;/FONT&gt;&lt;BR /&gt;150 Opening ASCII mode data connection for THATFILE.TXT.&lt;BR /&gt;&lt;STRONG&gt;425 Can't open data connection.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that a single client-side &lt;FONT color="#FF0000"&gt;PUT&lt;/FONT&gt; command actually translates to two FTP protocol-level commands: &lt;FONT color="#0000FF"&gt;PORT&lt;/FONT&gt; and &lt;FONT color="#0000FF"&gt;STOR&lt;/FONT&gt;. Since &lt;FONT color="#FF0000"&gt;LCD&lt;/FONT&gt; only takes effect locally, no command is sent to the server for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;PORT&lt;/FONT&gt; tells the server which IP address and port to use for the data connection: in active-mode FTP, the server opens the data connection to the client, not vice versa. In the arguments of the PORT command, aa,bb,cc,dd is the IP address of the client; the two remaining parameters are the high and low bytes of the port number; i.e. with the &lt;FONT color="#0000FF"&gt;PORT aa,bb,cc,dd,xx,yy&lt;/FONT&gt; command, the actual port number is (256 * xx) + yy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My guess is that after the PORT command, the server is expecting either a STOR or RETR, and ignores any other commands. Something causes the first STOR command to be corrupted to something that looks like an empty string. The server reports it does not understand the corrupted command, but the server still waits for either a &lt;FONT color="#0000FF"&gt;STOR&lt;/FONT&gt; or &lt;FONT color="#0000FF"&gt;RETR&lt;/FONT&gt; command after the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the client moves forward in the script to another &lt;FONT color="#FF0000"&gt;PUT&lt;/FONT&gt; command, or retries the first command (as indicated by the second "local: THATFILE.TXT remote:THATFILE.TXT" message output by the FTP client). The new &lt;FONT color="#FF0000"&gt;PUT&lt;/FONT&gt; command causes a new &lt;FONT color="#0000FF"&gt;PORT&lt;/FONT&gt; command to be sent to the server... but it seems like the server ignores it, as it's already received the first one.Then the &lt;FONT color="#0000FF"&gt;STOR&lt;/FONT&gt; command tells the server to initialize a file transfer (as indicated by the message with the 150 code)... but now the client expects a data connection in port (256 * xx) + zz, while the server is actually connecting to port (256 * xx) + yy according to the first &lt;FONT color="#0000FF"&gt;PORT&lt;/FONT&gt; command. As a result of the miscommunication, the server is trying to connect to the wrong port of the client, and the data connection fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you'll need to find out what actually gets sent from the FTP client to the server at the point marked &lt;FONT color="#0000FF"&gt;???&lt;/FONT&gt;. You might want to take a network traffic dump and examine it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the command is sent out correctly, it might get corrupted on the way to the server if there is a firewall or a FTP proxy in between the client and the FTP server. If the software of the firewall/proxy has recently been updated, it might be a new bug in the updated software. Another traffic dump at the FTP server side might be needed to really confirm this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the command is sent in wrong form by your FTP client, you'll really have to examine the transfer script. Perhaps the filename is actually something like "THATFILE.TXT " (note the extra space at the end) which confuses the script or the FTP client, causing a wrong/empty FTP command to be sent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a server-side traffic dump indicates the command is actually received correctly by the FTP server host, then the only remaining option would be that the FTP server mis-interprets the command. That would be a bug in the FTP server software. The first message indicates it is a "Microsoft FTP Service", so the server is apparently running some version of Windows. Perhaps one of the Microsoft's patches caused a new bug in their FTP server? You should ask the administrator of the Windows server if any updates has been installed to the server recently.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 05:48:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-error-500-command-not-understood/m-p/5680297#M638193</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2012-06-05T05:48:20Z</dc:date>
    </item>
  </channel>
</rss>

