Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] ProxyServlet$Transparent returns 502 for external sites
  • From: "Houtman, Roland" <Roland.Houtman@xxxxxxxxxxxxxxx>
  • Date: Fri, 19 Jul 2019 08:44:14 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=nl.yokogawa.com;dmarc=pass action=none header.from=nl.yokogawa.com; dkim=pass header.d=nl.yokogawa.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jo2YLg25XT5zgDveAmAGL2YoVfiIPqS/DBZqfVn0gRo=; b=QjlILxo+sGt4mJIeDVFz3TWicyp6E0zO/JnRYmsyVV9jN65SkQL7thupb0pBB7pSQ+6GRgp9YAbE77HPwjdOCgaMGwoVSeEH2uXb08alDG14XDZEoUBKGCG/5e22E00Vz19auCmvCj4ijQ8AgXD+cpWaDwYGr6zXZbU3hQ6Apf8jkqcl5gPD70r6mGFYhS5NtPB1pe+kuLr55Ck0wp/msSAt8VtZ8EhxDemYmB8FQ9iIqfsWDOftU+EsPPA+dXKauTHndc9CESUh2ZRmZDMhaN3bjj8hmh34DqoSPA/1H3TE4QCqIcQGZOFj33tmYyK2Cf/oAQSGj94oZEilike50Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Aa4CSicmlVjy3IU7OdNlZHEqV53xiTAI18YVV3/TpZN6D8zsjPY9z47iM1L2bbJ9FdsbtYZaHXaGi2NZNBCPLwGSEaSUtlQ0KHQE3frSpod2J9DgkxWvzbL4F68oBvqBHQBKpBLfSqql14xCy4hOLFGb5JyqKYWgaTbZxQ7bARRE1YHECHjoqJA3O6eAKcXxUSPhELA5RWpFyJgLAXmbgrX574dWTy8a/6mtGzXDL4H5WtLdwWWP/3++CsKkqfs0Gak8DOiocVVqDLfTjlyKI86/7TfnrgEllNnAUbFnVmq3drSiAHIR6ZbcN7lXV7VT256SnEnQ8aNxumayTF9ukg==
  • Delivered-to: jetty-users@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jetty-users>
  • List-help: <mailto:jetty-users-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jetty-users>, <mailto:jetty-users-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jetty-users>, <mailto:jetty-users-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHVPg4kMs6mcuui9UmF6xNMK0l21g==
  • Thread-topic: [jetty-users] ProxyServlet$Transparent returns 502 for external sites

I also tried;

 

1 ### Let Jetty use PROXY settings

using the next flags for the VM in order to let Jetty use our company proxy

               -Dhttp.proxyHost=

               -Dhttp.proxyPort=

               -Dhttps.proxyHost=

               -Dhttps.proxyPort=

 

               It still gave the 502/Bad gateway

 

2 ### Changing the proxy to refer to https directly

( Because if I navigate to the http url (as written in the original web.xml) with my browser it redirects to the https variant. So I thought maybe the servlet doesn’t cope with the redirct. )

Changed

Jetty9.4\demo-base\webapps\javadoc-proxy.war\WEB-INF\web.xml

To refer to

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

Instead of http://,  Now when I access the demo-base  Javadoc link then, I get this:

HTTP ERROR 500

Problem accessing /proxy/current/. Reason:

    Server Error

Caused by:

java.lang.NullPointerException: Missing SslContextFactory

  at java.util.Objects.requireNonNull(Objects.java:228)

  at org.eclipse.jetty.io.ssl.SslClientConnectionFactory.<init>(SslClientConnectionFactory.java:55)

  at org.eclipse.jetty.client.HttpClient.newSslClientConnectionFactory(HttpClient.java:1170)

  at org.eclipse.jetty.client.HttpDestination.newSslClientConnectionFactory(HttpDestination.java:137)

  at org.eclipse.jetty.client.HttpDestination.<init>(HttpDestination.java:94)

  at org.eclipse.jetty.client.PoolingHttpDestination.<init>(PoolingHttpDestination.java:25)

  at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.<init>(HttpDestinationOverHTTP.java:32)

  at org.eclipse.jetty.client.http.HttpClientTransportOverHTTP.newHttpDestination(HttpClientTransportOverHTTP.java:51)

  at org.eclipse.jetty.client.HttpClient.destinationFor(HttpClient.java:542)

  at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:575)

  at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:726)

  at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:718)

  at org.eclipse.jetty.proxy.AbstractProxyServlet.sendProxyRequest(AbstractProxyServlet.java:561)

  at org.eclipse.jetty.proxy.ProxyServlet.service(ProxyServlet.java:119)

 

 

 

Regards

 

 

From: jetty-users-bounces@xxxxxxxxxxx <jetty-users-bounces@xxxxxxxxxxx> On Behalf Of Houtman, Roland
Sent: Friday, July 19, 2019 9:43 AM
To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
Subject: Re: [jetty-users] ProxyServlet$Transparent returns 502 for external sites

 

Thanks,

 

I downloaded Jetty latest 9.4, ran the demo-base and was looking around,

Then I found that the transparent-proxy is used for redirecting to the online Javadoc

               Localhost:8080/proxy/current

 

So, I click it and I also get “502 bad gateway”

 

Is there some logging which I can pick up to see why the remote site returns 502?

 

 

Kind regards

 

 

From: jetty-users-bounces@xxxxxxxxxxx <jetty-users-bounces@xxxxxxxxxxx> On Behalf Of Joakim Erdfelt
Sent: Thursday, July 18, 2019 7:29 PM
To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
Subject: Re: [jetty-users] ProxyServlet$Transparent returns 502 for external sites

 

Start by upgrading your version of Jetty, and try again.

 

Version 9.0 was an experimental / transitional release series between Servlet 3.0 (Jetty 8) and 3.1 (Jetty 9).

That series has been EOL (End of Life) for a long time. (many years now)

 


Joakim Erdfelt / joakim@xxxxxxxxxxx

 

 

On Thu, Jul 18, 2019 at 11:50 AM Houtman, Roland <Roland.Houtman@xxxxxxxxxxxxxxx> wrote:

Hi,

 

I’m trying to use the ProxyServlet$Transparent

So far I am succeeding when proxying HTTP requests to my local GeoServer

 

But when I proxy to a www URL, then I get 502 bad gateway on two separate servers.

 

I’m working from office, so I do work behind a proxy.

What are things I can check to come closer to fixing this issue?

 

I listed the test URLS in the web.xml for reference and minimal-test-setup

Using jetty-9.0.7.v20131107

 

Kind regards,

Roland

 

 

 

 

 

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


Back to the top