Product: webviewer
Product Version: [latest docker image on 2022-10-20]
Please give a brief summary of your issue:
webviewer server can’t access API on localhost
Please describe your issue and provide steps to reproduce it:
Our API (Java Springboot app) and webviewer server are running on docker, both in its own container, but both in same network, started with single docker-compose command. If webviewer server tries to access API via local IP address (192.168…) everything works fine. But if it tries to access API via “localhost”, we get an error. There is nothing in API log as it has never been hit, but there is an error in webviewer server’s container log:
20-Oct-2022 14:21:06.851 WARNING [pool-2-thread-6] com.pdftron.server.ServerJob.run During job id (Image/Fetched/p1_3wJH6dkzyqgR5qIbylmjDYi4izf-VmEZFxgPkRlo=19.png_dir/pageinfo.json):
Exception during job run of type pages
java.lang.Exception: WebViewer Server complete job (pageinfo.json) failed: unable to complete fetch of http://localhost:8086/secured/dataRooms/598d6de50f374626b6c34c993e4ab256/fileContent/19?version=7502.895981227744
Connection refused (Connection refused)
at com.pdftron.server.ServerJob.run(ServerJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
20-Oct-2022 14:21:06.851 WARNING [pool-2-thread-12] com.pdftron.server.ServerJob.run During job id (Image/Fetched/p1_3wJH6dkzyqgR5qIbylmjDYi4izf-VmEZFxgPkRlo=19.png_dir/pageimg0.jpg):
Exception during job run of type image
java.lang.Exception: WebViewer Server complete job (pageimg0.jpg) failed: unable to complete fetch of http://localhost:8086/secured/dataRooms/598d6de50f374626b6c34c993e4ab256/fileContent/19?version=7502.895981227744
Connection refused (Connection refused)
at com.pdftron.server.ServerJob.run(ServerJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Closing ws connection from endpoint: CloseReason: code [1001], reason [null]
20-Oct-2022 14:21:07.013 INFO [http-apr-0.0.0.0-8090-exec-2] com.pdftron.server.ConnectionService$Connection.onCloseImpl Closing Connection, 0 outstanding
P.S. We need to use “localhost” because local IP address is transient.
Please provide a link to a minimal sample where the issue is reproducible: