You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Mi...@boomi.com on 2004/06/09 17:02:41 UTC

Error connecting to Windows NT FTP Server

I'm currently using Commons-NET 1.2.1 and I'm having trouble connecting to a
Windows NT FTP server. I am getting a "truncated server reply" exception
after it sends the USER command. Here's the stack trace:

org.apache.commons.net.MalformedServerReplyException: Truncated server
reply: 
	at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:260)
	at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:410)
	at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:438)
	at org.apache.commons.net.ftp.FTP.user(FTP.java:588)
	at org.apache.commons.net.ftp.FTPClient.login(FTPClient.java:609)



I noticed that the NT server FIRST replies with an empty line, and THEN it
replies with a 331 (i think) Password required. If I debug and force another
_controlInput.readLine() in the __getReply() method then I DO get the proper
reply, but then it fails again when it send the PASS command with the same
error.

Is there any way around this, is this Windows NT FTP server behaving
properly?

Any help would be appreciated, thank you.

Mitch

Re: Error connecting to Windows NT FTP Server

Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Sounds strange.  We've never come across this behavior.  What version
of the server and os exactly are you using?

>>>>> On Wed, 09 Jun 2004 11:02:41 -0400, Mitch@boomi.com said:

> I'm currently using Commons-NET 1.2.1 and I'm having trouble
> connecting to a Windows NT FTP server. I am getting a "truncated
> server reply" exception after it sends the USER command. Here's the
> stack trace:

> org.apache.commons.net.MalformedServerReplyException: Truncated
> server reply: at
> org.apache.commons.net.ftp.FTP.__getReply(FTP.java:260) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:410) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:438) at
> org.apache.commons.net.ftp.FTP.user(FTP.java:588) at
> org.apache.commons.net.ftp.FTPClient.login(FTPClient.java:609)



> I noticed that the NT server FIRST replies with an empty line, and
> THEN it replies with a 331 (i think) Password required. If I debug
> and force another _controlInput.readLine() in the __getReply()
> method then I DO get the proper reply, but then it fails again when
> it send the PASS command with the same error.

> Is there any way around this, is this Windows NT FTP server behaving
> properly?

> Any help would be appreciated, thank you.

> Mitch

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                    ekkerbj@yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org