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 Chemi <jm...@terra.es> on 2004/10/12 12:13:10 UTC

Problem reading posts from NNTP server

Hi. I have downloaded James to do some NNTP tests.
I have created several news groups and post some messages to them (using 
Mozilla 1.7.3).

The problem is accessing to those posts. It is really slow showing the 
body of the messages (the headers appear instantly). After some tests I 
was able to confirm that it shows the body after exactly 4 minutes. I 
did the access once again from Mozilla 1.7.3 and also from a Java Test 
Client I developed with Jakarta-Commons-Net. In both cases I get the 
body after 4 minutes.

It seems to me that 4 minutes is some kind of time-out internally in 
James. I did a search within Config.xml file but I didn't find that 
number. Any idea? The POP3 access hasn't this problem.

I also did the test via Telnet (port 119) sending directly NNTP Commands 
and in that case I get the body instantly with no delay.

Any idea? Any help?

Thanks in advance,

    Chemi.

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


Re: Problem reading posts from NNTP server

Posted by Josip Almasi <jo...@vrspace.org>.
Noel J. Bergman wrote:

> Guys,
> 
> If some of you would like to help contribute to the NNTP handling, that

Well I was asking this on dev list but got no response (news issues).

> would be great.  Please note that we stick to the RFC specifications.  In
> this case, RFCs 977 and 850 apply.

IMHO wrong: what's the point if readers break the rules? Makes server 
useless.

Regards...


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


RE: Problem reading posts from NNTP server

Posted by "Noel J. Bergman" <no...@devtech.com>.
Chemi wrote:
> I have develop a simple test case where I post a NNTP message

> I have to force a \n\n at the end of the body to read it later
> without problems. If I don't send "\n\n" at the end.... I have
> again the same problem.

I'll check the code to see how our NNTP handler is differing from our SMTP
handler.  They had different development paths, but we should be using the
same approaches to handling the content.

> is James wrong?

Possibly.  There may have been some changed assumption(s) about what was
being stored on receipt, and what was to be emitted later.

I will reiterate that it sounds as if there are several of you eager to use
NNTP, which is the first real traffic on the protocol that we've seen in at
least a year, so I'd encourage you to get involved.  :-)  There is a lot
that can be done to improve the NNTP handling.

	--- Noel


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


Re: Problem reading posts from NNTP server

Posted by Chemi <jm...@terra.es>.
That did the trick! Now both clients: Mozilla 1.7.3 and my own Java 
client (using Jakarta Commons Net) have worked fine.

Serge, I don't know if this testing is enough for you, or something else 
should be tested. Let me know if I can help you testing something else 
with my environment. I also have updated the bug info 
(http://nagoya.apache.org/jira/browse/JAMES-311).

Daniel, thank you very much for your help,

    Chemi.

Daniel Perry wrote:

>hah, havnt been exactly 'with it' for the last few weeks!
>
>For some reason i gave you the wrong line number :)
>
>That line also has the same code as the offending lines, but it is correct
>as is (i think), so you should change it back :)
>
>The lines that need changing are 1056 (for BODY command) and 1192(for
>ARTICLE command).
>
>Give them a go, and it should fix the problem...
>
>Daniel.
>


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


RE: Problem reading posts from NNTP server

Posted by Daniel Perry <d....@netcase.co.uk>.
hah, havnt been exactly 'with it' for the last few weeks!

For some reason i gave you the wrong line number :)

That line also has the same code as the offending lines, but it is correct
as is (i think), so you should change it back :)

The lines that need changing are 1056 (for BODY command) and 1192(for
ARTICLE command).

Give them a go, and it should fix the problem...

Daniel.

