Hi I am currently attemtping to install Collabora with Nextcloud I have succeeded in connecting them in nextcloud as shown by
However upon opening a docx file I receive an error on Nextcloud stating
Document loading failed
Unauthorised WOPI host. Please try again later and report to your administrator if the issue persists.
Following this I inspected logs in my container and noticed that requests from Collabora is being rejected
wsd-00001-00032 2024-11-08 09:16:45.193711 +0000 [ websrv_poll ] ERR #33: Read failed, have 0 buffered bytes (ECONNREFUSED: Connection refused)| net/Socket.hpp:1275
wsd-00001-00032 2024-11-08 09:16:45.193807 +0000 [ websrv_poll ] ERR #33: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1591
wsd-00001-00032 2024-11-08 09:16:45.193816 +0000 [ websrv_poll ] ERR #33: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1591
wsd-00001-00032 2024-11-08 09:16:45.193828 +0000 [ websrv_poll ] ERR #33: WOPI::CheckFileInfo failed for URI [http://nextcloud:8080/index.php/apps/richdocuments/wopi/files/46_ocrji49pzuhu?access_token=SCtz8RRqzdxvFTb2gryjTx3uY1dfHikB&access_token_ttl=0]: 0 (Unknown) . Headers: Body: []| wsd/wopi/CheckFileInfo.cpp:98
wsd-00001-00032 2024-11-08 09:16:45.193832 +0000 [ websrv_poll ] ERR #33: Invalid URI or access denied to [http://nextcloud:8080/index.php/apps/richdocuments/wopi/files/46_ocrji49pzuhu?access_token=SCtz8RRqzdxvFTb2gryjTx3uY1dfHikB&access_token_ttl=0]| wsd/wopi/CheckFileInfo.cpp:116
wsd-00001-00032 2024-11-08 09:16:45.337420 +0000 [ websrv_poll ] ERR #33: CheckFileInfo failed for [http%3A%2F%2Fnextcloud%3A8080%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F46_ocrji49pzuhu], State::Fail| wsd/RequestVettingStation.cpp:269
wsd-00001-00032 2024-11-08 09:16:45.560060 +0000 [ websrv_poll ] ERR #35: Read failed, have 0 buffered bytes (ECONNREFUSED: Connection refused)| net/Socket.hpp:1275
wsd-00001-00032 2024-11-08 09:16:45.560099 +0000 [ websrv_poll ] ERR #35: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1591
wsd-00001-00032 2024-11-08 09:16:45.560108 +0000 [ websrv_poll ] ERR #35: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1591
wsd-00001-00032 2024-11-08 09:16:45.560119 +0000 [ websrv_poll ] ERR #35: WOPI::CheckFileInfo failed for URI [http://nextcloud:8080/index.php/apps/richdocuments/wopi/files/46_ocrji49pzuhu?access_token=SCtz8RRqzdxvFTb2gryjTx3uY1dfHikB&access_token_ttl=0&permission=edit]: 0 (Unknown) . Headers: Body: []| wsd/wopi/CheckFileInfo.cpp:98
wsd-00001-00032 2024-11-08 09:16:45.560123 +0000 [ websrv_poll ] ERR #35: Invalid URI or access denied to [http://nextcloud:8080/index.php/apps/richdocuments/wopi/files/46_ocrji49pzuhu?access_token=SCtz8RRqzdxvFTb2gryjTx3uY1dfHikB&access_token_ttl=0&permission=edit]| wsd/wopi/CheckFileInfo.cpp:116
I tried to do a curl in Collabora to the following URL which results in an error
curl -v http://nextcloud:8080/index.php/apps/richdocuments/wopi/files/46_ocrji49pzuhu?access_token=SCtz8RRqzdxvFTb2gryjTx3uY1dfHikB&access_token_ttl=0
Trying 172.20.0.5:8080...
* connect to 172.20.0.5 port 8080 failed: Connection refused
* Failed to connect to nextcloud port 8080 after 0 ms: Couldn't connect to server
* Closing connection 0
curl: (7) Failed to connect to nextcloud port 8080 after 0 ms: Couldn't connect to server
I have no idea how to resolve this as my allow_list for WOPI in Nextcloud is empty which allows everything through. Hence I’m also able to access the url
from my computer which returns the following
{"BaseFileName":"Welcome to Nextcloud Hub.docx","Size":24295,"Version":"0","UserId":"admin","OwnerId":"admin","UserFriendlyName":"admin","UserExtraInfo":{"avatar":"http:\/\/nextcloud:8080\/avatar\/admin\/64","is_admin":true},"UserPrivateInfo":{"ZoteroAPIKey":""},"UserCanWrite":true,"UserCanNotWriteRelative":false,"PostMessageOrigin":"http:\/\/nextcloud:8080\/","LastModifiedTime":"2024-11-08T08:38:53.000000Z","SupportsRename":true,"UserCanRename":true,"EnableInsertRemoteImage":true,"EnableShare":true,"HideUserList":"","EnableOwnerTermination":true,"DisablePrint":false,"DisableExport":false,"DisableCopy":false,"HideExportOption":false,"HidePrintOption":false,"DownloadAsPostMessage":false,"SupportsLocks":false,"IsUserLocked":false,"EnableRemoteLinkPicker":true,"HasContentRange":true,"IsAdminUser":true,"IsAnonymousUser":false}
However, the collabora container is getting rejected.
Finally my docker-compose file is as shown below
services:
postgres:
container_name: postgres
image: postgres
restart: always
volumes:
- postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
secrets:
- postgres_db
- postgres_password
- postgres_user
networks:
- nextcloud_network
redis:
container_name: redis
image: redis:alpine
restart: always
networks:
- nextcloud_network
nextcloud:
image: nextcloud
container_name: nextcloud
restart: always
ports:
- 8080:80
volumes:
- nextcloud:/var/www/html
environment:
- POSTGRES_HOST=postgres
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
- NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
- NEXTCLOUD_TRUSTED_DOMAINS=collabora nextcloud
depends_on:
- redis
- postgres
secrets:
- nextcloud_admin_password
- nextcloud_admin_user
- postgres_db
- postgres_password
- postgres_user
networks:
- nextcloud_network
collabora:
image: collabora/code
container_name: collabora
environment:
- aliasgroup1=nextcloud
- aliasgroup2=collabora
- username=/run/secrets/collabora_admin_user
- password=/run/secrets/collabora_admin_password
- extra_params=--o:ssl.enable=false
ports:
- "9980:9980"
secrets:
- collabora_admin_password
- collabora_admin_user
networks:
- nextcloud_network
volumes:
postgres:
nextcloud:
networks:
nextcloud_network:
secrets:
nextcloud_admin_password:
file: ./files/password.txt
nextcloud_admin_user:
file: ./files/user.txt
collabora_admin_password:
file: ./files/password.txt
collabora_admin_user:
file: ./files/user.txt
postgres_db:
file: ./files/db.txt
postgres_password:
file: ./files/password.txt
postgres_user:
file: ./files/user.txt
Any help would be greatly appreciated. Thanks!