Re: [jetty-users] Jetty http2 client request hangs indefinitely

2020-01-09 Thread Santhosh Kumar
Hi,

   I have reproduced the issue and have the debug logs and client dump

 Is there a separate channel or private window where I can share the logs?
(I don't want to share it publicly).

On Fri, Sep 27, 2019 at 11:48 AM Santhosh Kumar 
wrote:

> >oggers are hierarchical.
>
> When you declare a logger for ...
>
> final static Logger logger =
>  Logger.getLogger(com.acme.project.MyClass.class.getName());
>
> You are asking for a logger on ...
>
>- / (root)
>   - com
>  - acme
> - project
>- MyClass *<-- this leaf*
>- MyOtherClass
>- utils
>   - UtilityLib
>- common
>- CoreBehaviors
>
>
> The logging configuration you give is for that specific logger and all
> children.
>
> So if you obtain a logger at say "com.acme" via
> Logger.getLogger("com.acme")
> and then setup an appender on that logger then all events that belong
> within "com.acme.*" get that configuration.
> Such as from com.acme.common.CoreBehaviors, and
> com.acme.project.MyOtherClass, and com.acme.project.utils.UtilityLib, etc...
> But not from org.eclipse.jetty.*
>
> You can put the logging configuration anywhere in this hierarchy that best
> suits you.
>
> log4j is quite capable, but doesn't have some advanced features that other
> slf4j implementation offer.
> Such as SiftingAppenders (which will pick details from the logging event,
> its NDC, and its MDC to route logging events).
> Or Discriminators that allow you to associate Appenders to details in the
> logging event (or its NDC, or its MDC).
>
> Thanks very much for the explanation Joakim, now I understood how it works
> :)
>
> On Thu, Sep 26, 2019 at 11:53 PM Joakim Erdfelt 
> wrote:
>
>> Loggers are hierarchical.
>>
>> When you declare a logger for ...
>>
>> final static Logger logger =
>>  Logger.getLogger(com.acme.project.MyClass.class.getName());
>>
>> You are asking for a logger on ...
>>
>>- / (root)
>>   - com
>>  - acme
>> - project
>>- MyClass *<-- this leaf*
>>- MyOtherClass
>>- utils
>>   - UtilityLib
>>- common
>>- CoreBehaviors
>>
>>
>> The logging configuration you give is for that specific logger and all
>> children.
>>
>> So if you obtain a logger at say "com.acme" via
>> Logger.getLogger("com.acme")
>> and then setup an appender on that logger then all events that belong
>> within "com.acme.*" get that configuration.
>> Such as from com.acme.common.CoreBehaviors, and
>> com.acme.project.MyOtherClass, and com.acme.project.utils.UtilityLib, etc...
>> But not from org.eclipse.jetty.*
>>
>> You can put the logging configuration anywhere in this hierarchy that
>> best suits you.
>>
>> log4j is quite capable, but doesn't have some advanced features that
>> other slf4j implementation offer.
>> Such as SiftingAppenders (which will pick details from the logging event,
>> its NDC, and its MDC to route logging events).
>> Or Discriminators that allow you to associate Appenders to details in the
>> logging event (or its NDC, or its MDC).
>>
>> Joakim Erdfelt / joa...@webtide.com
>>
>>
>> On Thu, Sep 26, 2019 at 1:10 AM Santhosh Kumar 
>> wrote:
>>
>>> >Since it is the first request that triggers the connection opening, I
>>> want to see the debug logs to understand why the connection
>>> establishment failed
>>>
>>> I m trying to get the debug logs but I face a problem where debug logs
>>> are always redirected to RootLogger (SLF4j-log4j). How to redirect the
>>> debug logs to logs file other than rootLogger. I have also raised a SO
>>> question with other details like how I tried(
>>> https://stackoverflow.com/questions/58101857/move-jetty-httpclient-debug-logs-from-rootlogger
>>> ). Kindly let us know how to handle this case.
>>>
>>> My sample is as follows,
>>>
>>> private final static Logger logger =  Logger.getRootLogger();
>>>
>>> public static void main(String[] args) {
>>> DailyRollingFileAppender timeAppender = new DailyRollingFileAppender();
>>> timeAppender.setDatePattern("'.'-MM-dd-HH-mm");//write at start of 
>>> every minute
>>> timeAppender.setName("FileLogger");
>>> timeAppender.setFile("/path-to-log/client.log");
>>> timeAppender.setLayout(new PatternLayout("%t %p %d %-5p [%c{1}] %m%n"));
>>> timeAppender.setThreshold(Level.ALL);
>>> timeAppender.setAppend(true);
>>> timeAppender.activateOptions();
>>> logger.setAdditivity(false);
>>> logger.addAppender(timeAppender);
>>>
>>> logger.debug("JDK Used-->"+System.getProperty("java.version"));
>>> //HttpClient code follows
>>> ..
>>>
>>>
>>> and my logger files prints,
>>>
>>> main DEBUG 2019-09-25 20:26:07,347 DEBUG [JettyJMX] JDK -->1.8.0_212
>>> main DEBUG 2019-09-25 20:26:07,485 DEBUG [log] Logging to 
>>> org.slf4j.impl.Log4jLoggerAdapter(org.eclipse.jetty.util.log) via 
>>> 

Re: [jetty-users] IllegalStateException in org.eclipse.jetty.server.HttpOutput#write(byte[], int, int)

2020-01-09 Thread Greg Wilkins
Eric,
correct diagnosis!  We have already fixed this (see
https://github.com/eclipse/jetty.project/issues/4461) and a new release
will be coming soon.

regards


On Fri, 10 Jan 2020 at 12:45, Eric Theriault  wrote:

> Hi--
>
>
>
> I have just upgraded to 9.4.25.v20191220 and I have a piece of code that
> calls org.apache.commons.io.IOUtils.copy(inputStream, outputStream), where
> the outputStream is an instance of HttpOutput -- this code essentially just
> reads the code in chunks of 4096 bytes and writes that to the outputStream.
>
> For one stream in particular (I'm still trying to figure out what is
> different with it), after sending 64,428 bytes, it sets the _apiState to
> BLOCKED.  When the next segment is copied over, however, the _apiState is
> still BLOCKED and falls into the default case which throws
> an IllegalStateException.
>
> I've traced through the code and in line 806, I wonder why the code does
> not call onWriteComplete as would happen in line 835.  Is that the bug?  Or
> is there something more subtle here?
>
>
> https://github.com/eclipse/jetty.project/blob/jetty-9.4.25.v20191220/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java#L806
>
>
> https://github.com/eclipse/jetty.project/blob/jetty-9.4.25.v20191220/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java#L835
>
> Looks like this was recently changed in
> https://github.com/eclipse/jetty.project/pull/4409 if I understand
> correctly.
>
> This is the exception for reference:
>
> java.lang.IllegalStateException: s=OPEN,api=BLOCKED,sc=false,e=null
> at
> org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:767)~[jetty-server-9.4.25.v20191220.jar:9.4.25.v20191220]
> at
> org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:639)
> ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
> at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2315)
> ~[commons-io-2.6.jar:2.6]
> at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
> ~[commons-io-2.6.jar:2.6]
> at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
> ~[commons-io-2.6.jar:2.6]
> at org.apache.commons.io.IOUtils.copy(IOUtils.java:2246)
> ~[commons-io-2.6.jar:2.6]
>
> Thanks for any insight.
>
>
>
>
> Eric
> ___
> jetty-users mailing list
> jetty-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users