> -----Original Message-----
> From: Chemi [mailto:jmordax@terra.es]
> Sent: 18 October 2004 18:05
> To: James Users List
> Subject: Re: Problem reading posts from NNTP server
>
>
> Serge Knystautas wrote:
>
> > If you or Daniel can confirm this fixes it, we can quickly change it
> > in James source.  Unfortunately I don't have time nor the necessary
> > problem clients to recreate it.
>
> Daniel, Serge, I have tested that fix and it doesn't work. :-(
>
> Let's review if I did everything correctly...
>
> 1.- I have downloaded this file from the web:
> james-with-phoenix-2.2.0-src.zip
>
> 2.- I unzipped it in my file system.
>
> 3.- I set JAVA_HOME environment variable.
>
> 4.- I changed line 1504 from file
> \src\java\org\apache\james\nntpserver\NNTPHandler.java with:
> writeLoggedFlushedResponse("\r\n.");
>
> 5.- I executed: build.bat dist
>
> 6.- I moved to \dist\james-2.2.0\bin and executed run
>
> 7.- I subscribed to the default newsgroups from Mozilla 1.7.3 and sent a
> message whithout any kind of intros.
>
> 8.- I tried to read the post from Mozilla 1.7.3 and.... 4 minutes to get
> the message.
>
> But there is something interesting... now, when finally I am able to
> read the message I can see a "." at the end of it. And I didn't write
> it. This is becaus ethe change in the code, because it didn't
> happen before.
>
> Regards,
>
>     Chemi.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


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


Re: Problem reading posts from NNTP server

Posted by Chemi <jm...@terra.es>.
Serge Knystautas wrote:

> If you or Daniel can confirm this fixes it, we can quickly change it 
> in James source.  Unfortunately I don't have time nor the necessary 
> problem clients to recreate it.

Daniel, Serge, I have tested that fix and it doesn't work. :-(

Let's review if I did everything correctly...

1.- I have downloaded this file from the web: 
james-with-phoenix-2.2.0-src.zip

2.- I unzipped it in my file system.

3.- I set JAVA_HOME environment variable.

4.- I changed line 1504 from file 
\src\java\org\apache\james\nntpserver\NNTPHandler.java with: 
writeLoggedFlushedResponse("\r\n.");

5.- I executed: build.bat dist

6.- I moved to \dist\james-2.2.0\bin and executed run

7.- I subscribed to the default newsgroups from Mozilla 1.7.3 and sent a 
message whithout any kind of intros.

8.- I tried to read the post from Mozilla 1.7.3 and.... 4 minutes to get 
the message.

But there is something interesting... now, when finally I am able to 
read the message I can see a "." at the end of it. And I didn't write 
it. This is becaus ethe change in the code, because it didn't happen before.

Regards,

    Chemi.

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


Re: Problem reading posts from NNTP server

Posted by Serge Knystautas <se...@lokitech.com>.
Chemi wrote:
> Thanks Daniel. I have here saved the note you are refering to. But 
> before I touch the source code and recompile James, I wanted to make 
> sure of the solution. During last week there were other mails where it 
> was said the problem was on clients side. So I tried to do this test 
> programming myself the client.

If you or Daniel can confirm this fixes it, we can quickly change it in 
James source.  Unfortunately I don't have time nor the necessary problem 
clients to recreate it.

-- 
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

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


Re: Problem reading posts from NNTP server

Posted by Chemi <jm...@terra.es>.
Thanks Daniel. I have here saved the note you are refering to. But 
before I touch the source code and recompile James, I wanted to make 
sure of the solution. During last week there were other mails where it 
was said the problem was on clients side. So I tried to do this test 
programming myself the client.

Once again, thank for your comments,

    Chemi.

Daniel Perry wrote:

>After looking into it a week or so ago, i found that:
>
>RFC's state that it must end in \r\n.\r\n (the message before that doesnt
>have to end in anything specific (ie doesnt have to end in new line!!!)
>
>The clients you speak of do send \r\n.\r\n (they just dont necessarily
>include a newline after the message which james needs!)
>
>James is broken, because it sends .\r\n at the end of a message.  It assumes
>that the message ends with \r\n, which accoring to RFCs (and the browsers
>you list) this aint the case!
>
>To repeat my solution (which makes james rfc compliant and works) from an
>email last week:
>
>NNTPHandler.java line 1504 is:
>
>writeLoggedFlushedResponse(".");
>
>Should be:
>writeLoggedFlushedResponse("\r\n.");
>
>Daniel.
>


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


RE: Problem reading posts from NNTP server

Posted by Daniel Perry <d....@netcase.co.uk>.
After looking into it a week or so ago, i found that:

RFC's state that it must end in \r\n.\r\n (the message before that doesnt
have to end in anything specific (ie doesnt have to end in new line!!!)

