You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Ram C <ra...@mybc.com> on 2001/03/26 07:59:38 UTC

RemoteManager problem (was RE:logging on)

I did some investigation based on the problem reported by Grant C. Peters.(unable
to login to the JAMES remote manager -- even if all his configuration
seem to be okay.)

Some changes could be done to RemoteManagerHandler to fix these problems.

1) The RemoteManagerHandler is using println() to send the response to
the client (Telnet). If JAMES happens to run on a *UNIX server and the
client is on windows*, there seems to be a problem with linefeed/carriage
returns. (\n vs \r\n).

Solution: 
I have changed RemoteManagerHandler to use print() and include "\r\n"
with the response message.

2) It looks like certain Telnet clients(Token, PuTTY to name a few) sends
out some wierd characters(� followed by 2 other characters, several sets
of these repeated) at the begining of the session. 

Work around:
try logging in, you should see the message "login failed for root", keep
trying the same for 4 times. The fifth login request will be successfull
and you can use the remotemanager without any problems from then on.

Solution:
(beware...very very ugly...but seems to work.)
I just added the few lines below to fix the problem.

            String login = in.readLine();
            // some Telnet Clients send out wierd characters..
            while ( login.startsWith("�") ) {
                login = login.substring(3);
            }

I know its not a very eligent way. But a ugly path until we move away
for this telnet remotemanager.

PS: I don't understand the internals of the telnet protocol (heard its
an ugly monster). It will be nice if somebody who understands it better
can validate that this would work for all the Telnet clients.

If the core James developers are happy with these fixes, i will be glad
to send the new version of RemoteManagerHandler and you guys can commit
the same.

Cheers,
Ram.


___________________________________________________________
FREE voicemail, email and fax, all in one place.  Sign Up Now! http://www.mybc.com


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