Unable to connect to CODE in Docker ERR WOPI::CheckFileInfo failed for URI

I am trying to setup Collabora CODE docker, Followed the steps in the installation guide
Here is the command I used to run CODE

docker run -t -d -p 0.0.0.0:9980:9980 -e "aliasgroup1=http://127\\.0\\.0\\.1:8000"  -e "username=admin" -e "password=S3cRet" -e "extra_params=--o:ssl.enable=false" --privileged  --restart always collabora/code

Along with it ran the python sample example of WOPI Host

Connection stuck at 0% and getting server disconnected popups repeatedly.

On Looking into the docker logs of the container, I get the log output as shown below:

wsd-00001-00056 2023-03-15 08:44:21.211364 +0000 [ docbroker_001 ] ERR  #34: Read failed, have 0 buffered bytes (ECONNREFUSED: Connection refused)| net/Socket.hpp:1136
wsd-00001-00056 2023-03-15 08:44:21.211511 +0000 [ docbroker_001 ] ERR  #34: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1436
wsd-00001-00056 2023-03-15 08:44:21.211570 +0000 [ docbroker_001 ] ERR  #34: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1436
wsd-00001-00056 2023-03-15 08:44:21.211655 +0000 [ docbroker_001 ] ERR  WOPI::CheckFileInfo failed for URI [http://127.0.0.1:8000/wopi/files/1?access_token=test&access_token_ttl=0]: 0 . Headers: 	Body: []| wsd/Storage.cpp:687
wsd-00001-00056 2023-03-15 08:44:21.211773 +0000 [ docbroker_001 ] ERR  loading document exception: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2415
wsd-00001-00056 2023-03-15 08:44:21.211831 +0000 [ docbroker_001 ] ERR  Failed to add session to [http://127.0.0.1:8000/wopi/files/1] with URI [http://127.0.0.1:8000/wopi/files/1?access_token=test&access_token_ttl=0]: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2377
wsd-00001-00056 2023-03-15 08:44:21.211880 +0000 [ docbroker_001 ] ERR  Storage error while starting session on http://127.0.0.1:8000/wopi/files/1 for socket #29. Terminating connection. Error: WOPI::CheckFileInfo failed: | wsd/COOLWSD.cpp:4872
wsd-00001-00056 2023-03-15 08:44:21.239570 +0000 [ docbroker_001 ] ERR  #22: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1136
wsd-00001-00056 2023-03-15 08:44:21.239675 +0000 [ docbroker_001 ] WRN  Unassociated Kit (41) disconnected unexpectedly| wsd/COOLWSD.cpp:3405

This repeatedly comes in the logs.

I have tried with an alias name as localhost and 0.0.0.0 in the docker parameters.

Thanks in Advance

1 Like

hello @DanBrown47 welcome to the forum :handshake:

I assume the issue is related to localhost/127.0.0.1 - this has special meaning to be “service running on the same host” which has different meaning for a docker container vs docker host vs client etc… I would recommend to use real hostnames or real IPs…

Depending on your setup you might find this guide useful:

2 Likes

If you are only testing something local, you could add --network host to your docker command. See more here: Use host networking

This way the network and the ports between your container and your machine will be the same. Also -p 0.0.0.0:9980:9980 will have no effect.

2 Likes

I have the same problem.

I like @DanBrown47’s question because trying to use the collabora/code docker image directly, instead of the NextCloud docker or ownCloud docker – of course this means running a WOPI host (@DanBrown47 is trying Python, I’m trying Node.js)

I tried using --network host it did not help.

I tried using 127.0.0.1, I also tried using my public-facing IP address, it didn’t help… (I was desperate…)

Hmm…