Hello, I try to use the pdf generation module using the "private" mode (https://docs.mendix.com/appstore/services/private-document-generation-service/) I want to test it in localhost to see if it's working. but I get this error in the docker terminal : 2025-10-19T12:46:25.150Z | DOCGEN_NAVIGATION_ERROR: Failed to navigate to page: Error: net::ERR_CONNECTION_REFUSED at http://localhost:8082/docgen/generate?id=fdcd56d8-e279-4276-b497-6e6569937c832025-10-19T12:46:25.150Z | Send error: 20.096ms2025-10-19T12:46:25.171Z | Failed to send error: connect ECONNREFUSED ::1:8082 (and I get timeout error in mendix) My docker run on port 8085 my mendix app on port 8082 constants are set as follow : DocumentGeneration.ServiceEndpoint : http://localhost:8085 DocumentGeneration.OverrideServiceType : Private Does someone have a clue why I have this error? Thanks!
asked
Yehoshua Choukroun
1 answers
1
The Problem
You run Mendix app → port 8082
You run DocGen Docker → port 8085
Error:
net::ERR_CONNECTION_REFUSED at http://localhost:8082
Inside Docker, localhost ≠ your host machine → container can’t reach the Mendix app.
The Fix (step-by-step)
Keep Mendix running on port 8082.
Start Docker with host access
docker run -p 8085:8085 --add-host=host.docker.internal:host-gateway mendix/docgen:latest