The clients you speak of do send \r\n.\r\n (they just dont necessarily
include a newline after the message which james needs!)

James is broken, because it sends .\r\n at the end of a message.  It assumes
that the message ends with \r\n, which accoring to RFCs (and the browsers
you list) this aint the case!

To repeat my solution (which makes james rfc compliant and works) from an
email last week:

NNTPHandler.java line 1504 is:

writeLoggedFlushedResponse(".");

Should be:
writeLoggedFlushedResponse("\r\n.");

Daniel.

-----Original Message-----
From: Chemi [mailto:jmordax@terra.es]
Sent: 18 October 2004 15:52
To: James Users List
Subject: Re: Problem reading posts from NNTP server


To add some info... I have develop a simple test case where I post a NNTP
message using Jakarta-Commons-net and I have to force a \n\n at the end of
the body to read it later without problems. If I don't send "\n\n" at the
end.... I have again the same problem.

I have tested "\n" and I have problems reading the post. And when finally
(timeout) I read it, there is a new "." at the end.
I have tested "\n.\n" and I have also problems reading the post. And when
finally (timeout) I read it, there is a new "\n.." at the end.

So the solution is to send "\n\n". And my question here is: are really
Mozilla, FireBird, Jakarta Common Net wrong? or is James wrong?

I will try to read the RFCs because there is something I don't understand.
If I send "\n.\n" it should work and it doesn't.

Thanks in advance,

    Chemi.

Noel J. Bergman wrote:

Guys,

If some of you would like to help contribute to the NNTP handling, that
would be great.  Please note that we stick to the RFC specifications.  In
this case, RFCs 977 and 850 apply.

According to RFC 977, section 3.10.2 (and related), the article being posted
must end with <CR-LF>.<CR-LF>.


some clients arnt sending the first CRLF, so when the message gets sent
back, it doesnt include the CRLF on the end?


What are they sending?  The bug report,
http://nagoya.apache.org/jira/browse/JAMES-311, says that they are sending
<CRLF>.<CRLF>, but not <CRLF><CRLF>.<CRLF>.  The latter is not necessary.
If the code is not working properly for the former, then it is a bug in the
code.

	--- Noel


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


Re: Problem reading posts from NNTP server

Posted by Chemi <jm...@terra.es>.
To add some info... I have develop a simple test case where I post a 
NNTP message using Jakarta-Commons-net and I have to force a \n\n at the 
end of the body to read it later without problems. If I don't send 
"\n\n" at the end.... I have again the same problem.

I have tested "\n" and I have problems reading the post. And when 
finally (timeout) I read it, there is a new "." at the end.
I have tested "\n.\n" and I have also problems reading the post. And 
when finally (timeout) I read it, there is a new "\n.." at the end.

So the solution is to send "\n\n". And my question here is: are really 
Mozilla, FireBird, Jakarta Common Net wrong? or is James wrong?

I will try to read the RFCs because there is something I don't 
understand. If I send "\n.\n" it should work and it doesn't.

Thanks in advance,

    Chemi.

Noel J. Bergman wrote:

>Guys,
>
>If some of you would like to help contribute to the NNTP handling, that
>would be great.  Please note that we stick to the RFC specifications.  In
>this case, RFCs 977 and 850 apply.
>
>According to RFC 977, section 3.10.2 (and related), the article being posted
>must end with <CR-LF>.<CR-LF>.
>
>  
>
>>some clients arnt sending the first CRLF, so when the message gets sent
>>back, it doesnt include the CRLF on the end?
>>    
>>
>
>What are they sending?  The bug report,
>http://nagoya.apache.org/jira/browse/JAMES-311, says that they are sending
><CRLF>.<CRLF>, but not <CRLF><CRLF>.<CRLF>.  The latter is not necessary.
>If the code is not working properly for the former, then it is a bug in the
>code.
>
>	--- Noel
>

RE: Problem reading posts from NNTP server

Posted by Daniel Perry <d....@netcase.co.uk>.
Nope,
rfc977 says must use \r\n

But it turns out that james has (and is using) an InternetPrintWriter, which
uses \r\n regarless of host os.  So if you write \r\n. you get \r\n.\r\n

