Вопрос

I am trying to debug an legacy application, for which I do not have code.

What the application does is (one of the task) make a hit on a http://SOME_IP:8080 URL (on internet). The network where this application is deployed needs proxy to access this URL. I have configured proxy in the JVM configuration using

-Dhttp.proxyHosts=ip -Dhttp.proxyPort=8080 -DnonProxyHosts=localhost|127.0.0.1

Now, on logging on to the application I get an exception in the logs, which is:

java.lang.NullPointerException
    at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:453)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
    at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:662)
10:56:23,104 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.NullPointerException
    at org.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:453)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
    at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:662)

Everything works fine if I remove proxy settings from server startup script.

What could be the issue? Why is proxy settings breaking josso?

Это было полезно?

Решение

Figured it out, had to do a tcpdump for this. The josso internally hits on http://0.0.0.0:8080 URL, which was being routed through proxy. Added Ip 0.0.0.0 in nonProxyHosts and it worked.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top