FTP Client giving message "Server does not return message to the message"

I am using a custom C# package that I found on the Web.  On one system/domain, I am able to successfully connect and retrieve data.  When I port that same exact software to another system on different domain, I get the following error:

Server does not return message to the message.

I used Core FTP to test the connection and I have no problem connecting with that.  I am not much of a networking guy so this is stumping me.

Thanks
LVL 1
James CochraneB2B FINTECH WRITER/Technology WriterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlexPaceCommented:
Please post a protocol-level log showing the conversation between the client and the server but redact the IP address, username, and password.

If CoreFTP doesn't produce low-level logs you can test with the 30-day trial of Robo-FTP.  It has a "Trace Log' feature that shows what is happening under the hood.
0
James CochraneB2B FINTECH WRITER/Technology WriterAuthor Commented:
More Information:  I am using the SourceForce FTPConnection library.  I poked around inside the code and within the Read command it returns the message:

220 IDC FTP Gateway.

The code is instructed to close the connection when a 220 is returned.  I am unsure what that specifies.

Thanks,
0
James CochraneB2B FINTECH WRITER/Technology WriterAuthor Commented:
I don't know if this is low level enough but it's a start.  Please let me know if you need more:

WinSock 2.0
Mem -- 2,097,151 KB, Virt -- 2,097,024 KB
Started on Monday April 04, 2011 at 10:45:AM
Connect socket #716 to {IP ADDRESS OMITTED}, port 21...
220 IDC FTP Gateway  
USER {USERNAME OMITTED}  
331 Guest login ok, send ident as password.  
PASS {PASSWORD OMITTED}  
230 Guest login ok, access retrictions apply.  
SYST  
215 UNIX Type: L8 Version: SUNOS  
Keep alive off...
PWD  
257 "/" is current directory.  
PORT 170,19,103,75,58,230  
200 PORT command successful.  
LIST  
150 ASCII data connection for /bin/ls (IP ADDRESS OMITTED) (0 bytes).  
226 ASCII Transfer complete.  
Transferred 437 bytes in 0.008 seconds  
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

AlexPaceCommented:
Re: your first response ... 220 is an FTP server return code indicating success... you are probably looking at code for the data channel connection if it closes upon success.

Re: second response ... That is an FTP log. It shows a successful login and directory listing.  The directory listing is significant because it shows the client and server are able to communicate over an Active Mode data channel which happens on a different port.

Do you want to do FTP or FTPS or SFTP?
0
AlexPaceCommented:
Forget the question regarding FTPS and SFTP, I confused this question with another active FTP-related question from someone with a username starting with the letter "t"
0
AlexPaceCommented:
Your computer sent a PORT command to the server to initiate an Active Mode data channel for transferring the director listing over port 15078.  Perhaps that port is blocked for incomming connections on the other domain.  

To translate the port number, take the last two numbers from the PORT command and convert them to hexidecimal, then combine the two numbers into one big hex number and convert back to decimal.
So we start with 58,230
58 = 3A hex
230 = E6 hex
3AE6 hex = 15078 decimal

So your computer requested that the server connect back to it on port 15078 to transfer the directory listing and it did.
0
James CochraneB2B FINTECH WRITER/Technology WriterAuthor Commented:
I was incorrect about the software closing the connection on 220.  It was checking to make sure that it is 220 which supposedly is correct.
0
AlexPaceCommented:
So anyway, there didnt seem to be any error in that log you posted.  Can you post a log created at the time that the error was shown?  My blind guess without seeing the log is that the data channel is blocked from that other domain and you'll need to change the active mode port, change to passive mode, or make a firewall exception.
0
James CochraneB2B FINTECH WRITER/Technology WriterAuthor Commented:
Hi,

The output above was from Core FTP which works.  The output from my code is as follows:
Connect      
220 IDC FTP Gateway      
USER DJFORTI1FTPH1      
331 Guest login ok, send ident as password.      
PASS 88yzAuxP      
230 Guest login ok, access retrictions apply.      
TYPE A      
200 Type set to A.      
PORT 10,111,202,236,65,124      
Program Errors Out      It is here that the program is stating that there is nothing being returned from the server. Note Some of the port numbers are randomly generated.
0
AlexPaceCommented:
The first 4 numbers in that port command are supposed to be your IP address and the last two are the hex encoded port number on which you will be receiving the incomming data channel connection.

This port command reuqests that the server initiate a data channel connection to your client at 10.111.202.236 on port 16764.
65 = 41 hex
124 = 7C hex
417C hex = 16764 decimal

So you need to be ready to answer that call when it comes.

Another potential problem is that you are asking it to connect to a 10.x.x.x address which is a private address so this won't work unless this FTP server is inside the same 10.x network or your have a firewall that is able to parse these FTP messages and do address translation on the fly to actually substitute an external address in your message to the server.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Server Software

From novice to tech pro — start learning today.