Add documentation to communicate with docker server
carafelix opened this issue · comments
Right now I have the docker container up and running and have tried to communicate with it via curl and I always received curl: (52) Empty reply from server
.
My docker log is supposedly working on port 11011:
2023-10-26 18:32:42 [main(----) INF] Listening for requests on http://localhost:11011/
Any help would be appreciate it
Thank you for the report. There is a mistake in the docker command in the README regarding the volumes.
Instead of
-v ./zrenderer.docker.conf:/home/zrenderer/zrenderer.conf \
-v ./output:/home/zrenderer/output \
-v ./my-resources:/home/zrenderer/resources \
it should be
-v ./zrenderer.docker.conf:/zren/zrenderer.conf \
-v ./output:/zren/output \
-v ./my-resources:/zren/resources \
Saw this open and I'm having the same error using the updated docker commands, it always fails to listen to any other host I add to zrenderer.conf or zrenderer.docker.config and just listen to localhost, but when I try to curl it just returns curl: (52) Empty reply from server
, tried a bunch of thing to change the host but no success. Also verified if something was using the 11011 port but found none.
2024-02-09 04:21:13 Failed to listen on ::1:11011:11011
2-09 04:21:13 Failed to listen on 0.0.0.0
2024-02-09 04:21:13 [main(----) INF] Listening for requests on http://localhost:11011/
I don't know if this is something related but whatever I type in the port config of zrenderer it gives me this:
' when converting from type string to type ushortcted '
and stops the container.
Hi @CaioMassayuki. What operating system are you using and can you post the command you used to start the docker container?
I cannot reproduce the issue with the updated docker commands (on linux):
$ podman run -d --name zrenderer \
-v ./zrenderer.docker.conf:/zren/zrenderer.conf \
-v ./output:/zren/output \
-v ../zextractor/output_production:/zren/resources \
-p 11011:11011 \
zhade/zrenderer:latest
$ podman logs zrenderer
Created access token file including a randomly generated admin token: 1wehiutpqze3r7pefp0qm62vez3a4ty3
[main(----) INF] Listening for requests on http://localhost:11011/
Failed to listen on ::1:11011
[main(----) INF] Listening for requests on http://0.0.0.0:11011/
$ curl --output curl_output -v -X POST -H "Content-Type: application/json" -d "{\"job\":[\"1002\"],\"frame\":-1}" "http://localhost:11011/render?accesstoken=1wehiutpqze3r7pefp0qm62vez3a4ty3&downloadimage"
[main(qcn3) INF] 10.0.2.100:41146 - - 2024-Feb-13 17:23:18.4203328Z "POST /render?accesstoken=1wehiutpqze3r7pefp0qm62vez3a4ty3&downloadimage HTTP/1.1" 204 36 "-" "curl/8.5.0"
Whatever number I place for the port inside zrenderer.docker.conf is also accepted.
Also this seems wrong: 2024-02-09 04:21:13 Failed to listen on ::1:11011:11011
Why does it contain the ports two times? ::1:11011:11011
.
Can you verify that the config contains the following entries:
[server]
hosts=::1,0.0.0.0
port=11011
Closing due to being stale