Daniel.

> -----Original Message-----
> From: a.ledvinka@promon.cz [mailto:a.ledvinka@promon.cz]
> Sent: 13 October 2004 15:36
> To: James Users List
> Subject: RE: Problem reading posts from NNTP server
>
>
> i am not perfect in rfc's and standards but \r\n is a "must" just in mail
> data so if it adds just \n it should be fine. correct?
>
>
>
>
> "Daniel Perry" <d....@netcase.co.uk>
> 13.10.2004 16:25
> Please respond to
> "James Users List" <se...@james.apache.org>
>
>
> To
> "James Users List" <se...@james.apache.org>, <da...@apache.org>
> cc
>
> Subject
> RE: Problem reading posts from NNTP server
>
>
>
>
>
> \r\n is put in there for you (provided java knows to use \r\n as newline,
> and not just \n ?).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


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


RE: Problem reading posts from NNTP server

Posted by a....@promon.cz.
i am not perfect in rfc's and standards but \r\n is a "must" just in mail 
data so if it adds just \n it should be fine. correct?




"Daniel Perry" <d....@netcase.co.uk> 
13.10.2004 16:25
Please respond to
"James Users List" <se...@james.apache.org>


To
"James Users List" <se...@james.apache.org>, <da...@apache.org>
cc

Subject
RE: Problem reading posts from NNTP server





\r\n is put in there for you (provided java knows to use \r\n as newline,
and not just \n ?).

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


RE: Problem reading posts from NNTP server

Posted by Daniel Perry <d....@netcase.co.uk>.
Hehe... nope!

I nearly put that, but writeLoggedFlushedResponse uses println, so the final
\r\n is put in there for you (provided java knows to use \r\n as newline,
and not just \n ?).

Daniel.


> -----Original Message-----
> From: Danny Angus [mailto:danny.angus@gmail.com]
> Sent: 13 October 2004 09:13
> To: James Users List
> Subject: Re: Problem reading posts from NNTP server
>
>
> > Should be:
> > writeLoggedFlushedResponse("\r\n.");
>
> Don't shoot me but should that not be..
>
> writeLoggedFlushedResponse("\r\n.\r\n");
>
> ?
> d.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


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


Re: Problem reading posts from NNTP server

Posted by Danny Angus <da...@gmail.com>.
> Should be:
> writeLoggedFlushedResponse("\r\n.");

Don't shoot me but should that not be..

writeLoggedFlushedResponse("\r\n.\r\n");

?
d.

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


RE: Problem reading posts from NNTP server

Posted by Daniel Perry <d....@netcase.co.uk>.
That was me jumping the gun a bit!

Looking at the code, there is a bug.

It should send:
the message content<CRLF>.<CRLF>

It does send:
the message content.<CRLF>

So, if there's a <CRLF> on the end of the message it works... but when the
message has no <CRLF> at the end, james screws up.

NNTPHandler.java line 1504 is:

writeLoggedFlushedResponse(".");

Should be:
writeLoggedFlushedResponse("\r\n.");

I havnt had a chance to edit/compile/test as i have to scoot.

If anyone wants to give it a try, and if someone can commit the change that
would be nice :)

Daniel.


> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: 12 October 2004 18:10
> To: James Users List; jmordax@terra.es
> Subject: RE: Problem reading posts from NNTP server
>
>
> Guys,
>
> If some of you would like to help contribute to the NNTP handling, that
> would be great.  Please note that we stick to the RFC specifications.  In
> this case, RFCs 977 and 850 apply.
>
> According to RFC 977, section 3.10.2 (and related), the article
> being posted
> must end with <CR-LF>.<CR-LF>.
>
> > some clients arnt sending the first CRLF, so when the message gets sent
> > back, it doesnt include the CRLF on the end?
>
> What are they sending?  The bug report,
> http://nagoya.apache.org/jira/browse/JAMES-311, says that they are sending
> <CRLF>.<CRLF>, but not <CRLF><CRLF>.<CRLF>.  The latter is not necessary.
> If the code is not working properly for the former, then it is a
> bug in the
> code.
>
> 	--- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>


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


RE: Problem reading posts from NNTP server

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

