Upgrading PDFTron Server, health check for 0.0.0.0:8090/test/sample.pdf failing

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)

1 Like

Hi beefkit,
We will take a look at the issue presented and will contact you when we have more information.

1 Like

Hi beefkit,
Can you please provide us with your docker file, so we can do our internal testing?
Also, could you provide us with:

  1. Server Log files.
  2. Network logs from the browser.
1 Like

Hi beefkit,

One suggestion: Can you please make sure to copy the new server.xml file to docker container. There is a new docBase in server.xml that looks for /test. That might be the reason you are getting the error. If not, can you please provide us with the files mentioned above.

2 Likes

Hello

We have the exact same problem. We use docker container for webviewer server and proxy, and when using 2.1.7 we are seeing the same in the logs.
There

1 Like

Hi MichaelL,

Have you tried solution described in my last reply?

1 Like

I don’t see how I could apply this solution. Can you be more specific? Which server.xml do you refer to?
We only use the docker containers so the only configuration is in our docker compose.

1 Like

(ps : we will be migrating to 2.2.0 soon and we do not find the same error in our tests with 2.2.0 at the moment)

1 Like

Hello MichaelL,

Please let me know on the status if the v2.2.0 upgrade works for you, if it does not we can dive deeper to investigate this issue.

Best regards,
Tyler

1 Like

Hey all, sorry I didn’t get back on this. I had put in a support ticket with Apryse and it was resolved…

It did end up being the new docBase. We move our server.xml on image creation using the dockerfile and these changes weren’t reflected in the server.xml we had previously. Thank you all so much for the support and help.

1 Like

Hi beefkit,

We are happy to assist.

All the best!

1 Like