We have installed JIRA on a server in a restricted network domain, using a reverse proxy server to make it accessible for everyone in the intranet. The reverse proxy server is running on port 443, and is forwarding to port 8080 on the JIRA server.
As we want to use REST calls from inside the restricted network, we would like to use a second connector without the proxy related parameters.
Therefore I edited server.xml as follows:
<Connector acceptCount="100" bindOnInit="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true" proxyName="project.g02.fujitsu.local" proxyPort="443" scheme="https"/>
<!-- Second connector for internal access -->
<Connector acceptCount="100" bindOnInit="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8081" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true" />
Unfortunately it is not working as expected. The way through the proxy server is still working, but when I try to use the second connector (with http://<server>.<domain>:8081 I get a 404 error and a catalina log entry saying:
27-Feb-2018 12:51:27.972 INFO [http-nio-8081-exec-11] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:462)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Is our idea of using two connectors a blind alley or is there a way out?
The problem was that the reverse proxy is using a non-empty path which is defined in the context entry of server.xml. This path value has to be used for the second connector as well.
The solution was therefore to use reverse proxying for the second connector, too, so that the same path value applies to both.
Hi Jean,
Thanks for posting back with a solution here!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.