You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Amin <pr...@hotmail.com> on 2002/08/10 19:24:03 UTC

Admin problem

Hi, I found a similira problem like the one i'm facing now but there was no response. I cen;t seem to log on to the admin server. My M$ telnet client connects to the server, shows the welcome text, then display Login. Below is what i exactly get
------------- telnet screen dump --------------
JAMES RemoteAdministration Tool 2.0a3-cvs
Please enter your login and password
Login id:
Error. Closing connection


Connection to host lost.
------------end of telnet screen dum -------------

Platform details
OS - Win2k Advanced Server
Java - 1.4.0-beta3-b84
512MB RAM

thank you
Amin

RE: handling connection vs sheduler problem

Posted by "Noel J. Bergman" <no...@devtech.com>.
Andrei,

What issue do you have with using socket timeout?  Is it not reliable enough for you?  In the case of his problem, calling it fixes a platform specific problem, and should be neutral for other platforms.

I've looked at replacing the DefaultTimeScheduler with something more appropriate for James, but I haven't had time to do it yet.

	--- Noel

-----Original Message-----
From: Andrei Ivanov [mailto:myfam@surfeu.fi]
Sent: Sunday, August 11, 2002 18:10
To: James Developers List
Subject: handling connection vs sheduler problem


Hi
I don't think that setting socket timeout will help to solve scheduler
problem. It is not possible to control connection by setting socket timeout.
As it was several times mentioned before scheduler isn't designed to be used
as in James servers. It is nice and elegant solution, I mean
ShedulerNotifyНnputStream, but it results in overhead we know about. The
solution is in cornerstone connection classes which create connection
handlers for James. My idea is to adapt (modify) cornerstone connection
classes by adding connection control facilities.

About cornerstone. I've been using different cornerstone blocks a lot for my
project. I can say that cornerstone is well written and reliable library. On
the other hand for complex and particular phoenix based applications (like
James) cornerstone shall be considered more as guideline than ready to use
solution. If we really want to improve James we shall adapt cornerstone for
James (but not James for cornerstone as it is now)

Andrei

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, August 12, 2002 12:04 AM
Subject: RE: Admin problem


> I have no problem with the socket.setSoTimeout(timeout) call.  We should
> start making more use of setSoTimeout elsewere, and wean ourselves off of
> the scheduler.
>
> With respect to the logging, I think that only the one where we echo the
> timeout is necessary, not the one where we log it for each connection.
>
> Would you please submit a [PATCH] to James-Dev?
>
> --- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


handling connection vs sheduler problem

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi
I don't think that setting socket timeout will help to solve scheduler
problem. It is not possible to control connection by setting socket timeout.
As it was several times mentioned before scheduler isn't designed to be used
as in James servers. It is nice and elegant solution, I mean
ShedulerNotifyНnputStream, but it results in overhead we know about. The
solution is in cornerstone connection classes which create connection
handlers for James. My idea is to adapt (modify) cornerstone connection
classes by adding connection control facilities.

About cornerstone. I've been using different cornerstone blocks a lot for my
project. I can say that cornerstone is well written and reliable library. On
the other hand for complex and particular phoenix based applications (like
James) cornerstone shall be considered more as guideline than ready to use
solution. If we really want to improve James we shall adapt cornerstone for
James (but not James for cornerstone as it is now)

Andrei

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, August 12, 2002 12:04 AM
Subject: RE: Admin problem


> I have no problem with the socket.setSoTimeout(timeout) call.  We should
> start making more use of setSoTimeout elsewere, and wean ourselves off of
> the scheduler.
>
> With respect to the logging, I think that only the one where we echo the
> timeout is necessary, not the one where we log it for each connection.
>
> Would you please submit a [PATCH] to James-Dev?
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Admin problem

Posted by "Noel J. Bergman" <no...@devtech.com>.
I have no problem with the socket.setSoTimeout(timeout) call.  We should
start making more use of setSoTimeout elsewere, and wean ourselves off of
the scheduler.

With respect to the logging, I think that only the one where we echo the
timeout is necessary, not the one where we log it for each connection.

Would you please submit a [PATCH] to James-Dev?

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Admin problem

Posted by Amin <pr...@hotmail.com>.
got it running. attached is the woraround. Added
        socket.setSoTimeout( timeout );

Amin
----- Original Message -----
From: "Amin" <pr...@hotmail.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, August 12, 2002 2:11 AM
Subject: Re: Admin problem


