Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP

Status
Not open for further replies.

LLudlow

Programmer
Oct 5, 2001
186
CA
I am getting the below entry in the FTP log and cannot figure out why I cannot ftp to the server. I have the appropriate ports opened on my firewall and forwarded to the correct server but still i cannot connect:

18:48:48 216.126.110.42 [5]USER anonymous 331 0
18:48:51 216.126.110.42 [5]PASS ftpuser@ 230 0
18:51:19 216.126.110.42 [5]closed - 421 121
 
do you have port 21 open on the server (windows firewall)?
 
Hi,

The windows firewall is not turned on
 
Does anyone have any idea why i might be getting that error?

Thanks
 
Hi,

Can you post the error from the Event log? Also have you checked the FTP error log file located here:

%systemroot%\system32\LogFiles\MSFTPSVCX\

 
have you tried switching off anonymous access and using a userid / password ?
Jonathan
 
Here is what was present in the log:

18:48:48 216.126.110.42 [5]USER anonymous 331 0
18:48:51 216.126.110.42 [5]PASS ftpuser@ 230 0
18:51:19 216.126.110.42 [5]closed - 421 121

And the persmissions are all fine

Thanks
 
What FTP server are you using?

The 421 error would indicate the firewall is definitely not the problem.

I don't know what FTP server you're running, but the XXX error codes are standard between http, ftp, and anything else using those error codes. (I wish I could remeber what that standard was named)

However, after you enter the username, you get a 331 which means the server recognized the username.

Then you get a 230.. According to the site listed below, that means, "User logged in, proceed."

Here's something I found on the CuteFTP support site.

Error 421 Service not available, closing control connection.
Error 421 User limit reached
Error 421 You are not authorized to make the connection
Error 421 Max connections reached
Error 421 Max connections exceeded

Possible Solutions:

You may receive a 421 error if the FTP server you are connected to limits the total number of connections available or limits the connections available to one user.
 
Hi did you get this sorted? I have the same problem. My FTP has been working fine but has now stopped working for no apparant reason. I have a a firewall and the ports forwarding and no configuration changes have been made. I get the same:

[79]USER anonymous 331 0
[79]PASS IEUser@ 530 1326
[80]USER anonymous 331 0
[80]PASS IEUser@ 530 1326
[81]USER USERNAME 331 0
[81]PASS - 230 0
[82]USER USERNAME 331 0
[82]PASS - 230 0
[81]closed - 421 121
[82]closed - 421 121

Although looking at the logs I have seen that an external user has managed to access the site browse and transfer files. I'm really confused as to why this is? I cannot from my home computer where as I could before.

A workaround- You can take the tick out in Internet Explorer in Tools - Advanced - Browsing - Use Passive FTP This then uses port 20 FTP-DATA as long as this port forwards to the internal FTP server it works but apparantly this is an unsecure way of setting it up.

I used a sniffer to compare connecting internally (works fine) to connecting externally, I don't really know how to analyze the data but here it is:

Internal:

FTP R PORT=1228 220 Microsoft FTP Service
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 USER Username
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 331 Password required for domg.
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 PASS MYPASSWORD
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 230-Welcome to Mycompany
(192.168.2.246) (192.168.2.7)
TCP D=21 S=1228 ACK=1872007204 WIN=65454
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 230 User USERNAME logged in.
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 Text Data
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 501 option not supported
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 Text Data
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 215 Windows_NT
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 Text Data
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 214-The following SITE commands are recognized(* ==>'s unimplemented).
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 PWD
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 257 / is current directory.
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 TYPE A
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 200 Type set to A.
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 PASV
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 227 Entering Passive Mode (192
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 LIST
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 125 Data connection already open; Transfer starting.
(192.168.2.246) (192.168.2.7)
TCP D=21 S=1228 ACK=1872007584 WIN=65074
(192.168.2.7) (192.168.2.246)
FTP R PORT=1228 226 Transfer complete.
(192.168.2.246) (192.168.2.7)
TCP D=21 S=1228 ACK=1872007608 WIN=65050
(192.168.2.246) (192.168.2.7)
FTP C PORT=1228 Text Data

External:

FTP R PORT=3268 220 Microsoft FTP Service
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 USER Username
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 331 Password required for ftpuser.
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 PASS MYPASSWORD
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 230-Welcome to Mycompany
[1.1.1.1] [192.168.2.7]
TCP D=21 S=3268 ACK=801357332 WIN=65451
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 230 User ftpuser logged in.
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 Text Data
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 501 option not supported
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 Text Data
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 215 Windows_NT
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 Text Data
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 214-The following SITE commands are recognized(* ==>'s unimplemented).
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 PWD
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 257 / is current directory.
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 TYPE A
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 200 Type set to A.
[1.1.1.1] [192.168.2.7]
FTP C PORT=3268 PASV
[192.168.2.7] [1.1.1.1]
FTP R PORT=3268 227 Entering Passive Mode (192
[1.1.1.1] [192.168.2.7]
TCP D=21 S=3268 ACK=801357662 WIN=65119
 
i got it working after by setting the default timeout value to 500 instead of 120.
Not sure why 120 would not work.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top