Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 23:02
    jebeaudet commented #3314
  • Jan 31 2019 22:50
    joakime commented #3314
  • Jan 31 2019 22:50
    joakime commented #3314
  • Jan 31 2019 22:48
    joakime commented #3314
  • Jan 31 2019 22:46
    olamy commented #2878
  • Jan 31 2019 22:45
    jebeaudet commented #3314
  • Jan 31 2019 22:41
    joakime commented #3314
  • Jan 31 2019 22:39
    joakime commented #3314
  • Jan 31 2019 22:26
    jebeaudet edited #3314
  • Jan 31 2019 22:24
    jebeaudet opened #3314
  • Jan 31 2019 17:28
    sbordet commented #3313
  • Jan 31 2019 17:20
    sbordet review_requested #3313
  • Jan 31 2019 17:20
    sbordet review_requested #3313
  • Jan 31 2019 17:20
    sbordet opened #3313
  • Jan 31 2019 17:18

    sbordet on jetty-10.0.x-1350-dynamic_client_transport

    Issue #1350 - Dynamic selection… (compare)

  • Jan 31 2019 16:37

    sbordet on jetty-10.0.x-132_client_connector

    (compare)

  • Jan 31 2019 16:37

    sbordet on jetty-10.0.x

    Issue #132 - ClientConnector ab… Issue #132 - ClientConnector ab… Issue #132 - ClientConnector ab… and 2 more (compare)

  • Jan 31 2019 16:37
    sbordet closed #3267
  • Jan 31 2019 16:15
    sbordet synchronize #3312
  • Jan 31 2019 16:15

    sbordet on jetty-9.4.x-3311-http_https_same_port

    Fixes #3311 - Ability to serve … (compare)

