Product: PDFTron Server
Product Version: Latest
We are upgrading from PDFtron server version 2.0.0 to 2.1.7.
The only change we’ve made when switching versions is changing the APR connector in server.xml to the NIO2 connector as the APR connector has been removed from Tomcat 10.1+. Other than that, we have made no other changes. I did notice that there is one thing in this image that is not in the others. It’s the fetch to 0.0.0.0:8090/test/sample.pdf. What I am noticing, on my local this works fine. However, we have the base-image running into our single EC2 instance on AWS and this fetch to 0.0.0.0:8090/test/sample.pdf just keeps repeating and eventually our health check recycles the container because it sees it as unhealthy.
The server starts up fine, this check is done after the server startup and is not present in the 2.0.0 version. I can’t find any reference to it in the dockerfile that comes with the image or in the python file for the health check. Is it supposed to be hitting 0.0.0.0, or is there a way to change this to localhost?
Is there other considerations we need to take in when switching from the APR connector to the NIO2. I’m also a bit confused why it’s attempting to hit 0.0.0.0 instead of something like localhost.
Thank you
17-Jan-2024 19:44:29.302 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [9084] milliseconds
17-Jan-2024 19:44:39.128 INFO [http-nio2-8090-exec-4] com.pdftron.server.ServerConfig.addToConversionQueue convQ - 0 - adding job
17-Jan-2024 19:44:39.138 INFO [pool-4-thread-1] com.pdftron.server.DocManagement$DocFetchTask.doFetch Kicking off potential fetch of http://0.0.0.0:8090/test/sample.pdf
This repeats until it recycles
Below is the error we receive.
Jan 19, 2024 1:19:04 AM com.pdftron.blackboxservlet.GetPDF doGet SEVERE: Failed to GetPDF java.lang.Exception: unable to complete fetch of http-0.0.0.0:8090/test/sample.pdf HTTP failure 404, null at com.pdftron.server.DocManagement$DocFetchTask.waitForConversion(DocManagement.java:157) at com.pdftron.server.DocManagement.fetchAndConvert(DocManagement.java:514) at com.pdftron.server.DocReference.fetchLocalBlocking(DocReference.java:487) at com.pdftron.blackboxservlet.GetPDF.doGet(GetPDF.java:181) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.pdftron.server.CorsFilter.handleNonCORS(CorsFilter.java:356) at com.pdftron.server.CorsFilter.doFilter(CorsFilter.java:175) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.pdftron.server.DocModModifier.doFilter(DocModModifier.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.pdftron.server.BlackBoxAuthenticator.doFilter(BlackBoxAuthenticator.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:735) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1683) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1243) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:328) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:468) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:404) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:840) java.lang.Exception: unable to complete fetch of http://0.0.0.0:8090/test/sample.pdf HTTP failure 404, null at com.pdftron.server.DocManagement$DocFetchTask.waitForConversion(DocManagement.java:157) at com.pdftron.server.DocManagement.fetchAndConvert(DocManagement.java:514) at com.pdftron.server.DocReference.fetchLocalBlocking(DocReference.java:487) at com.pdftron.blackboxservlet.GetPDF.doGet(GetPDF.java:181) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.pdftron.server.CorsFilter.handleNonCORS(CorsFilter.java:356) at com.pdftron.server.CorsFilter.doFilter(CorsFilter.java:175) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.pdftron.server.DocModModifier.doFilter(DocModModifier.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at com.pdftron.server.BlackBoxAuthenticator.doFilter(BlackBoxAuthenticator.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:735) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1683) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1243) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:328) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:468) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:404) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:840)