-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NextCloud Integration error: 502 Bad Gateway for healthcheck #1039
Comments
I get your docker compose file, by the way, it has mistakes:
Ran curl inside container: And outside (Port 8467 because you map it 8467:80) Everything is ok as you see. I see you are using an external DNS for request |
Did anyone solve this, in terms of how to update the reverse proxy to get a clean return from /healthcheck url? |
Hello @maltokyo we have the proxy examples for onlyoffice documentserver https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx |
Thank you. But this doesn't have a /healthcheck entry at all. This issue for me is that /welcome works fine, but this integration relies on /healthcheck |
It is not there because it is an internal check of the document server, the proxy will redirect it to our internal service. I just checked this config with my docker installation and external nginx - healthcheck shows true as expected. |
Hello @igwyd, and everyone else, I wanted to set up the OnlyOffice Document Server via Docker to use it with my Nextcloud.
This is my configuration. Did I make any mistakes? docker-compose.yml services:
onlyoffice-documentserver:
image: onlyoffice/documentserver
container_name: onlyoffice-documentserver
depends_on:
- onlyoffice-postgresql
- onlyoffice-rabbitmq
environment:
- DB_TYPE=${DB_TYPE}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${POSTGRES_DB}
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- AMQP_URI=${AMQP_URI}
# Uncomment strings below to enable the JSON Web Token validation.
- JWT_ENABLED=true
- JWT_SECRET=${JWT_SECRET}
#- JWT_HEADER=Authorization
#- JWT_IN_BODY=true
ports:
- '7080:80'
- '7443:443'
stdin_open: true
restart: always
stop_grace_period: 60s
volumes:
- ./onlyoffice/Data:/var/www/onlyoffice/Data
- ./onlyoffice/log:/var/log/onlyoffice
- ./onlyoffice/cache:/var/lib/onlyoffice/documentserver/App_Data/cache/files
- ./onlyoffice/example_files:/var/www/onlyoffice/documentserver-example/public/files
- ./onlyoffice/fonts:/usr/share/fonts
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq
restart: always
expose:
- '5672'
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:12
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
restart: always
expose:
- '5432'
volumes:
- ./pgsql_data:/var/lib/postgresql .env DB_TYPE=postgres
DB_HOST=onlyoffice-postgresql
DB_PORT=5432
POSTGRES_DB=onlyoffice
POSTGRES_USER=onlyoffice
POSTGRES_PASSWORD=<PASSWORD>
AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
JWT_SECRET=<SECRET> |
Hi @igwyd thank you for your reply: Below is the nginx config that comes pre-configured with SWAG It looks like it should work, but doesn't return a 200 for /healthcheck - would you have any comments or advice what I should change to make it work? Thank you
|
I got all this working perfectly... what was needed was a different set of volumes in the docker compose file and a new nginx config file. can post if anyone is interested. |
hi, i am interested. can you share your compose and nginx config plz. |
sure, whats the best way to share?
…On Sat, Feb 22, 2025 at 1:55 AM DRCBR1 ***@***.***> wrote:
I got all this working perfectly... what was needed was a different set of
volumes in the docker compose file and a new nginx config file. can post if
anyone is interested.
hi, i am interested. can you share your compose and nginx config plz.
—
Reply to this email directly, view it on GitHub
<#1039 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKS7W64KL4V5UYOCP22IFT2Q7DJHAVCNFSM6AAAAABRVYX62OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZVHA4TIMBQHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: DRCBR1]*DRCBR1* left a comment
(ONLYOFFICE/onlyoffice-nextcloud#1039)
<#1039 (comment)>
I got all this working perfectly... what was needed was a different set of
volumes in the docker compose file and a new nginx config file. can post if
anyone is interested.
hi, i am interested. can you share your compose and nginx config plz.
—
Reply to this email directly, view it on GitHub
<#1039 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKS7W64KL4V5UYOCP22IFT2Q7DJHAVCNFSM6AAAAABRVYX62OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZVHA4TIMBQHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
hi! also interested. best way to share is most certainly "not at all" ;) so.. maybe a pastebin link? google "pastebin" and choose any, paste in the text there, copy the link and paste it into your answer. thanks, cheers! |
Nextcloud integration with OnlyOffice fails due to the following nextcloud errror:
###Error from Nextcloud:
GET https://onlyoffice.nonooculusnas.com/healthcheck
resulted in a502 Bad Gateway
response: <title>502 Bad Gateway</title>502 Bad Gateway
ngin (truncated...)healthcheckRequest on check error
###NGINX logs from onlyoffice:
nginx logs again: 2024/11/13 05:52:13 [error] 755#755: *2 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:52:13 [error] 755#755: *2 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:52:25 [error] 755#755: *5 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:52:25 [error] 755#755: *5 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:52:52 [error] 755#755: *8 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:52:52 [error] 755#755: *8 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "GET /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:53:42 [error] 755#755: *13 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "POST /ConvertService.ashx HTTP/1.1", upstream: "http://127.0.0.1:8000/ConvertService.ashx", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:53:42 [error] 755#755: *13 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "POST /ConvertService.ashx HTTP/1.1", upstream: "http://127.0.0.1:8000/ConvertService.ashx", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:53:45 [error] 755#755: *16 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "POST /ConvertService.ashx HTTP/1.1", upstream: "http://127.0.0.1:8000/ConvertService.ashx", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:53:45 [error] 755#755: *16 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "POST /ConvertService.ashx HTTP/1.1", upstream: "http://127.0.0.1:8000/ConvertService.ashx", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:54:23 [error] 755#755: *21 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "HEAD /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:54:23 [error] 755#755: *21 connect() failed (111: Unknown error) while connecting to upstream, client: 172.25.0.1, server: , request: "HEAD /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "onlyoffice.nonooculusnas.com" 2024/11/13 05:59:54 [error] 1552#1552: *34 connect() failed (111: Unknown error) while connecting to upstream, client: 127.0.0.1, server: , request: "HEAD /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "localhost" 2024/11/13 05:59:54 [error] 1552#1552: *34 connect() failed (111: Unknown error) while connecting to upstream, client: 127.0.0.1, server: , request: "HEAD /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "localhost" 2024/11/13 06:02:01 [error] 1552#1552: *41 connect() failed (111: Unknown error) while connecting to upstream, client: 127.0.0.1, server: , request: "HEAD /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "127.0.0.1" 2024/11/13 06:02:01 [error] 1552#1552: *41 connect() failed (111: Unknown error) while connecting to upstream, client: 127.0.0.1, server: , request: "HEAD /healthcheck HTTP/1.1", upstream: "http://127.0.0.1:8000/healthcheck", host: "127.0.0.1"
It seems that https:///healthcheck is being checked on port 8000 even though the port config in compose file uses port 80
###Compose File:
version: "3.9"
services:
onlyoffice:
image: onlyoffice/documentserver:latest
container_name: onlyoffice-server
hostname: OnlyOfficeServer
networks:
- nextcloud_network
ports:
- 8467:80
volumes:
- /volume1/docker/onlyoffice/logs:/var/log/onlyoffice:rw
- /volume1/docker/onlyoffice/data:/var/www/onlyoffice/Data:rw
- /volume1/docker/onlyoffice/config:/etc/onlyoffice/documentserver/:rw
environment:
JWT_ENABLED: true
JWT_SECRET: secret
rejectUnauthorized: false
restart: always
labels:
- com.centurylinklabs.watchtower.enable=true
networks:
nextcloud_network:
external: true
###from default.json we see coauthoring port is 8000
"services": {
"CoAuthoring": {
"server": {
"port": 8000,
"workerpercpu": 1,
"mode": "development",
"limits_tempfile_upload": 104857600,
"limits_image_size": 26214400,
"limits_image_download_timeout": {
"connectionAndInactivity": "2m",
"wholeCycle": "2m"
},
###Curl Command:
ash-4.4# curl -I http://:80/healthcheck
HTTP/1.1 502 Bad Gateway
Server: nginx
Date: Wed, 13 Nov 2024 06:18:43 GMT
Content-Type: text/html
Content-Length: 150
Connection: keep-alive
###curl command ran from inside container:
ash-4.4# docker exec -it onlyoffice-server curl -I http://127.0.0.1:80/healthcheck
HTTP/1.1 502 Bad Gateway
Server: nginx
Date: Wed, 13 Nov 2024 06:18:43 GMT
Content-Type: text/html
Content-Length: 150
Connection: keep-alive
Downgrading to onlyoffice/documentserver:8.2.0 resolved the issue. As of this post the 'latest' tag was updated 16 hours ago.
###Curl command ran after downgrading:
ash-4.4# curl -I http://onlyoffice.nonooculusnas.com:80/healthcheck
HTTP/1.1 404 Not Found
Server: nginx
Date: Wed, 13 Nov 2024 06:51:37 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Keep-Alive: timeout=20
Vary: Accept-Encoding
I did not know to check this before the issue started and even though its coming back 404 not found, the integration in nextcloud is now working.
Also, I am not sure if the coauthoring port is correct or not, but the main issue here is the healthceck url is coming back as 502 bad gateway.
The text was updated successfully, but these errors were encountered: