Http Proxy integration issue with JVM

What I am trying to do

I am unable to proxy through linkerd after setting it up at tomcat start up

JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=$NODE_NAME -Dhttp.proxyPort=4140"


Date:    Wed, 26 Jul 2017 15:33:10 GMT
Expires:    -1
Cache-Control:    private, max-age=0
Content-Type:    text/html; charset=ISO-8859-1
P3P:    CP="This is not a P3P policy! See for more info."
Server:    gws
X-XSS-Protection:    1; mode=block
X-Frame-Options:    SAMEORIGIN
Set-Cookie:    NID=108=XDlEOBjTy7EJW6CUZrQHcF0HrD1LXCwG8ccJ9I-G14GxcKrYy4b93XkBGQ04R70jNNYmwzZf-6xzr5y06dGNK38EIT6dpOXhK_9KokqzsKUe5XJvmi34rGhVbANNThhg; expires=Thu, 25-Jan-2018 15:33:10 GMT; path=/;; HttpOnly
Alt-Svc:    quic=":443"; ma=2592000; v="39,38,37,36,35"
Accept-Ranges:    none
Vary:    Accept-Encoding
Transfer-Encoding:    chunked
<!doctype html><html itemscope="" itemtype="" lang="en"><head><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title>
when I make a request to an endpoint like, I don't see the via header
the l5d is configured to route to external endpoints btw
I am able to do this with simple http_proxy curl from command line
But When my rest api makes a call to endpoint like google, the request is not proxied
despite of setting the JAVA_OPTS in

Did I verify the if JAVA_OPTS are actually set?
Yes, I shell into the pod and did echo $JAVA_OPTS

Hi @zshaik. Please correct me if I’m mistaken but this sounds like more of a tomcat issue than a Linkerd one? I don’t personally have any experience with tomcat but perhaps someone in the tomcat community could help you figure out how to get tomcat to use the http proxy variables?

1 Like

I went back and tested this locally and found its indeed the tomcat issue, we are working on it.

Thank you.