Joakim Erdfelt
@joakime
the correct and up to date plugin is jetty-maven-plugin
@davidkarlsen please file an issue at https://github.com/eclipse/jetty.project/issues and include the specific version of jetty you are using and complete stacktrace.
The Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 0 null indicates both an old Jetty version in use (the message has been cleaned up in recent versions), and an HTTP response from the remote that isn't a WebSocket upgrade. (details of the failure are typically reported in logging)
David J. M. Karlsen
@davidkarlsen
ah - I am using same version in both cases - latest .14
I’ll check if some deps snook in
tomate et2448$ unzip -t target/icp-automate-1.0-SNAPSHOT.war |grep -i jetty
testing: WEB-INF/jetty-web.xml OK
testing: WEB-INF/jetty-websocket-httpclient.xml OK
Davids-Work-MacBook-Pro:icp-automate et2448$
Joakim Erdfelt
@joakime
enable debug logging on org.eclipse.jetty.client (for http client specific details) and org.eclipse.jetty.http (for http specific details) and org.eclipse.jetty.websocket (for websocket details)
David J. M. Karlsen
@davidkarlsen
will do
Joakim Erdfelt
@joakime
the response status (and headers) should be printed, it might help diagnose what's going on.
joakime @joakime is afk
David J. M. Karlsen
@davidkarlsen
ENV JAVA_OPTIONS="-Dorg.eclipse.jetty.client.level=DEBUG”
right?
joakime @joakime is back
Joakim Erdfelt
@joakime
@davidkarlsen only when using Jetty's own StdErrLog implementation.
if you are using slf4j, then the slf4j configuration needs to be edited.
David J. M. Karlsen
@davidkarlsen
got the output - can I post here or will it pollute the channel?
Joakim Erdfelt
@joakime
use gist.github.com
you have an account there (if you have one on github.com)
and you can delete the log later (if you want)
David J. M. Karlsen
@davidkarlsen
okidok
aha - new error now - so the .xml is actually read
1;38;5;2mweb  | 2018-11-28 17:22:09.397:WARN:oejwc.XmlBasedHttpClientProvider:main: Unable to load: file:/app/resources/jetty-websocket-httpclient.xml
web  | java.lang.ClassNotFoundException: org.eclipse.jetty.client.HttpClient
I’ll post my config in the gist
Joakim Erdfelt
@joakime
the package org.eclipse.jetty.client is not exposed through the WebAppClassloader Isolation typically.
David J. M. Karlsen
@davidkarlsen
Hmmm I found the config in some github issue for jetty
howto configure proxy then?
Joakim Erdfelt
@joakime
ah, that's different then websocket
proxy is the proxy module in your ${jetty.base}
David J. M. Karlsen
@davidkarlsen
for a websocket client
David J. M. Karlsen
@davidkarlsen
?
David J. M. Karlsen
@davidkarlsen
ait - got it to work, added the config file on class path and added http://repo1.maven.org/maven2/org/eclipse/jetty/websocket/javax-websocket-client-impl/ to the app -> happytimes
onlysolace
@onlysolace
Hello! I was wondering if someone knows how I could redirect all HTTP requests on port 8080 to port 8443 on a Spring Boot project
but I am not sure how I can use it to add some kind of redirection rule
Joakim Erdfelt
@joakime
@onlysolace to redirect from HTTP to HTTPS means you'll have 2 ServerConnectors, each with their own HttpConfiguration. first, make sure that the HTTP ServerConnector / HttpConfiguration has the correct securePort / secureScheme values that point to the HTTPS connector.
Next, add the SecureRedirectHandler to your handler list (somewhere early, perhaps even the first entry)
For redirects, you can either use the Servlet API's .sendRedirect() from a Servlet
or you can use the Jetty RedirectHandler and whatever rules you want to attach to it.
just make sure that RedirectHandler sits before your application handlers in the handler tree.
onlysolace
@onlysolace
@joakime I got it working! Thank you so much :)
David (javalin.io)
@tipsy
if you throw an java.lang.Error in a servlet, jetty seems to retry the request. where can i find documentation about this?
Simone Bordet
@sbordet
@tipsy I guess what you see is that there is no error page defined, and Jetty redispatches the request with DispatcherType=ERROR to generate an error page
David (javalin.io)
@tipsy
thanks @sbordet, is there a page where i can read more about that?
Simone Bordet
@sbordet
@tipsy this is described in the servlet specification 3.1, section 10.9.2
David (javalin.io)
@tipsy
oh, i assumed it was jetty specific, thank you!
Ayaz
@hwasin

Hi. I've caught javax.net.ssl.SSLException: SSL peer shut down incorrectly exception on a client side. After debug enabled on jetty side i found out that Jetty failed to flush TLS close_notify(). I think this might be caused by socket sender buffer being full. I also read jetty source code and for some reason flushing close_notify() does not happen even it is commented so:

switch (wrapResultStatus)
                    {
                        case CLOSED:
                            // The SSL engine has close, but there may be close handshake that needs to be written
                            if (BufferUtil.hasContent(_encryptedOutput))
                            {
                                _cannotAcceptMoreAppDataToFlush = true;
                                getEndPoint().flush(_encryptedOutput);
                                getEndPoint().shutdownOutput();
                                // If we failed to flush the close handshake then we will just pretend that
                                // the write has progressed normally and let a subsequent call to flush
                                // (or WriteFlusher#onIncompleteFlushed) to finish writing the close handshake.
                                // The caller will find out about the close on a subsequent flush or fill.
                                if (BufferUtil.hasContent(_encryptedOutput))
                                    return false;
                            }

false returned value is not checked by caller

Following WA helps:
while(!getEndPoint().flush(_encryptedOutput) && i < 10) {
                                    try {
                                        Thread.sleep(10);
                                    } catch (InterruptedException e) {
                                        LOG.ignore(e);
                                    }
                                    i++;
}
Could you please share your thoughts on this issue?
Simone Bordet
@sbordet
@hwasin please open a GitHub issue about this and let's discuss it there