-- 
Greg Wilkins  CTO http://webtide.com
___
jetty-users mailing list
jetty-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

[jetty-users] IllegalStateException in org.eclipse.jetty.server.HttpOutput#write(byte[], int, int)

2020-01-09 Thread Eric Theriault
Hi--



I have just upgraded to 9.4.25.v20191220 and I have a piece of code that calls 
org.apache.commons.io.IOUtils.copy(inputStream, outputStream), where the 
outputStream is an instance of HttpOutput -- this code essentially just reads 
the code in chunks of 4096 bytes and writes that to the outputStream.

For one stream in particular (I'm still trying to figure out what is different 
with it), after sending 64,428 bytes, it sets the _apiState to BLOCKED.  When 
the next segment is copied over, however, the _apiState is still BLOCKED and 
falls into the default case which throws an IllegalStateException.

I've traced through the code and in line 806, I wonder why the code does not 
call onWriteComplete as would happen in line 835.  Is that the bug?  Or is 
there something more subtle here?

https://github.com/eclipse/jetty.project/blob/jetty-9.4.25.v20191220/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java#L806

https://github.com/eclipse/jetty.project/blob/jetty-9.4.25.v20191220/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java#L835

Looks like this was recently changed in 
https://github.com/eclipse/jetty.project/pull/4409 if I understand correctly.