If some of you would like to help contribute to the NNTP handling, that
would be great.  Please note that we stick to the RFC specifications.  In
this case, RFCs 977 and 850 apply.

According to RFC 977, section 3.10.2 (and related), the article being posted
must end with <CR-LF>.<CR-LF>.

> some clients arnt sending the first CRLF, so when the message gets sent
> back, it doesnt include the CRLF on the end?

What are they sending?  The bug report,
http://nagoya.apache.org/jira/browse/JAMES-311, says that they are sending
<CRLF>.<CRLF>, but not <CRLF><CRLF>.<CRLF>.  The latter is not necessary.
If the code is not working properly for the former, then it is a bug in the
code.

	--- Noel


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


RE: Problem reading posts from NNTP server

Posted by Daniel Perry <d....@netcase.co.uk>.
Ok, so if i get the problem:

Messages need to end with "CRLF" followed by the terminator "CRLF.CRLF" ?

But some clients arnt sending the first CRLF, so when the message gets sent
back, it doesnt include the CRLF on the end?

Why dont you modify the code so that it puts a crlf on the end if there isnt
one already?

Looking at the code, it should be easy to do as it stores it.

In NNTPRepositoryImpl.java in the createArticle(InputStream in) method:

Just after the copy:

while ( ( bytesRead = in.read(readBuffer, 0, 1024) ) > 0 ) {
    fout.write(readBuffer, 0, bytesRead);
}

ADD:

if (readBuffer[bytesRead==0?1023:bytesRead-1]!='\n'){
    fout.write(new byte[]{'\r','\n'});
}

Note that i havn't tried the code, just made it up in my head :)

Daniel.


> -----Original Message-----
> From: Chemi [mailto:jmordax@terra.es]
> Sent: 12 October 2004 15:59
> To: James Users List
> Subject: Re: Problem reading posts from NNTP server
>
>
> Ok, after some investigation I found there is a bug opened to this:
> http://nagoya.apache.org/jira/browse/JAMES-311
> It seems NNTP clients are not sending messages with CRLFs at the end.
> And this fact breaks the protocol.
>
> Let's see if there is a qucik fix because this is an stopper to deploy
> James as NNTP Server.
>
> Regards,
>
>     Chemi.
>
> Chemi wrote:
>
> > Hi. I have downloaded James to do some NNTP tests.
> > I have created several news groups and post some messages to them
> > (using Mozilla 1.7.3).
> >
> > The problem is accessing to those posts. It is really slow showing the
> > body of the messages (the headers appear instantly). After some tests
> > I was able to confirm that it shows the body after exactly 4 minutes.
> > I did the access once again from Mozilla 1.7.3 and also from a Java
> > Test Client I developed with Jakarta-Commons-Net. In both cases I get
> > the body after 4 minutes.
> >
> > It seems to me that 4 minutes is some kind of time-out internally in
> > James. I did a search within Config.xml file but I didn't find that
> > number. Any idea? The POP3 access hasn't this problem.
> >
> > I also did the test via Telnet (port 119) sending directly NNTP
> > Commands and in that case I get the body instantly with no delay.
> >
> > Any idea? Any help?
> >
> > Thanks in advance,
> >
> >    Chemi.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


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


Re: Problem reading posts from NNTP server

Posted by Chemi <jm...@terra.es>.
Ok, after some investigation I found there is a bug opened to this: 
http://nagoya.apache.org/jira/browse/JAMES-311
It seems NNTP clients are not sending messages with CRLFs at the end. 
And this fact breaks the protocol.

Let's see if there is a qucik fix because this is an stopper to deploy 
James as NNTP Server.

Regards,

    Chemi.

Chemi wrote:

> Hi. I have downloaded James to do some NNTP tests.
> I have created several news groups and post some messages to them 
> (using Mozilla 1.7.3).
>
> The problem is accessing to those posts. It is really slow showing the 
> body of the messages (the headers appear instantly). After some tests 
> I was able to confirm that it shows the body after exactly 4 minutes. 
> I did the access once again from Mozilla 1.7.3 and also from a Java 
> Test Client I developed with Jakarta-Commons-Net. In both cases I get 
> the body after 4 minutes.
>
> It seems to me that 4 minutes is some kind of time-out internally in 
> James. I did a search within Config.xml file but I didn't find that 
> number. Any idea? The POP3 access hasn't this problem.
>
> I also did the test via Telnet (port 119) sending directly NNTP 
> Commands and in that case I get the body instantly with no delay.
>
> Any idea? Any help?
>
> Thanks in advance,
>
>    Chemi.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org


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