> Got the new  commited RemoteManagerHandler.java with added logging. Put
also
> a printstacktrace(). log dump below
> ------ remotemanager.log ----------------
> 1029073977014 [INFO   ] (remotemanager): Timeout is : 6000000
> 1029073977074 [INFO   ] (remotemanager): Timeout is set at 6000000
> 1029073977104 [INFO   ] (remotemanager): Access from 127.0.0.1(127.0.0.1)
> 1029073977104 [INFO   ] (remotemanager): Getting ready to read login
> 1029073978126 [ERROR  ] (remotemanager): Exception during connection from
> 127.0.0.1 (127.0.0.1): Read timed out
> ---------- end of remotemanager.log --------------
>
> --------------- printstacktrace screen dump ---------------
> java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:119)
>         at
> sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:393)
>         at
> sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:429)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171)
>         at java.io.InputStreamReader.read(InputStreamReader.java:169)
>         at java.io.BufferedReader.fill(BufferedReader.java:139)
>         at java.io.BufferedReader.readLine(BufferedReader.java:302)
>         at java.io.BufferedReader.readLine(BufferedReader.java:365)
>         at
> org.apache.james.remotemanager.RemoteManagerHandler.handleConnection(
> RemoteManagerHandler.java:146)
>         at
> org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
> Connection.java:167)
>         at
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
> ecutableRunnable.java:47)
>         at
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
> .java:86)
> --------------- end of printstacktrace screen dump -------
>
> hmm is it a jdk problem or james problem?
>
> Amin
> ----- Original Message -----
> From: "Noel J. Bergman" <no...@devtech.com>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Sunday, August 11, 2002 1:45 AM
> Subject: RE: Admin problem
>
>
> > The code is:
> >
> >     ... try { ...
> >        out.println( "JAMES RemoteAdministration Tool " +
> > Constants.SOFTWARE_VERSION );
> >        out.println("Please enter your login and password");
> >        ... loop ...
> >           out.println("Login id:");
> >           login = in.readLine().trim();
> >           out.println("Password:");
> >           password = in.readLine().trim();
> >        ... until good login ...
> >        out.println("Welcome" + login + ". HELP for a list of commands");
> >     ... } catch ( final IOException e ) { out.println("Error. Closing
> > connection"); ...
> >
> >
> > So if you are seeing:
> >
> > ------------- telnet screen dump --------------
> > JAMES RemoteAdministration Tool 2.0a3-cvs
> > Please enter your login and password
> > Login id:
> > Error. Closing connection
> >
> >
> > Connection to host lost.
> > ------------end of telnet screen dum -------------
> >
> > then the IOException ought to be coming from login =
in.readLine().trim().
> > Is it possible that you are seeing a socket timeout?  Unfortunately, the
> > code eats the actual exception ( :-( ), so the log won't do you much
good.
> >
> > Are you able to build James from source?  If so, you might want to
modify
> > the catch block to log the specific exception; that might help identify
> the
> > problem.
> >
> > --- Noel
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

RE: Admin problem

Posted by "Noel J. Bergman" <no...@devtech.com>.
That bug says that it was fixed a year ago, though.  What version are you
running now?

	--- Noel

-----Original Message-----
From: Amin [mailto:princeamin@hotmail.com]
Sent: Sunday, August 11, 2002 16:45
To: James Users List
Subject: Re: Admin problem


Christian,

The problem i'm experienceg is a bug only for win2k and for java 1.4. Check
out http://developer.java.sun.com/developer/bugParade/bugs/4508149.html

Amin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Admin problem

Posted by Amin <pr...@hotmail.com>.
Christian,

The problem i'm experienceg is a bug only for win2k and for java 1.4. Check
out http://developer.java.sun.com/developer/bugParade/bugs/4508149.html

Amin

----- Original Message -----
From: "Christian Myrvold" <ch...@myrvold.info>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, August 12, 2002 4:07 AM
Subject: Re: Admin problem


>
> Amin,
>
> If the socket timeout is set to 0, it implies that the option is
> disabled (i.e., timeout of infinity). So you getting disconnected must
> be for another reason.
>
> - Christian
>
>
> Amin wrote:
>
> >*This message was transferred with a trial version of CommuniGate(tm)
Pro*
> >
> >
> >>What are the "Timeout is : 6000000" and "Timeout is set at 6000000"
> >>
> >>
> >they were printing out from the same variable
> >
> >
> >>lines.  Are these printing out the socket timeout or the RemoteManager
> >>timeout parameter (which is really not quite the same thing)?
> >>
> >>
> >they were being printed out of the RemoteManager parameter. The socket
> >timeout was 0. Thats why the telnet client gets disconnected as soon as
its
> >connected. Theres one thing which i dont quite get, how come other users
can
> >actually use the Remote Manager if the socket timeout was 0?
> >
> >Amin
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Admin problem

Posted by Christian Myrvold <ch...@myrvold.info>.
Amin,

If the socket timeout is set to 0, it implies that the option is 
disabled (i.e., timeout of infinity). So you getting disconnected must 
be for another reason.

- Christian


Amin wrote:

>*This message was transferred with a trial version of CommuniGate(tm) Pro*
>  
>
>>What are the "Timeout is : 6000000" and "Timeout is set at 6000000"
>>    
>>
>they were printing out from the same variable
>  
>
>>lines.  Are these printing out the socket timeout or the RemoteManager
>>timeout parameter (which is really not quite the same thing)?
>>    
>>
>they were being printed out of the RemoteManager parameter. The socket
>timeout was 0. Thats why the telnet client gets disconnected as soon as its
>connected. Theres one thing which i dont quite get, how come other users can
>actually use the Remote Manager if the socket timeout was 0?
>
>Amin
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Admin problem

Posted by Amin <pr...@hotmail.com>.
> What are the "Timeout is : 6000000" and "Timeout is set at 6000000"
they were printing out from the same variable
> lines.  Are these printing out the socket timeout or the RemoteManager
> timeout parameter (which is really not quite the same thing)?
they were being printed out of the RemoteManager parameter. The socket
timeout was 0. Thats why the telnet client gets disconnected as soon as its
connected. Theres one thing which i dont quite get, how come other users can
actually use the Remote Manager if the socket timeout was 0?

Amin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Admin problem

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Amin,

This is pretty interesting.  From the time stamps and what not it looks
like your socket is timing out in about 1 second.

What are the "Timeout is : 6000000" and "Timeout is set at 6000000"
lines.  Are these printing out the socket timeout or the RemoteManager
timeout parameter (which is really not quite the same thing)?  I assume
those are the result of your mods, as I don't have them in my logs.

--Peter

> -----Original Message-----
> From: Amin [mailto:princeamin@hotmail.com]
> Sent: Sunday, August 11, 2002 11:11 AM
> To: James Users List
> Subject: Re: Admin problem
> 
> Got the new  commited RemoteManagerHandler.java with added logging.
Put
> also
> a printstacktrace(). log dump below
> ------ remotemanager.log ----------------
> 1029073977014 [INFO   ] (remotemanager): Timeout is : 6000000
> 1029073977074 [INFO   ] (remotemanager): Timeout is set at 6000000
> 1029073977104 [INFO   ] (remotemanager): Access from
127.0.0.1(127.0.0.1)
> 1029073977104 [INFO   ] (remotemanager): Getting ready to read login
> 1029073978126 [ERROR  ] (remotemanager): Exception during connection
from
> 127.0.0.1 (127.0.0.1): Read timed out
> ---------- end of remotemanager.log --------------
> 
> --------------- printstacktrace screen dump ---------------
> java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:119)
>         at
> sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:393)
>         at
> sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:429)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171)
>         at java.io.InputStreamReader.read(InputStreamReader.java:169)
>         at java.io.BufferedReader.fill(BufferedReader.java:139)
>         at java.io.BufferedReader.readLine(BufferedReader.java:302)
>         at java.io.BufferedReader.readLine(BufferedReader.java:365)
>         at
> org.apache.james.remotemanager.RemoteManagerHandler.handleConnection(
> RemoteManagerHandler.java:146)
>         at
> org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
> Connection.java:167)
>         at
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
> ecutableRunnable.java:47)
>         at
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
> .java:86)
> --------------- end of printstacktrace screen dump -------
> 
> hmm is it a jdk problem or james problem?
> 
> Amin
> ----- Original Message -----
> From: "Noel J. Bergman" <no...@devtech.com>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Sunday, August 11, 2002 1:45 AM
> Subject: RE: Admin problem
> 
> 
> > The code is:
> >
> >     ... try { ...
> >        out.println( "JAMES RemoteAdministration Tool " +
> > Constants.SOFTWARE_VERSION );
> >        out.println("Please enter your login and password");
> >        ... loop ...
> >           out.println("Login id:");
> >           login = in.readLine().trim();
> >           out.println("Password:");
> >           password = in.readLine().trim();
> >        ... until good login ...
> >        out.println("Welcome" + login + ". HELP for a list of
commands");
> >     ... } catch ( final IOException e ) { out.println("Error.
Closing
> > connection"); ...
> >
> >
> > So if you are seeing:
> >
> > ------------- telnet screen dump --------------
> > JAMES RemoteAdministration Tool 2.0a3-cvs
> > Please enter your login and password
> > Login id:
> > Error. Closing connection
> >
> >
> > Connection to host lost.
> > ------------end of telnet screen dum -------------
> >
> > then the IOException ought to be coming from login =
> in.readLine().trim().
> > Is it possible that you are seeing a socket timeout?  Unfortunately,
the
> > code eats the actual exception ( :-( ), so the log won't do you much
> good.
> >
> > Are you able to build James from source?  If so, you might want to
> modify
> > the catch block to log the specific exception; that might help
identify
> the
> > problem.
> >
> > --- Noel
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:james-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:james-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Admin problem

Posted by Amin <pr...@hotmail.com>.
Got the new  commited RemoteManagerHandler.java with added logging. Put also
a printstacktrace(). log dump below
------ remotemanager.log ----------------
1029073977014 [INFO   ] (remotemanager): Timeout is : 6000000
1029073977074 [INFO   ] (remotemanager): Timeout is set at 6000000
1029073977104 [INFO   ] (remotemanager): Access from 127.0.0.1(127.0.0.1)
1029073977104 [INFO   ] (remotemanager): Getting ready to read login
1029073978126 [ERROR  ] (remotemanager): Exception during connection from
127.0.0.1 (127.0.0.1): Read timed out
---------- end of remotemanager.log --------------

--------------- printstacktrace screen dump ---------------
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:119)
        at
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:393)
        at
sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:429)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171)
        at java.io.InputStreamReader.read(InputStreamReader.java:169)
        at java.io.BufferedReader.fill(BufferedReader.java:139)
        at java.io.BufferedReader.readLine(BufferedReader.java:302)
        at java.io.BufferedReader.readLine(BufferedReader.java:365)
        at