This is the exception for reference:

java.lang.IllegalStateException: s=OPEN,api=BLOCKED,sc=false,e=null
at 
org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:767)~[jetty-server-9.4.25.v20191220.jar:9.4.25.v20191220]
at 
org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:639)
 ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2315) 
~[commons-io-2.6.jar:2.6]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270) 
~[commons-io-2.6.jar:2.6]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291) 
~[commons-io-2.6.jar:2.6]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2246) 
~[commons-io-2.6.jar:2.6]

Thanks for any insight.




Eric
___
jetty-users mailing list
jetty-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

[jetty-users] Eclipse Jetty 9.4.25 Has Been Released!

2020-01-09 Thread Chris Walker
Greetings!


The Jetty team is happy to announce the immediate availability of a new
release for the Eclipse Jetty 9.4.x branch. Jetty 9.4.25.v20191220 includes
a number of bug fixes and improvements. It is recommended that all users
upgrade as soon as they are able. A full list of changes for this release
is listed at the end of this email.


This release available on the Eclipse Jetty project download page or from
the Maven Central repository:

   -

   Eclipse: https://www.eclipse.org/jetty/download.html
   -

   Maven Central: http://central.maven.org/maven2/org/eclipse/jetty/


Documentation for this release can be found on the Eclipse Jetty project
site:

   -

   https://www.eclipse.org/jetty/documentation/


If you find any issues with this release, or if you want to suggest future
enhancements, please file an issue on the Jetty GitHub page:

   -

   https://github.com/eclipse/jetty.project/issues/new


Commercial production and development support for Jetty is offered through
Webtide (www.webtide.com). Please contact us 
for more information or email je...@webtide.com to discuss your specific
needs.


Best Regards,

The Jetty Development Team


*jetty-9.4.25.v20191220 - 20 December 2019*
 + 995 UrlEncoded.encodeString should skip more characters
 + 2195 Add parameter expansion to start.jar --exec parameters
 + 3512 File descriptor is not released after zip file uploaded via
jetty-client
 + 3730 WebSocketClient constructor cleanup (and deprecations)
 + 4269 ResponseWriter should not throw RuntimeIOExceptions
 + 4323 QOS Filter does not handle IllegalStateException and never releases
passes
 + 4329 rewrite prevents URL session tracking.
 + 4331 Improve handling of HttpOutput.close() for pending writes
 + 4350 Deprecated MultiPartInputStreamParser still used in jetty-server
(MultiPartsUtilParser) but OSGi ExportPackage suppressed
 + 4351 Servlet.service called before Servlet.init is finished when servlet
is lazily initialized
 + 4363 jetty-maven-plugin no longer processes supplied context.xml-file.
 + 4366 HTTP client uses SOCKS4 proxy hostname for SSL hostname verification
 + 4374 Jetty client: Response.AsyncContentListener.onContent is not called
 + 4376 Async Content Complete bug results in
org.eclipse.jetty.io.EofException: Async closed
 + 4385 Limit new UnsupportedOperationException to direct base class
SslContextFactory usage
 + 4392 Suppress logging of QuietException in HttpChannelState.asyncError()
 + 4402 NPE in JettyRunWarExplodedMojo
 + 4411 Jetty server spins on incomplete request due to delayed dispatch
until content
 + 4415 GzipHandler invalid input zip size on large (over 2,147,483,647
bytes) request body content
 + 4421 HttpClient support for PROXY protocol
 + 4427 Retried HttpClient Requests can result in duplicates cookies
___
jetty-users mailing list
jetty-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users