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: Wed, 4 Sep 2019 14:08:52 +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=VJf0gfOZpcdgmR1ZLPunWB97Me9tAmecaIn5hNGF4wc=; b=GFYpnsLXo6mfhEB19wgKvRksAm+xL3noNNIjf0VBN0HXB6KKq1h29lnGDdC6AHju7ab4Qz5680W5MUgti1zCxLmM4lT+vcDLBa71FeOUjLsOlzB8wicwvz1IIJs2WS/Dbj3RKeGJ2MwzYGXDM5ahLy1gm/2lfcMvNlChorCBlw7WIcsv9U2KmZ0BFVOX9NyqRtWsBHhbsiaLPWwrKqyytw+S9yBGoPm8ItINp3JVcaGCJgHwG4nwah1ZLrjxkyvGQACxpCz71vv8Df0Ir9pmuC1c6PA1m7G+IrbKPckLYB2zsD+l3Pc3e87HsNhiFfjGIHa/pDxS9EFWmm0LFgvToQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PWWL8QU5oJVZFdbdLy55GPA7BhBFdBycB4xvEWKGn/RXrB1oSdWUi/3QkkqSIJyYX7jq4sUEiF6gAyeOte5GxR/aE23K9RvAbFnbPyC9oyhip94xJaEKfpHMnOiyJ4j4PTNSO313nNX7TcQjqtt0J5aljWmJgGElTBlAw4ipk7LmjYaJt4M+lv9qSzVTZItBE55xVQnR56A1IXvJ/wTmAuAs/toYkw8aRyznDZGA6nB1UiqqV/Wr+WrWlmNNP4eZjJO9Di4cX0dMDME03nnFivN/YYQ66T6QCi5xZJaPQa0pyQQK+yrIYAEKfDjD4fqtZo4gPLNERpbRaOkEYfPI7w==
  • 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: AQHVYypHVe9gAy3cWESYnTALf4ypOQ==
  • Thread-topic: [jetty-users] ProxyServlet$Transparent returns 502 for external sites

Hi Team,

 

I had downloaded the latest Jetty 9.4(July 23), ran the demo-base and clicked the “Javadoc (via transparent proxy)” link.

Even though I had set up Java to use my company proxy using -Dhttp.proxyHost etc.. it still gave me a 502 Bad Gateway.

 

I’m suspecting that the Javadoc-site switching from HTTP to HTTPS (as do many sites) is part of the issue. (see the stacktrace below)

Can someone confirm that setting up a network-proxy and clicking the demo-base Javadoc link works?

 

 

Kind regards,

Roland

 

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

 

Gents,

 

Seeing this issue happens even in the latest Jetty,

 

> 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

>  It is in the middle column “information…” the link  “Javadoc (via transparent proxy)”

>  There I also get “502 bad gateway”

 

Is the “502 bad gateway” a common issue for the “Transparent Proxy” when behind a company proxy?

It happens even though I setup Java to use my company proxy.

 

 

Rergards

 

From: jetty-users-bounces@xxxxxxxxxxx <jetty-users-bounces@xxxxxxxxxxx> On Behalf Of Houtman, Roland
Sent: Friday, July 19, 2019 10:44 AM
To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
Subject: Re: [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