Skip to content
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

502 Bad Gateway on /healthcheck #1058

Open
TheDoDoo opened this issue Jan 29, 2025 · 0 comments
Open

502 Bad Gateway on /healthcheck #1058

TheDoDoo opened this issue Jan 29, 2025 · 0 comments

Comments

@TheDoDoo
Copy link

Hello everyone,

I wanted to set up the OnlyOffice Document Server via Docker to use it with my Nextcloud.
However, I get the following message when I try to connect it to Nextcloud.

Fehler beim Anschließen (Server error: `GET https://xxx.com/healthcheck` resulted in a `502 Bad Gateway` response:

502 Bad Gateway

502 Bad Gateway
ngin (truncated...)
)
root@nextcloud:/docker/onlyoffice-documentserver# curl -I http://127.0.0.1:7080/welcome/
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 28 Jan 2025 18:52:32 GMT
Content-Type: text/html
Content-Length: 4948
Last-Modified: Tue, 28 Jan 2025 18:48:07 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "67992667-1354"
Expires: Wed, 28 Jan 2026 18:52:32 GMT
Cache-Control: max-age=31536000
Accept-Ranges: bytes

root@nextcloud:/docker/onlyoffice-documentserver# curl -I http://127.0.0.1:7080/healthcheck/
HTTP/1.1 502 Bad Gateway
Server: nginx
Date: Tue, 28 Jan 2025 18:52:38 GMT
Content-Type: text/html
Content-Length: 150
Connection: keep-alive

This is my configuration. Did I make any mistakes?
(I am using Nginx Proxy Manager as a reverse proxy.)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant