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: Tue, 23 Jul 2019 09:10:45 +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=rnPKYsmMPN5/YlsjbiwW5CiFSRAm6RyTrpvdUsTGWUY=; b=AayjJ1H+Mh1nPBn18IHGMVDwfP0FKM4QNe53nzk5cOB1ubrGeEwsp86NMGaA58hJqfxON003YnXjm5OYxIXkJE+JBzrTUlGkwkRP968DvdApkeUh1bgXhytAnMw0DEj5+AC9zXN7uS9y+mHAh5/DCpNSwIPG+vlgFBeefy14+w/yR8Lvdg+x9fVlaODDommt2jCPkXTyqlnnGh3MQ0uxmLr2lyx7Xbz8r6c6XjfWI9cwzQaCjsr3hxsLTwBmjirFaqCd1UceNf3jR5wdgmg/ZODL+RFlCgVZiR11pfbI/AoQoH/N/asiswUi4VM6tzSRw11l914/ha6k5lKdUiIZvw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WSsibqT9FsEuQRbt4LL0nodTg52qVFlMKlgjmfOLxUzdozCC4KAOMDiSoSov6TajM9TB81YMYjUtUa4wehQc3j/Wj3ic18wacxzfu8qyLBz2Roy4+L+WP0R7074wlHCz4+Jvd4tsz7aJK/FZUV9UCCcGmYCTDx676MGoqepzDkDYWmnegI01E/57rCbhBZBY+fTKyQExdd/4dagC6FGY1Np+ttuZ1B7/eFmZpzN+tX4Jl98UBoguhd95RQF5uliuF+tfVYE8CnjypZeI3qV7vZN39l+c9eUPc/O3jx9FdJSNKBXslXISEPZt1VcZZjLaJ6eivlM3utHoJMvCh/qdew==
  • 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: AQHVQTaCsVjMl731Y0+qpjOP4sU5Bg==
  • Thread-topic: [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