org.apache.james.remotemanager.RemoteManagerHandler.handleConnection(
RemoteManagerHandler.java:146)
        at
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
Connection.java:167)
        at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
ecutableRunnable.java:47)
        at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
.java:86)
--------------- end of printstacktrace screen dump -------

hmm is it a jdk problem or james problem?

Amin
----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Sunday, August 11, 2002 1:45 AM
Subject: RE: Admin problem


> The code is:
>
>     ... try { ...
>        out.println( "JAMES RemoteAdministration Tool " +
> Constants.SOFTWARE_VERSION );
>        out.println("Please enter your login and password");
>        ... loop ...
>           out.println("Login id:");
>           login = in.readLine().trim();
>           out.println("Password:");
>           password = in.readLine().trim();
>        ... until good login ...
>        out.println("Welcome" + login + ". HELP for a list of commands");
>     ... } catch ( final IOException e ) { out.println("Error. Closing
> connection"); ...
>
>
> So if you are seeing:
>
> ------------- telnet screen dump --------------
> JAMES RemoteAdministration Tool 2.0a3-cvs
> Please enter your login and password
> Login id:
> Error. Closing connection
>
>
> Connection to host lost.
> ------------end of telnet screen dum -------------
>
> then the IOException ought to be coming from login = in.readLine().trim().
> Is it possible that you are seeing a socket timeout?  Unfortunately, the
> code eats the actual exception ( :-( ), so the log won't do you much good.
>
> Are you able to build James from source?  If so, you might want to modify
> the catch block to log the specific exception; that might help identify
the
> problem.
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Admin problem

Posted by "Noel J. Bergman" <no...@devtech.com>.
The code is:

    ... try { ...
       out.println( "JAMES RemoteAdministration Tool " +
Constants.SOFTWARE_VERSION );
       out.println("Please enter your login and password");
       ... loop ...
          out.println("Login id:");
          login = in.readLine().trim();
          out.println("Password:");
          password = in.readLine().trim();
       ... until good login ...
       out.println("Welcome" + login + ". HELP for a list of commands");
    ... } catch ( final IOException e ) { out.println("Error. Closing
connection"); ...


So if you are seeing:

------------- telnet screen dump --------------
JAMES RemoteAdministration Tool 2.0a3-cvs
Please enter your login and password
Login id:
Error. Closing connection


Connection to host lost.
------------end of telnet screen dum -------------

then the IOException ought to be coming from login = in.readLine().trim().
Is it possible that you are seeing a socket timeout?  Unfortunately, the
code eats the actual exception ( :-( ), so the log won't do you much good.

Are you able to build James from source?  If so, you might want to modify
the catch block to log the specific exception; that might help identify the
problem.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>