Re: Problem reading posts from NNTP server

Posted by Josip Almasi <jo...@vrspace.org>.
Chemi wrote:

> More info about this problem. Reading log file: 
...

> It seems to me that James doesn't send correctly the end information to 
> the client to end the communication. Or Mozilla and Jakarta Common-Net 
> doesn't know when the communictaion has ended, but.... it is 2 against 
> 1. :-)
> 
> Have you seen this behavior before?

Yep. Reader waits till timeout, server never delivers.
Workaround: edit the article and press enter at the last line...

Regards...


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


Re: Problem reading posts from NNTP server

Posted by Chemi <jm...@terra.es>.
More info about this problem. Reading log file: 
nntpserver-2004-10-12-10-10.log I can see this exception:

12/10/04 16:34:34 ERROR nntpserver: NNTP Connection has idled out.
12/10/04 16:34:34 ERROR nntpserver: Exception during connection:socket 
closed
java.net.SocketException: socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
    at sun.nio.cs.StreamDecoder.read(Unknown Source)
    at java.io.InputStreamReader.read(Unknown Source)
    at java.io.BufferedReader.fill(Unknown Source)
    at java.io.BufferedReader.readLine(Unknown Source)
    at java.io.BufferedReader.readLine(Unknown Source)
    at 
org.apache.james.nntpserver.NNTPHandler.handleConnection(NNTPHandler.java:426)
    at 
org.apache.james.util.connection.ServerConnection$ClientConnectionRunner.run(ServerConnection.java:417)
    at 
org.apache.james.util.thread.ExecutableRunnable.execute(ExecutableRunnable.java:55)
    at org.apache.james.util.thread.WorkerThread.run(WorkerThread.java:90)
12/10/04 16:34:35 ERROR nntpserver: NNTP Connection has idled out.
12/10/04 16:34:35 ERROR nntpserver: Exception during connection:socket 
closed
java.net.SocketException: socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
    at sun.nio.cs.StreamDecoder.read(Unknown Source)
    at java.io.InputStreamReader.read(Unknown Source)
    at java.io.BufferedReader.fill(Unknown Source)
    at java.io.BufferedReader.readLine(Unknown Source)
    at java.io.BufferedReader.readLine(Unknown Source)
    at 
org.apache.james.nntpserver.NNTPHandler.handleConnection(NNTPHandler.java:426)
    at 
org.apache.james.util.connection.ServerConnection$ClientConnectionRunner.run(ServerConnection.java:417)
    at 
org.apache.james.util.thread.ExecutableRunnable.execute(ExecutableRunnable.java:55)
    at org.apache.james.util.thread.WorkerThread.run(WorkerThread.java:90)

It seems to me that James doesn't send correctly the end information to 
the client to end the communication. Or Mozilla and Jakarta Common-Net 
doesn't know when the communictaion has ended, but.... it is 2 against 
1. :-)

Have you seen this behavior before?

Thanks in advance,

    Chemi.

Chemi wrote:

> Hi. I have downloaded James to do some NNTP tests.
> I have created several news groups and post some messages to them 
> (using Mozilla 1.7.3).
>
> The problem is accessing to those posts. It is really slow showing the 
> body of the messages (the headers appear instantly). After some tests 
> I was able to confirm that it shows the body after exactly 4 minutes. 
> I did the access once again from Mozilla 1.7.3 and also from a Java 
> Test Client I developed with Jakarta-Commons-Net. In both cases I get 
> the body after 4 minutes.
>
> It seems to me that 4 minutes is some kind of time-out internally in 
> James. I did a search within Config.xml file but I didn't find that 
> number. Any idea? The POP3 access hasn't this problem.
>
> I also did the test via Telnet (port 119) sending directly NNTP 
> Commands and in that case I get the body instantly with no delay.
>
> Any idea? Any help?
>
> Thanks in advance,
>
>    Chemi.
>


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