[GH-ISSUE #426] sed: -e expression #1, char 25: unknown option to 's' during startup on Arch based systems #218

Closed
opened 2026-02-26 10:31:03 +03:00 by kerem · 26 comments
Owner

Originally created by @zilexa on GitHub (Apr 12, 2022).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/426

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
OnlyOffice shows this error on first and subsequent start of the container. The log stops here. When restarting the container, the log does continue.
sed: -e expression #1, char 25: unknown option to `s'

on a second run OR after I remove the contents of the mapped volume $DOCKERDIR/onlyoffice completely, I do get a successful log...

sed: -e expression #1, char 25: unknown option to `s'
Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.


The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctlcluster 12 main start

Ver Cluster Port Status Owner    Data directory              Log file
12  main    5432 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
 * Starting PostgreSQL 12 database server      [ OK ]

but the error still shows and the page is still blank :(

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
docker compose example:

  caddy:
    container_name: web-proxy
    image: lucaslorentz/caddy-docker-proxy:ci-alpine
    restart: always
    networks: 
      - web-proxy
    environment:
      - CADDY_INGRESS_NETWORKS=web-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - $DOCKERDIR/caddy/caddy_data:/data
      - $DOCKERDIR/caddy/config:/config
    labels:
      caddy.email: $EMAIL
      #caddy.log.output: file /data/access.log
    ports:
      - 443:443
 #
 onlyoffice:
    container_name: onlyoffice
    image: onlyoffice/documentserver
    stdin_open: true
    restart: always
    networks: 
      - web-proxy
    tty: true
    volumes:
      - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data
      - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice
      - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql
#      - /usr/share/fonts:/usr/share/fonts
#    dns: 9.9.9.9
    environment:
      JWT_ENABLED: true
      JWT_SECRET: $ONLYOFFICEJWT
    labels:
      caddy: office.$DOMAIN
      caddy.reverse_proxy: "{{upstreams 80}}"
      # Required extra headers
      caddy.file_server: ""
      caddy.encode: gzip

What is the expected behavior?

  1. Log should show the starting process is continuing successfully.
  2. Onlyoffice welcome page should work.

Did this work in previous versions of DocumentServer?
Yes, with caddy-docker-proxy and the exact same labels. (this is just another way to use Caddy, instead of using a separate caddyfile, caddy-docker-proxy will use the tags to create the file. this worked fine with OnlyOffice).

DocumentServer Docker tag:
onlyoffice/documentserver

Host Operating System:
Manjaro Gnome, clean install, installed docker and compose.

Originally created by @zilexa on GitHub (Apr 12, 2022). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/426 **Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** OnlyOffice shows this error on first and subsequent start of the container. The log stops here. When restarting the container, the log does continue. ```sed: -e expression #1, char 25: unknown option to `s'``` on a second run OR after I remove the contents of the mapped volume `$DOCKERDIR/onlyoffice` completely, I do get a successful log... ``` sed: -e expression #1, char 25: unknown option to `s' Creating new PostgreSQL cluster 12/main ... /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/12/main ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok Success. You can now start the database server using: pg_ctlcluster 12 main start Ver Cluster Port Status Owner Data directory Log file 12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log * Starting PostgreSQL 12 database server [ OK ] ``` but the error still shows and the page is still blank :( **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** docker compose example: ``` caddy: container_name: web-proxy image: lucaslorentz/caddy-docker-proxy:ci-alpine restart: always networks: - web-proxy environment: - CADDY_INGRESS_NETWORKS=web-proxy volumes: - /var/run/docker.sock:/var/run/docker.sock - $DOCKERDIR/caddy/caddy_data:/data - $DOCKERDIR/caddy/config:/config labels: caddy.email: $EMAIL #caddy.log.output: file /data/access.log ports: - 443:443 # onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver stdin_open: true restart: always networks: - web-proxy tty: true volumes: - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql # - /usr/share/fonts:/usr/share/fonts # dns: 9.9.9.9 environment: JWT_ENABLED: true JWT_SECRET: $ONLYOFFICEJWT labels: caddy: office.$DOMAIN caddy.reverse_proxy: "{{upstreams 80}}" # Required extra headers caddy.file_server: "" caddy.encode: gzip ``` **What is the expected behavior?** 1. Log should show the starting process is continuing successfully. 2. Onlyoffice welcome page should work. **Did this work in previous versions of DocumentServer?** Yes, with caddy-docker-proxy and the exact same labels. (this is just another way to use Caddy, instead of using a separate caddyfile, caddy-docker-proxy will use the tags to create the file. this worked fine with OnlyOffice). **DocumentServer Docker tag:** onlyoffice/documentserver **Host Operating System:** Manjaro Gnome, clean install, installed docker and compose.
kerem 2026-02-26 10:31:03 +03:00
Author
Owner

@zilexa commented on GitHub (Apr 12, 2022):

log from within container:

root@0378804740b0:/var/log/postgresql# cat postgresql-12-main.log
2022-02-14 00:58:48.860 UTC [10182] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-14 00:58:48.861 UTC [10182] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-02-14 00:58:48.861 UTC [10182] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-02-14 00:58:48.861 UTC [10182] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-02-14 00:58:48.866 UTC [10182] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-14 00:58:48.888 UTC [10183] LOG:  database system was shut down at 2022-02-14 00:58:47 UTC
2022-02-14 00:58:48.899 UTC [10182] LOG:  database system is ready to accept connections
2022-02-14 01:00:32.214 UTC [10182] LOG:  received fast shutdown request
2022-02-14 01:00:32.218 UTC [10182] LOG:  aborting any active transactions
2022-02-14 01:00:32.225 UTC [10182] LOG:  background worker "logical replication launcher" (PID 10189) exited with exit code 1
2022-02-14 01:00:32.226 UTC [10184] LOG:  shutting down
2022-02-14 01:00:32.253 UTC [10182] LOG:  database system is shut down
2022-02-14 01:00:32.373 UTC [11727] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-14 01:00:32.374 UTC [11727] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-02-14 01:00:32.374 UTC [11727] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-02-14 01:00:32.374 UTC [11727] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-02-14 01:00:32.379 UTC [11727] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-14 01:00:32.408 UTC [11728] LOG:  database system was shut down at 2022-02-14 01:00:32 UTC
2022-02-14 01:00:32.418 UTC [11727] LOG:  database system is ready to accept connections
2022-02-14 01:00:35.095 UTC [11727] LOG:  received fast shutdown request
2022-02-14 01:00:35.098 UTC [11727] LOG:  aborting any active transactions
2022-02-14 01:00:35.104 UTC [11727] LOG:  background worker "logical replication launcher" (PID 11734) exited with exit code 1
2022-02-14 01:00:35.104 UTC [11729] LOG:  shutting down
2022-02-14 01:00:35.143 UTC [11727] LOG:  database system is shut down
2022-02-18 16:48:25.567 UTC [309] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-18 16:48:25.568 UTC [309] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-02-18 16:48:25.568 UTC [309] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-02-18 16:48:25.568 UTC [309] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-02-18 16:48:25.573 UTC [309] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-18 16:48:25.605 UTC [310] LOG:  database system was shut down at 2022-02-14 01:00:35 UTC
2022-02-18 16:48:25.618 UTC [309] LOG:  database system is ready to accept connections
2022-02-18 16:50:40.102 UTC [309] LOG:  received fast shutdown request
2022-02-18 16:50:40.111 UTC [309] LOG:  aborting any active transactions
2022-02-18 16:50:40.114 UTC [309] LOG:  background worker "logical replication launcher" (PID 316) exited with exit code 1
2022-02-18 16:50:40.117 UTC [311] LOG:  shutting down
2022-02-18 16:50:40.185 UTC [309] LOG:  database system is shut down
2022-04-12 21:59:03.665 UTC [307] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-04-12 21:59:03.666 UTC [307] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-04-12 21:59:03.666 UTC [307] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-04-12 21:59:03.666 UTC [307] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-04-12 21:59:03.672 UTC [307] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-04-12 21:59:03.687 UTC [308] LOG:  database system was shut down at 2022-04-12 21:59:00 UTC
2022-04-12 21:59:03.693 UTC [307] LOG:  database system is ready to accept connections

I changed the web proxy port from 80 to 5432 but that does not make a difference.

<!-- gh-comment-id:1097270621 --> @zilexa commented on GitHub (Apr 12, 2022): log from within container: ``` root@0378804740b0:/var/log/postgresql# cat postgresql-12-main.log 2022-02-14 00:58:48.860 UTC [10182] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-02-14 00:58:48.861 UTC [10182] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-02-14 00:58:48.861 UTC [10182] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-02-14 00:58:48.861 UTC [10182] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-02-14 00:58:48.866 UTC [10182] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-02-14 00:58:48.888 UTC [10183] LOG: database system was shut down at 2022-02-14 00:58:47 UTC 2022-02-14 00:58:48.899 UTC [10182] LOG: database system is ready to accept connections 2022-02-14 01:00:32.214 UTC [10182] LOG: received fast shutdown request 2022-02-14 01:00:32.218 UTC [10182] LOG: aborting any active transactions 2022-02-14 01:00:32.225 UTC [10182] LOG: background worker "logical replication launcher" (PID 10189) exited with exit code 1 2022-02-14 01:00:32.226 UTC [10184] LOG: shutting down 2022-02-14 01:00:32.253 UTC [10182] LOG: database system is shut down 2022-02-14 01:00:32.373 UTC [11727] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-02-14 01:00:32.374 UTC [11727] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-02-14 01:00:32.374 UTC [11727] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-02-14 01:00:32.374 UTC [11727] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-02-14 01:00:32.379 UTC [11727] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-02-14 01:00:32.408 UTC [11728] LOG: database system was shut down at 2022-02-14 01:00:32 UTC 2022-02-14 01:00:32.418 UTC [11727] LOG: database system is ready to accept connections 2022-02-14 01:00:35.095 UTC [11727] LOG: received fast shutdown request 2022-02-14 01:00:35.098 UTC [11727] LOG: aborting any active transactions 2022-02-14 01:00:35.104 UTC [11727] LOG: background worker "logical replication launcher" (PID 11734) exited with exit code 1 2022-02-14 01:00:35.104 UTC [11729] LOG: shutting down 2022-02-14 01:00:35.143 UTC [11727] LOG: database system is shut down 2022-02-18 16:48:25.567 UTC [309] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-02-18 16:48:25.568 UTC [309] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-02-18 16:48:25.568 UTC [309] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-02-18 16:48:25.568 UTC [309] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-02-18 16:48:25.573 UTC [309] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-02-18 16:48:25.605 UTC [310] LOG: database system was shut down at 2022-02-14 01:00:35 UTC 2022-02-18 16:48:25.618 UTC [309] LOG: database system is ready to accept connections 2022-02-18 16:50:40.102 UTC [309] LOG: received fast shutdown request 2022-02-18 16:50:40.111 UTC [309] LOG: aborting any active transactions 2022-02-18 16:50:40.114 UTC [309] LOG: background worker "logical replication launcher" (PID 316) exited with exit code 1 2022-02-18 16:50:40.117 UTC [311] LOG: shutting down 2022-02-18 16:50:40.185 UTC [309] LOG: database system is shut down 2022-04-12 21:59:03.665 UTC [307] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-04-12 21:59:03.666 UTC [307] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-04-12 21:59:03.666 UTC [307] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-04-12 21:59:03.666 UTC [307] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-04-12 21:59:03.672 UTC [307] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-04-12 21:59:03.687 UTC [308] LOG: database system was shut down at 2022-04-12 21:59:00 UTC 2022-04-12 21:59:03.693 UTC [307] LOG: database system is ready to accept connections ``` I changed the web proxy port from 80 to 5432 but that does not make a difference.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 13, 2022):

Hi, could you remove

      - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql

from compose file and see if problem persist, seems something is cached to this folder that do not allow PostgreSQL to start properly

If this didn't help I think we should start with ruling caddy out, if you can reproduce this problem without caddy at all it may help us to track root reason of this

<!-- gh-comment-id:1097877269 --> @ShockwaveNN commented on GitHub (Apr 13, 2022): Hi, could you remove ``` - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql ``` from compose file and see if problem persist, seems something is cached to this folder that do not allow PostgreSQL to start properly If this didn't help I think we should start with ruling caddy out, if you can reproduce this problem without caddy at all it may help us to track root reason of this
Author
Owner

@zilexa commented on GitHub (Apr 13, 2022):

I will test both cases (without that volume mapping, without caddy) tonight, thanks!

<!-- gh-comment-id:1097913927 --> @zilexa commented on GitHub (Apr 13, 2022): I will test both cases (without that volume mapping, without caddy) tonight, thanks!
Author
Owner

@zilexa commented on GitHub (Apr 13, 2022):

I had some time and this just annoys me so I already tested this:

  1. Removed the container and emptied the folder $DOCKERDIR/onlyoffice/
  2. In compose file, removed caddy labels and also the networks: web-proxy. Added 'Ports'
  3. Ran compose:
  onlyoffice:
    container_name: onlyoffice
    image: onlyoffice/documentserver
    stdin_open: true
    restart: always
    tty: true
    volumes:
      - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data
      - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice
    environment:
      JWT_ENABLED: true
      JWT_SECRET: $ONLYOFFICEJWT
    ports:
      - 8181:80

Log shows:

sed: -e expression #1, char 25: unknown option to `s'

 * Starting PostgreSQL 12 database server        
[ OK ]

Browser says unable to connect when I visit localhost or my server ip 192.168.88.2:8181
The folders /onlyoffice/data is empty, onlyoffice/log contains folder documentserver which contains 3 empty folders (converter, docservice, metrics).

2nd test:

  • Removed the container
  • Deleted the contents of $DOCKERDIR/onlyoffice/
  • Added back - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql to compose, ran compose
  • still unable to connect, but log has more items:
sed: -e expression #1, char 25: unknown option to `s'

Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctlcluster 12 main start

Ver Cluster Port Status Owner    Data directory              Log file
12  main    5432 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
 * Starting PostgreSQL 12 database server        [ OK ]

Note it says port 5432 is down!

Log within the container shows:

root@86909882b83f:/var/log/postgresql# cat postgresql-12-main.log
2022-02-14 00:58:48.860 UTC [10182] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-14 00:58:48.861 UTC [10182] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-02-14 00:58:48.861 UTC [10182] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-02-14 00:58:48.861 UTC [10182] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-02-14 00:58:48.866 UTC [10182] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-14 00:58:48.888 UTC [10183] LOG:  database system was shut down at 2022-02-14 00:58:47 UTC
2022-02-14 00:58:48.899 UTC [10182] LOG:  database system is ready to accept connections
2022-02-14 01:00:32.214 UTC [10182] LOG:  received fast shutdown request
2022-02-14 01:00:32.218 UTC [10182] LOG:  aborting any active transactions
2022-02-14 01:00:32.225 UTC [10182] LOG:  background worker "logical replication launcher" (PID 10189) exited with exit code 1
2022-02-14 01:00:32.226 UTC [10184] LOG:  shutting down
2022-02-14 01:00:32.253 UTC [10182] LOG:  database system is shut down
2022-02-14 01:00:32.373 UTC [11727] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-14 01:00:32.374 UTC [11727] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-02-14 01:00:32.374 UTC [11727] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-02-14 01:00:32.374 UTC [11727] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-02-14 01:00:32.379 UTC [11727] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-14 01:00:32.408 UTC [11728] LOG:  database system was shut down at 2022-02-14 01:00:32 UTC
2022-02-14 01:00:32.418 UTC [11727] LOG:  database system is ready to accept connections
2022-02-14 01:00:35.095 UTC [11727] LOG:  received fast shutdown request
2022-02-14 01:00:35.098 UTC [11727] LOG:  aborting any active transactions
2022-02-14 01:00:35.104 UTC [11727] LOG:  background worker "logical replication launcher" (PID 11734) exited with exit code 1
2022-02-14 01:00:35.104 UTC [11729] LOG:  shutting down
2022-02-14 01:00:35.143 UTC [11727] LOG:  database system is shut down
2022-02-18 16:48:25.567 UTC [309] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-18 16:48:25.568 UTC [309] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-02-18 16:48:25.568 UTC [309] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-02-18 16:48:25.568 UTC [309] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-02-18 16:48:25.573 UTC [309] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-18 16:48:25.605 UTC [310] LOG:  database system was shut down at 2022-02-14 01:00:35 UTC
2022-02-18 16:48:25.618 UTC [309] LOG:  database system is ready to accept connections
2022-02-18 16:50:40.102 UTC [309] LOG:  received fast shutdown request
2022-02-18 16:50:40.111 UTC [309] LOG:  aborting any active transactions
2022-02-18 16:50:40.114 UTC [309] LOG:  background worker "logical replication launcher" (PID 316) exited with exit code 1
2022-02-18 16:50:40.117 UTC [311] LOG:  shutting down
2022-02-18 16:50:40.185 UTC [309] LOG:  database system is shut down
2022-04-13 13:10:20.818 UTC [307] LOG:  starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-04-13 13:10:20.819 UTC [307] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-04-13 13:10:20.819 UTC [307] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2022-04-13 13:10:20.819 UTC [307] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2022-04-13 13:10:20.825 UTC [307] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-04-13 13:10:20.850 UTC [308] LOG:  database system was shut down at 2022-04-13 13:10:17 UTC
2022-04-13 13:10:20.859 UTC [307] LOG:  database system is ready to accept connections

It seems to me the docker image contains some issues? Because this log shows it has trouble with its internal port 5432. According to the documentation, this should be the port for the database?

2022-04-13 13:10:20.819 UTC [307] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.

Additional info:

  • My home router/systems do not use IPv6
  • I simply installed docker and docker compose from repositories (using Manjaro Linux)
  • Following the official docker documentation, this is how I installed docker, rebooted and ran compose. Nothing special:
# Install Docker and Docker Compose
sudo pamac install --no-confirm docker docker-compose

# Create non-root user for docker, with privileges (this is not docker rootless)
sudo groupadd docker
sudo usermod -aG docker $USER

# Enable docker at boot
sudo systemctl enable docker.service
sudo systemctl enable containerd.service

# reboot
docker --version 
Docker version 20.10.12, build e91ed5707e
docker-compose --version 
Docker Compose version 2.3.3

My compose file has version: "2.4" at the top but I also tested with version: "2.3". Makes no difference.

<!-- gh-comment-id:1098039568 --> @zilexa commented on GitHub (Apr 13, 2022): I had some time and this just annoys me so I already tested this: 1. Removed the container and emptied the folder $DOCKERDIR/onlyoffice/ 2. In compose file, removed caddy labels and also the networks: web-proxy. Added 'Ports' 3. Ran compose: ``` onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver stdin_open: true restart: always tty: true volumes: - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice environment: JWT_ENABLED: true JWT_SECRET: $ONLYOFFICEJWT ports: - 8181:80 ``` Log shows: ``` sed: -e expression #1, char 25: unknown option to `s' * Starting PostgreSQL 12 database server [ OK ] ``` Browser says unable to connect when I visit localhost or my server ip 192.168.88.2:8181 The folders /onlyoffice/data is empty, onlyoffice/log contains folder documentserver which contains 3 empty folders (converter, docservice, metrics). 2nd test: - Removed the container - Deleted the contents of `$DOCKERDIR/onlyoffice/ ` - Added back ` - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql` to compose, ran compose - still unable to connect, but log has more items: ``` sed: -e expression #1, char 25: unknown option to `s' Creating new PostgreSQL cluster 12/main ... /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/12/main ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok Success. You can now start the database server using: pg_ctlcluster 12 main start Ver Cluster Port Status Owner Data directory Log file 12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log * Starting PostgreSQL 12 database server [ OK ] ``` Note it says port 5432 is down! Log within the container shows: ``` root@86909882b83f:/var/log/postgresql# cat postgresql-12-main.log 2022-02-14 00:58:48.860 UTC [10182] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-02-14 00:58:48.861 UTC [10182] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-02-14 00:58:48.861 UTC [10182] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-02-14 00:58:48.861 UTC [10182] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-02-14 00:58:48.866 UTC [10182] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-02-14 00:58:48.888 UTC [10183] LOG: database system was shut down at 2022-02-14 00:58:47 UTC 2022-02-14 00:58:48.899 UTC [10182] LOG: database system is ready to accept connections 2022-02-14 01:00:32.214 UTC [10182] LOG: received fast shutdown request 2022-02-14 01:00:32.218 UTC [10182] LOG: aborting any active transactions 2022-02-14 01:00:32.225 UTC [10182] LOG: background worker "logical replication launcher" (PID 10189) exited with exit code 1 2022-02-14 01:00:32.226 UTC [10184] LOG: shutting down 2022-02-14 01:00:32.253 UTC [10182] LOG: database system is shut down 2022-02-14 01:00:32.373 UTC [11727] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-02-14 01:00:32.374 UTC [11727] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-02-14 01:00:32.374 UTC [11727] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-02-14 01:00:32.374 UTC [11727] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-02-14 01:00:32.379 UTC [11727] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-02-14 01:00:32.408 UTC [11728] LOG: database system was shut down at 2022-02-14 01:00:32 UTC 2022-02-14 01:00:32.418 UTC [11727] LOG: database system is ready to accept connections 2022-02-14 01:00:35.095 UTC [11727] LOG: received fast shutdown request 2022-02-14 01:00:35.098 UTC [11727] LOG: aborting any active transactions 2022-02-14 01:00:35.104 UTC [11727] LOG: background worker "logical replication launcher" (PID 11734) exited with exit code 1 2022-02-14 01:00:35.104 UTC [11729] LOG: shutting down 2022-02-14 01:00:35.143 UTC [11727] LOG: database system is shut down 2022-02-18 16:48:25.567 UTC [309] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-02-18 16:48:25.568 UTC [309] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-02-18 16:48:25.568 UTC [309] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-02-18 16:48:25.568 UTC [309] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-02-18 16:48:25.573 UTC [309] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-02-18 16:48:25.605 UTC [310] LOG: database system was shut down at 2022-02-14 01:00:35 UTC 2022-02-18 16:48:25.618 UTC [309] LOG: database system is ready to accept connections 2022-02-18 16:50:40.102 UTC [309] LOG: received fast shutdown request 2022-02-18 16:50:40.111 UTC [309] LOG: aborting any active transactions 2022-02-18 16:50:40.114 UTC [309] LOG: background worker "logical replication launcher" (PID 316) exited with exit code 1 2022-02-18 16:50:40.117 UTC [311] LOG: shutting down 2022-02-18 16:50:40.185 UTC [309] LOG: database system is shut down 2022-04-13 13:10:20.818 UTC [307] LOG: starting PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit 2022-04-13 13:10:20.819 UTC [307] LOG: listening on IPv4 address "127.0.0.1", port 5432 2022-04-13 13:10:20.819 UTC [307] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2022-04-13 13:10:20.819 UTC [307] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-04-13 13:10:20.825 UTC [307] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2022-04-13 13:10:20.850 UTC [308] LOG: database system was shut down at 2022-04-13 13:10:17 UTC 2022-04-13 13:10:20.859 UTC [307] LOG: database system is ready to accept connections ``` It seems to me the docker image contains some issues? Because this log shows it has trouble with its internal port 5432. According to the documentation, this should be the port for the database? `2022-04-13 13:10:20.819 UTC [307] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.` Additional info: - My home router/systems do not use IPv6 - I simply installed docker and docker compose from repositories (using Manjaro Linux) - Following the official docker documentation, this is how I installed docker, rebooted and ran compose. Nothing special: ``` # Install Docker and Docker Compose sudo pamac install --no-confirm docker docker-compose # Create non-root user for docker, with privileges (this is not docker rootless) sudo groupadd docker sudo usermod -aG docker $USER # Enable docker at boot sudo systemctl enable docker.service sudo systemctl enable containerd.service # reboot ``` ``` docker --version Docker version 20.10.12, build e91ed5707e docker-compose --version Docker Compose version 2.3.3 ``` My compose file has `version: "2.4"` at the top but I also tested with `version: "2.3"`. Makes no difference.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 13, 2022):

I got you

We I'was able to reproduce same error with

sed: -e expression #1, char 25: unknown option to `s'

It was during investigation of this issue https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/386

The problem arises for some reason on Arch-based system inside docker, I'll bring attention of our developers once more to this problem, but currently we have no proper solution

It hase something to do with

DOCKER_CONTAINER_ID=$(basename $(cat /proc/1/cpuset))

line

For some reason on Ubuntu inside container this string is not empty, but on Arch inside container - is empty

There is issue issue 53046 in our private issue tracker

<!-- gh-comment-id:1098053923 --> @ShockwaveNN commented on GitHub (Apr 13, 2022): I got you We I'was able to reproduce same error with ``` sed: -e expression #1, char 25: unknown option to `s' ``` It was during investigation of this issue https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/386 The problem arises for some reason on Arch-based system inside docker, I'll bring attention of our developers once more to this problem, but currently we have no proper solution It hase something to do with ``` DOCKER_CONTAINER_ID=$(basename $(cat /proc/1/cpuset)) ``` line For some reason on Ubuntu inside container this string is not empty, but on Arch inside container - is empty There is issue issue 53046 in our private issue tracker
Author
Owner

@zilexa commented on GitHub (Apr 13, 2022):

OK that is weird. I am really not an expert, far from it, but I thought containers used their own little OS subsystem of choice, regardless of the host OS..

Too bad if this means I won't be able to use OnlyOffice for a while. I like it a lot!

<!-- gh-comment-id:1098079226 --> @zilexa commented on GitHub (Apr 13, 2022): OK that is weird. I am really not an expert, far from it, but I thought containers used their own little OS subsystem of choice, regardless of the host OS.. Too bad if this means I won't be able to use OnlyOffice for a while. I like it a lot!
Author
Owner

@ShockwaveNN commented on GitHub (Apr 13, 2022):

but I thought containers used their own little OS subsystem of choice

I fought so also, so it was a big surprise for me then I'm stumbled on this error on Arch

I won't be able to use OnlyOffice for a while

I think you can try to rebuild docker image manually with DOCKER_CONTAINER_ID replacement on your own, but I'm not sure if this an easy task, I've never done it myself

I raise this issue once again with our developers - maybe they'll able to fix it soon

<!-- gh-comment-id:1098091566 --> @ShockwaveNN commented on GitHub (Apr 13, 2022): > but I thought containers used their own little OS subsystem of choice I fought so also, so it was a big surprise for me then I'm stumbled on this error on Arch > I won't be able to use OnlyOffice for a while I think you can try to rebuild docker image manually with `DOCKER_CONTAINER_ID` replacement on your own, but I'm not sure if this an easy task, I've never done it myself I raise this issue once again with our developers - maybe they'll able to fix it soon
Author
Owner

@zilexa commented on GitHub (Apr 13, 2022):

Ok great thanks for your quick help! When I check that command:

sudo cat /proc/1/cpuset
/init.scope

with basename in front it would be just init.scope. Not sure what the image needs.. I will wait for a fix/new image release.

<!-- gh-comment-id:1098198678 --> @zilexa commented on GitHub (Apr 13, 2022): Ok great thanks for your quick help! When I check that command: ``` sudo cat /proc/1/cpuset /init.scope ``` with basename in front it would be just `init.scope`. Not sure what the image needs.. I will wait for a fix/new image release.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 14, 2022):

I think this line is waiting your container id, but I think line like this

DOCKER_CONTAINER_ID=docker

will work also

<!-- gh-comment-id:1098775663 --> @ShockwaveNN commented on GitHub (Apr 14, 2022): I think this line is waiting your container id, but I think line like this ``` DOCKER_CONTAINER_ID=docker ``` will work also
Author
Owner

@ShockwaveNN commented on GitHub (May 1, 2022):

Our developers fixed that problem via https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/433

You can check it out with onlyoffice/4testing-documentserver:7.1.0.199 container, but please do not use this version in production, it may contain any number of bugs

We plan to release a stable version within a month

<!-- gh-comment-id:1114157015 --> @ShockwaveNN commented on GitHub (May 1, 2022): Our developers fixed that problem via https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/433 You can check it out with `onlyoffice/4testing-documentserver:7.1.0.199` container, but please do not use this version in production, it may contain any number of bugs We plan to release a stable version within a month
Author
Owner

@zilexa commented on GitHub (May 1, 2022):

The error is gone but still the page does not load. When I go to http://myserverlanIP:8811/ in Chrome or Firefox:

ERR_CONNECTION_REFUSED

This is what I used, I removed old related containers and their images/non-persistent volumes and also completely deleted the contents of $DOCKERDIR/onlyoffice before running docker-compose up -d

 office:
    container_name: office
    image: onlyoffice/4testing-documentserver:7.1.0.199
    restart: always
    volumes:
      - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data
      - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice
      - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql
      - /usr/share/fonts:/usr/share/fonts
    environment:
      JWT_ENABLED: true
      JWT_SECRET: $ONLYOFFICEJWT
    ports:
      - 8811:80

log shows:

Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctlcluster 12 main start

Ver Cluster Port Status Owner    Data directory              Log file
12  main    5432 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
 * Starting PostgreSQL 12 database server
   ...done.
 * Starting RabbitMQ Messaging Server rabbitmq-server

Note there is no "OK" after that last line about RabbitMQ and the log got overwritten after a while.

When I check 20min later I only see this in the log:

Waiting for connection to the localhost host on port 5672
Waiting for connection to the localhost host on port 5672
Waiting for connection to the localhost host on port 5672
Waiting for connection to the localhost host on port 5672

Note I've been trying to get OnlyOffice to work for >2yrs now. I think I only enjoyed using it for 6 months in total. For some reason, this image deviates completely from docker common and best practices. Making it very hard to figure out what the issue could be.

There are a lot of people on different fora and on Reddit that just gave up. I really like the product but the Docker image is really a bit of a nightmare.

I hope we can somehow figure out what is keeping the page from loading. I would like to make some noise on several channels about how awesome it is to have your own "Google docs" once I get it working again :)

<!-- gh-comment-id:1114207769 --> @zilexa commented on GitHub (May 1, 2022): The error is gone but still the page does not load. When I go to http://myserverlanIP:8811/ in Chrome or Firefox: ``` ERR_CONNECTION_REFUSED ``` This is what I used, I removed old related containers and their images/non-persistent volumes and also completely deleted the contents of `$DOCKERDIR/onlyoffice` before running `docker-compose up -d` ``` office: container_name: office image: onlyoffice/4testing-documentserver:7.1.0.199 restart: always volumes: - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql - /usr/share/fonts:/usr/share/fonts environment: JWT_ENABLED: true JWT_SECRET: $ONLYOFFICEJWT ports: - 8811:80 ``` log shows: ``` Creating new PostgreSQL cluster 12/main ... /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/12/main ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok Success. You can now start the database server using: pg_ctlcluster 12 main start Ver Cluster Port Status Owner Data directory Log file 12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log * Starting PostgreSQL 12 database server ...done. * Starting RabbitMQ Messaging Server rabbitmq-server ``` Note there is no "OK" after that last line about RabbitMQ and the log got overwritten after a while. When I check 20min later I only see this in the log: ``` Waiting for connection to the localhost host on port 5672 Waiting for connection to the localhost host on port 5672 Waiting for connection to the localhost host on port 5672 Waiting for connection to the localhost host on port 5672 ``` Note I've been trying to get OnlyOffice to work for >2yrs now. I think I only enjoyed using it for 6 months in total. For some reason, this image deviates completely from docker common and best practices. Making it very hard to figure out what the issue could be. There are a lot of people on different fora and on Reddit that just gave up. I really like the product but the Docker image is really a bit of a nightmare. I hope we can somehow figure out what is keeping the page from loading. I would like to make some noise on several channels about how awesome it is to have your own "Google docs" once I get it working again :)
Author
Owner

@ShockwaveNN commented on GitHub (May 2, 2022):

Could you try to remove all volumes altogether (I know that you said they are empty, but let's try to make you docker file agnostic to host PC and I'll try to reproduce it on my Arch)

So please delete those lines

volumes:
      - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data
      - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice
      - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql
      - /usr/share/fonts:/usr/share/fonts

this image deviates completely from docker common and best practices

Yeah I agree that it's not docker-way to include all db\redis\rabbitmq dependencies in single image, but most of our clients prefer it that way (so they can startup fully configured DocumentServer via single docker run command)

We got a sideproject in which all services splitter to separate container (https://github.com/ONLYOFFICE/Docker-Docs), but I'm not sure in which state are they right now

<!-- gh-comment-id:1114626006 --> @ShockwaveNN commented on GitHub (May 2, 2022): Could you try to remove all volumes altogether (I know that you said they are empty, but let's try to make you docker file agnostic to host PC and I'll try to reproduce it on my Arch) So please delete those lines ``` volumes: - $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data - $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice - $DOCKERDIR/onlyoffice/database:/var/lib/postgresql - /usr/share/fonts:/usr/share/fonts ``` > this image deviates completely from docker common and best practices Yeah I agree that it's not `docker-way` to include all db\redis\rabbitmq dependencies in single image, but most of our clients prefer it that way (so they can startup fully configured DocumentServer via single `docker run` command) We got a sideproject in which all services splitter to separate container (https://github.com/ONLYOFFICE/Docker-Docs), but I'm not sure in which state are they right now
Author
Owner

@zilexa commented on GitHub (May 4, 2022):

After seeing the many parts that make Onlyoffice DocumentServer, I am happy we have a single image!!
If only it would just work after creating a container with it :)

OK I removed those lines and I also deleted my folder $DOCKERDIR/onlyoffice. Removed the container and all related.

Now the page just loads forever until I get "unable to load page".

I managed to get the full log from Portainer this time!

  • Starting RabbitMQ Messaging Server rabbitmq-server always takes 15min. Then it fails! I believe this happened with previous tests but I was not able to catch it due to the log becoming too long and I thought it got overwritten. By changing Portainer to show 10000 lines of log instead of 100, I got the full info this time :)
  • Waiting for connection to the localhost host on port 5672 is also happening (repeating itself) for very long time. Perhaps port 5672 is RabbitMQ? That would make sense.

The issue is with RabbitMQ.

I am sorry about all the empty lines, that's because of Portainer. If you know of a better way to fetch the log please let me know.

2022-05-04T22:04:29.886117687Z  * Starting PostgreSQL 12 database server

2022-05-04T22:04:32.132020640Z    ...done.

2022-05-04T22:04:32.146275263Z  * Starting RabbitMQ Messaging Server rabbitmq-server

2022-05-04T22:21:33.069649755Z  * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}

2022-05-04T22:21:33.069668204Z    ...fail!

2022-05-04T22:21:33.072639107Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:34.074843095Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:35.076793524Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:36.078869919Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:37.080786795Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:38.082752137Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:39.084719867Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:40.086778338Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:41.088764744Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:42.090679138Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:43.092649856Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:44.094547236Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:45.096531850Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:46.098687733Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:47.100680492Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:48.102708627Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:21:49.104757069Z Waiting for connection to the localhost host on port 5672


....(goes on for a while)


2022-05-04T22:35:02.703959143Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:03.705884974Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:04.707810596Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:05.713695994Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:06.715691902Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:07.717677899Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:08.719625103Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:09.721701145Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:10.723495901Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:11.725520978Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:12.727419974Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:13.729392547Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:14.731394540Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:15.733409858Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:16.735368486Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:17.737333596Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:18.739341067Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:19.741435084Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:20.743421290Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:21.745839044Z Waiting for connection to the localhost host on port 5672

2022-05-04T22:35:22.796306008Z psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE:  table "doc_callbacks" does not exist, skipping

2022-05-04T22:35:22.805920879Z psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE:  function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping

2022-05-04T22:35:22.806200797Z psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE:  function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping

2022-05-04T22:35:24.072941783Z Starting supervisor: supervisord.

2022-05-04T22:35:24.082346902Z  * Starting periodic command scheduler cron

2022-05-04T22:35:24.087150947Z    ...done.

2022-05-04T22:35:24.103210619Z  * Starting nginx nginx

2022-05-04T22:35:24.168470080Z    ...done.

2022-05-04T22:35:27.502297003Z Generating AllFonts.js, please wait...Done

2022-05-04T22:35:57.344339355Z Generating presentation themes, please wait...Done

2022-05-04T22:35:58.905840930Z ds:docservice: stopped

2022-05-04T22:35:58.905876120Z ds:docservice: started

2022-05-04T22:36:00.153956551Z ds:converter: stopped

2022-05-04T22:36:00.153990267Z ds:converter: started

2022-05-04T22:36:22.577876489Z  * Reloading nginx configuration nginx

2022-05-04T22:36:22.598008182Z    ...done.

2022-05-04T22:36:22.600137522Z ==> /var/log/onlyoffice/documentserver/converter/err.log <==

2022-05-04T22:36:22.600156437Z 

2022-05-04T22:36:22.600159929Z ==> /var/log/onlyoffice/documentserver/converter/out.log <==

2022-05-04T22:36:22.600162633Z [2022-05-04T22:35:24.282] [WARN] nodeJS - update cluster with 1 workers

2022-05-04T22:36:22.600165184Z [2022-05-04T22:35:24.289] [WARN] nodeJS - worker 2692 started.

2022-05-04T22:36:22.600167752Z [2022-05-04T22:35:24.295] [WARN] nodeJS - update cluster with 1 workers

2022-05-04T22:36:22.600170160Z [2022-05-04T22:35:59.144] [WARN] nodeJS - update cluster with 1 workers

2022-05-04T22:36:22.600172641Z [2022-05-04T22:35:59.149] [WARN] nodeJS - worker 2763 started.

2022-05-04T22:36:22.600175045Z [2022-05-04T22:35:59.150] [WARN] nodeJS - update cluster with 1 workers

2022-05-04T22:36:22.600177520Z 

2022-05-04T22:36:22.600182809Z ==> /var/log/onlyoffice/documentserver/docservice/err.log <==

2022-05-04T22:36:22.600185403Z 

2022-05-04T22:36:22.600187723Z ==> /var/log/onlyoffice/documentserver/docservice/out.log <==

2022-05-04T22:36:22.600190254Z [2022-05-04T22:35:24.733] [WARN] nodeJS - Express server starting...

2022-05-04T22:36:22.600192706Z [2022-05-04T22:35:24.734] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability

2022-05-04T22:36:22.600195323Z [2022-05-04T22:35:24.807] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199

2022-05-04T22:36:22.600207862Z [2022-05-04T22:35:57.878] [WARN] nodeJS - Express server starting...

2022-05-04T22:36:22.600211222Z [2022-05-04T22:35:57.879] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability

2022-05-04T22:36:22.600213993Z [2022-05-04T22:35:57.902] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199

2022-05-04T22:36:22.600216570Z 

2022-05-04T22:36:22.600218995Z ==> /var/log/onlyoffice/documentserver/metrics/err.log <==

2022-05-04T22:36:22.600221519Z 

2022-05-04T22:36:22.600223920Z ==> /var/log/onlyoffice/documentserver/metrics/out.log <==

2022-05-04T22:36:22.600226443Z 4 May 22:35:24 - [2650] reading config file: ./config/config.js

2022-05-04T22:36:22.600228919Z 4 May 22:35:24 - server is up INFO

2022-05-04T22:36:22.600231385Z 

2022-05-04T22:36:22.600233777Z ==> /var/log/onlyoffice/documentserver/nginx.error.log <==
<!-- gh-comment-id:1118002893 --> @zilexa commented on GitHub (May 4, 2022): After seeing the many parts that make Onlyoffice DocumentServer, I am happy we have a single image!! If only it would just work after creating a container with it :) OK I removed those lines and I also deleted my folder `$DOCKERDIR/onlyoffice`. Removed the container and all related. Now the page just loads forever until I get "unable to load page". I managed to get the full log from Portainer this time! - `Starting RabbitMQ Messaging Server rabbitmq-server` always takes 15min. Then it fails! I believe this happened with previous tests but I was not able to catch it due to the log becoming too long and I thought it got overwritten. By changing Portainer to show 10000 lines of log instead of 100, I got the full info this time :) - `Waiting for connection to the localhost host on port 5672` is also happening (repeating itself) for very long time. Perhaps port 5672 is RabbitMQ? That would make sense. The issue is with RabbitMQ. I am sorry about all the empty lines, that's because of Portainer. If you know of a better way to fetch the log please let me know. ``` 2022-05-04T22:04:29.886117687Z * Starting PostgreSQL 12 database server 2022-05-04T22:04:32.132020640Z ...done. 2022-05-04T22:04:32.146275263Z * Starting RabbitMQ Messaging Server rabbitmq-server 2022-05-04T22:21:33.069649755Z * FAILED - check /var/log/rabbitmq/startup_\{log, _err\} 2022-05-04T22:21:33.069668204Z ...fail! 2022-05-04T22:21:33.072639107Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:34.074843095Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:35.076793524Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:36.078869919Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:37.080786795Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:38.082752137Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:39.084719867Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:40.086778338Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:41.088764744Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:42.090679138Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:43.092649856Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:44.094547236Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:45.096531850Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:46.098687733Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:47.100680492Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:48.102708627Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:21:49.104757069Z Waiting for connection to the localhost host on port 5672 ....(goes on for a while) 2022-05-04T22:35:02.703959143Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:03.705884974Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:04.707810596Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:05.713695994Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:06.715691902Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:07.717677899Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:08.719625103Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:09.721701145Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:10.723495901Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:11.725520978Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:12.727419974Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:13.729392547Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:14.731394540Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:15.733409858Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:16.735368486Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:17.737333596Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:18.739341067Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:19.741435084Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:20.743421290Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:21.745839044Z Waiting for connection to the localhost host on port 5672 2022-05-04T22:35:22.796306008Z psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE: table "doc_callbacks" does not exist, skipping 2022-05-04T22:35:22.805920879Z psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE: function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping 2022-05-04T22:35:22.806200797Z psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE: function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping 2022-05-04T22:35:24.072941783Z Starting supervisor: supervisord. 2022-05-04T22:35:24.082346902Z * Starting periodic command scheduler cron 2022-05-04T22:35:24.087150947Z ...done. 2022-05-04T22:35:24.103210619Z * Starting nginx nginx 2022-05-04T22:35:24.168470080Z ...done. 2022-05-04T22:35:27.502297003Z Generating AllFonts.js, please wait...Done 2022-05-04T22:35:57.344339355Z Generating presentation themes, please wait...Done 2022-05-04T22:35:58.905840930Z ds:docservice: stopped 2022-05-04T22:35:58.905876120Z ds:docservice: started 2022-05-04T22:36:00.153956551Z ds:converter: stopped 2022-05-04T22:36:00.153990267Z ds:converter: started 2022-05-04T22:36:22.577876489Z * Reloading nginx configuration nginx 2022-05-04T22:36:22.598008182Z ...done. 2022-05-04T22:36:22.600137522Z ==> /var/log/onlyoffice/documentserver/converter/err.log <== 2022-05-04T22:36:22.600156437Z 2022-05-04T22:36:22.600159929Z ==> /var/log/onlyoffice/documentserver/converter/out.log <== 2022-05-04T22:36:22.600162633Z [2022-05-04T22:35:24.282] [WARN] nodeJS - update cluster with 1 workers 2022-05-04T22:36:22.600165184Z [2022-05-04T22:35:24.289] [WARN] nodeJS - worker 2692 started. 2022-05-04T22:36:22.600167752Z [2022-05-04T22:35:24.295] [WARN] nodeJS - update cluster with 1 workers 2022-05-04T22:36:22.600170160Z [2022-05-04T22:35:59.144] [WARN] nodeJS - update cluster with 1 workers 2022-05-04T22:36:22.600172641Z [2022-05-04T22:35:59.149] [WARN] nodeJS - worker 2763 started. 2022-05-04T22:36:22.600175045Z [2022-05-04T22:35:59.150] [WARN] nodeJS - update cluster with 1 workers 2022-05-04T22:36:22.600177520Z 2022-05-04T22:36:22.600182809Z ==> /var/log/onlyoffice/documentserver/docservice/err.log <== 2022-05-04T22:36:22.600185403Z 2022-05-04T22:36:22.600187723Z ==> /var/log/onlyoffice/documentserver/docservice/out.log <== 2022-05-04T22:36:22.600190254Z [2022-05-04T22:35:24.733] [WARN] nodeJS - Express server starting... 2022-05-04T22:36:22.600192706Z [2022-05-04T22:35:24.734] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability 2022-05-04T22:36:22.600195323Z [2022-05-04T22:35:24.807] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199 2022-05-04T22:36:22.600207862Z [2022-05-04T22:35:57.878] [WARN] nodeJS - Express server starting... 2022-05-04T22:36:22.600211222Z [2022-05-04T22:35:57.879] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability 2022-05-04T22:36:22.600213993Z [2022-05-04T22:35:57.902] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199 2022-05-04T22:36:22.600216570Z 2022-05-04T22:36:22.600218995Z ==> /var/log/onlyoffice/documentserver/metrics/err.log <== 2022-05-04T22:36:22.600221519Z 2022-05-04T22:36:22.600223920Z ==> /var/log/onlyoffice/documentserver/metrics/out.log <== 2022-05-04T22:36:22.600226443Z 4 May 22:35:24 - [2650] reading config file: ./config/config.js 2022-05-04T22:36:22.600228919Z 4 May 22:35:24 - server is up INFO 2022-05-04T22:36:22.600231385Z 2022-05-04T22:36:22.600233777Z ==> /var/log/onlyoffice/documentserver/nginx.error.log <== ```
Author
Owner

@ShockwaveNN commented on GitHub (May 5, 2022):

Could you share a current version of docker-compose without additional volumes and I'll try to reproduce in on my Arch system?

<!-- gh-comment-id:1118241632 --> @ShockwaveNN commented on GitHub (May 5, 2022): Could you share a current version of `docker-compose` without additional volumes and I'll try to reproduce in on my Arch system?
Author
Owner

@zilexa commented on GitHub (May 5, 2022):

This is what I used:

version: "2.4"
services:
  office:
    container_name: office
    image: onlyoffice/4testing-documentserver:7.1.0.199
    #stdin_open: true
    restart: always
    #networks: 
      #- web-proxy
    #tty: true
    #volumes:
      #- $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data
      #- $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice
      #- $DOCKERDIR/onlyoffice/database:/var/lib/postgresql
      #- /usr/share/fonts:/usr/share/fonts
    environment:
      JWT_ENABLED: true
      JWT_SECRET: $ONLYOFFICEJWT
    ports:
      - 8811:80

With my .env file containing ONLYOFFICEJWT= long string

I did a clean install of Manjaro Gnome (image version 21.2.6) 3-4 weeks ago. It is fully updated.
Docker and Docker Compose installed via:

# Install Docker and Docker Compose
sudo pamac install --no-confirm docker docker-compose

# Create non-root user for docker, with privileges (not docker rootless)
sudo groupadd docker
sudo usermod -aG docker $USER

# Enable docker at boot
sudo systemctl enable docker.service
sudo systemctl enable containerd.service

I can run Docker Compose like this:

cd docker
docker-compose up -d

Docker version 20.10.14, build a224086349
Docker Compose version 2.4.1

It is not a rootless installation, just following the standard installation documentation of Docker.

<!-- gh-comment-id:1118846350 --> @zilexa commented on GitHub (May 5, 2022): This is what I used: ``` version: "2.4" services: office: container_name: office image: onlyoffice/4testing-documentserver:7.1.0.199 #stdin_open: true restart: always #networks: #- web-proxy #tty: true #volumes: #- $DOCKERDIR/onlyoffice/data:/var/www/onlyoffice/Data #- $DOCKERDIR/onlyoffice/log:/var/log/onlyoffice #- $DOCKERDIR/onlyoffice/database:/var/lib/postgresql #- /usr/share/fonts:/usr/share/fonts environment: JWT_ENABLED: true JWT_SECRET: $ONLYOFFICEJWT ports: - 8811:80 ``` With my .env file containing `ONLYOFFICEJWT= long string` I did a clean install of Manjaro Gnome (image version 21.2.6) 3-4 weeks ago. It is fully updated. Docker and Docker Compose installed via: ``` # Install Docker and Docker Compose sudo pamac install --no-confirm docker docker-compose # Create non-root user for docker, with privileges (not docker rootless) sudo groupadd docker sudo usermod -aG docker $USER # Enable docker at boot sudo systemctl enable docker.service sudo systemctl enable containerd.service ``` I can run Docker Compose like this: ``` cd docker docker-compose up -d ``` Docker version 20.10.14, build a224086349 Docker Compose version 2.4.1 It is not a rootless installation, just following the standard installation documentation of Docker.
Author
Owner

@ShockwaveNN commented on GitHub (May 12, 2022):

Hi, I've rechecked you docker-compsoe and there is no problem on my Arch system

I did exactly that you did, run your file and my startup logs are ok:

Attaching to office
office  |  * Starting PostgreSQL 12 database server
office  |    ...done.
office  |  * Starting RabbitMQ Messaging Server rabbitmq-server
office  |    ...done.
office  | psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE:  table "doc_callbacks" does not exist, skipping
office  | psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE:  function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping
office  | psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE:  function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping
office  | Starting supervisor: supervisord.
office  |  * Starting periodic command scheduler cron
office  |    ...done.
office  |  * Starting nginx nginx
office  |    ...done.
office  | Generating AllFonts.js, please wait...Done

Maybe there is something interesting in your logs of RabbitMQ startup

2022-05-04T22:21:33.069649755Z  * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
<!-- gh-comment-id:1124869547 --> @ShockwaveNN commented on GitHub (May 12, 2022): Hi, I've rechecked you docker-compsoe and there is no problem on my Arch system I did exactly that you did, run your file and my startup logs are ok: ``` Attaching to office office | * Starting PostgreSQL 12 database server office | ...done. office | * Starting RabbitMQ Messaging Server rabbitmq-server office | ...done. office | psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE: table "doc_callbacks" does not exist, skipping office | psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE: function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping office | psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE: function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping office | Starting supervisor: supervisord. office | * Starting periodic command scheduler cron office | ...done. office | * Starting nginx nginx office | ...done. office | Generating AllFonts.js, please wait...Done ``` Maybe there is something interesting in your logs of RabbitMQ startup ``` 2022-05-04T22:21:33.069649755Z * FAILED - check /var/log/rabbitmq/startup_\{log, _err\} ```
Author
Owner

@ShockwaveNN commented on GitHub (May 12, 2022):

Another solution - extract Rabbitmq to separte container and configure compose to use it

<!-- gh-comment-id:1124870053 --> @ShockwaveNN commented on GitHub (May 12, 2022): Another solution - extract Rabbitmq to separte container and configure compose to use it
Author
Owner

@zilexa commented on GitHub (May 12, 2022):

But you are testing with Arch Linux. I am on Manjaro Linux. They are really not the same thing. Could you please test in a VM? I am using a pretty much untouched Manjaro.

I am trying this now:

  office:
    container_name: office
    image: onlyoffice/4testing-documentserver:7.1.0.199
    networks:
      - office
    restart: always
    environment:
      JWT_ENABLED: true
      JWT_SECRET: $ONLYOFFICEJWT
      AMQP_URI: rabbitmq
    ports:
      - 8811:80
  rabbitmq:
    container_name: rabbitmq
    image: rabbitmq
    restart: always
    networks:
    - office

networks:
  office:
    driver: bridge

but still need some more info to understand wat is happening, because the log still shows issues:

/app/ds/run-document-server.sh: line 204: -3: substring expression < 0

This is now the first item in the log, what does it mean?

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

Waiting for connection to the localhost host on port 5432

What is it waiting for exactly? RabbitMQ? Because the default port of RabbitMQ is 5672. Why is that port not used by OnlyOffice? I tried AMQP_URI: rabbitmq:5672 but it makes no difference, log is exactly the same, waiting for something on port 5432.

FYI I get the exact same log output with image onlyoffice/documentserver.

<!-- gh-comment-id:1125027182 --> @zilexa commented on GitHub (May 12, 2022): But you are testing with Arch Linux. I am on Manjaro Linux. They are really not the same thing. Could you please test in a VM? I am using a pretty much untouched Manjaro. I am trying this now: ``` office: container_name: office image: onlyoffice/4testing-documentserver:7.1.0.199 networks: - office restart: always environment: JWT_ENABLED: true JWT_SECRET: $ONLYOFFICEJWT AMQP_URI: rabbitmq ports: - 8811:80 rabbitmq: container_name: rabbitmq image: rabbitmq restart: always networks: - office networks: office: driver: bridge ``` but still need some more info to understand wat is happening, because the log still shows issues: ``` /app/ds/run-document-server.sh: line 204: -3: substring expression < 0 ``` This is now the first item in the log, what does it mean? ``` Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 Waiting for connection to the localhost host on port 5432 ``` What is it waiting for exactly? RabbitMQ? Because the [default port](https://hub.docker.com/_/rabbitmq) of RabbitMQ is 5672. Why is that port not used by OnlyOffice? I tried `AMQP_URI: rabbitmq:5672` but it makes no difference, log is exactly the same, waiting for something on port 5432. FYI I get the exact same log output with image `onlyoffice/documentserver`.
Author
Owner

@ShockwaveNN commented on GitHub (May 12, 2022):

RabbitMQ?

In those logs:

2022-05-04T22:21:33.069649755Z  * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}

2022-05-04T22:21:33.069668204Z    ...fail!

2022-05-04T22:21:33.072639107Z Waiting for connection to the localhost host on port 5672

It was waiting for rabbitmq

Now it's waiting for psql for some reason

Seems something wrong with port allocation, don't know

I'll try Manjaro as soon as I got free time

<!-- gh-comment-id:1125068609 --> @ShockwaveNN commented on GitHub (May 12, 2022): > RabbitMQ? In those logs: ``` 2022-05-04T22:21:33.069649755Z * FAILED - check /var/log/rabbitmq/startup_\{log, _err\} 2022-05-04T22:21:33.069668204Z ...fail! 2022-05-04T22:21:33.072639107Z Waiting for connection to the localhost host on port 5672 ``` It was waiting for rabbitmq Now it's waiting for psql for some reason Seems something wrong with port allocation, don't know I'll try Manjaro as soon as I got free time
Author
Owner

@zilexa commented on GitHub (May 12, 2022):

It seems to me environment variable AMQP_URI is completely ignored. Its value doesn't matter.

Even if I use AMQP_URI: rabbitmq:5672 it's still waiting for port 5432.

Or if I give it what it wants: expose rabbitMQ port 5432:5672 and use AMQP_URI: 192.168.88.2:5432 it still can't find it..
(That IP is the host IP address).

I do run other containers that also use other services, for example mariadb container is being used by a file manager. And AdGuard Home uses Unbound. Both use ports that are not exposed because they are in the same network. So this principle does work on my host.

<!-- gh-comment-id:1125485943 --> @zilexa commented on GitHub (May 12, 2022): It seems to me environment variable AMQP_URI is completely ignored. Its value doesn't matter. Even if I use `AMQP_URI: rabbitmq:5672` it's still waiting for port 5432. Or if I give it what it wants: expose rabbitMQ port `5432:5672` and use `AMQP_URI: 192.168.88.2:5432` it still can't find it.. (That IP is the host IP address). I do run other containers that also use other services, for example mariadb container is being used by a file manager. And AdGuard Home uses Unbound. Both use ports that are not exposed because they are in the same network. So this principle does work on my host.
Author
Owner

@ShockwaveNN commented on GitHub (May 13, 2022):

Could you add protocol to URI so it will be something like this:

amqp://rabbitmq:5672
<!-- gh-comment-id:1125764704 --> @ShockwaveNN commented on GitHub (May 13, 2022): Could you add protocol to URI so it will be something like this: ``` amqp://rabbitmq:5672 ```
Author
Owner

@zilexa commented on GitHub (May 16, 2022):

As you said first it was waiting for rabbitmq, now for psql so I added that one too.

version: "2.4"
services:
  office:
    container_name: office
    image: onlyoffice/4testing-documentserver:7.1.0.199
    networks:
      - office
    restart: always
    environment:
      JWT_ENABLED: true
      JWT_SECRET: $ONLYOFFICEJWT
      AMQP_URI: amqp://officerabbitmq:5672
      DB_HOST: officedb
      DB_PORT: 5432
      DB_NAME: officedb
      DB_USER: office
      DB_PWD:  office01
    ports:
      - 8811:80
  officerabbitmq:
    container_name: officerabbitmq
    image: rabbitmq
    restart: always
    networks:
    - office
  officedb:
    container_name: officedb
    image: postgres
    networks:
      - office
    restart: always
    environment:
      POSTGRES_DB: officedb
      POSTGRES_USER: office
      POSTGRES_PASSWORD: office01

networks:
  office:
    driver: bridge

Log of Onlyoffice:

Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
Waiting for connection to the officerabbitmq host on port 5672
psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE:  table "doc_callbacks" does not exist, skipping
psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE:  function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping
psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE:  function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping
Starting supervisor: supervisord.
 * Starting periodic command scheduler cron
   ...done.
 * Starting nginx nginx
   ...done.
Generating AllFonts.js, please wait...Done
Generating presentation themes, please wait...Done
ds:docservice: stopped
ds:docservice: started
ds:converter: stopped
ds:converter: started
 * Reloading nginx configuration nginx
   ...done.
==> /var/log/onlyoffice/documentserver/converter/err.log <==
==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2022-05-16T12:42:08.223] [WARN] nodeJS - update cluster with 1 workers
[2022-05-16T12:42:08.232] [WARN] nodeJS - worker 420 started.
[2022-05-16T12:42:08.234] [WARN] nodeJS - update cluster with 1 workers
[2022-05-16T12:42:46.681] [WARN] nodeJS - update cluster with 1 workers
[2022-05-16T12:42:46.687] [WARN] nodeJS - worker 483 started.
[2022-05-16T12:42:46.689] [WARN] nodeJS - update cluster with 1 workers
==> /var/log/onlyoffice/documentserver/docservice/err.log <==
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2022-05-16T12:42:08.811] [WARN] nodeJS - Express server starting...
[2022-05-16T12:42:08.814] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2022-05-16T12:42:08.909] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199
[2022-05-16T12:42:45.179] [WARN] nodeJS - Express server starting...
[2022-05-16T12:42:45.182] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2022-05-16T12:42:45.232] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199
==> /var/log/onlyoffice/documentserver/metrics/err.log <==
==> /var/log/onlyoffice/documentserver/metrics/out.log <==
16 May 12:42:08 - [377] reading config file: ./config/config.js
16 May 12:42:08 - server is up INFO
==> /var/log/onlyoffice/documentserver/nginx.error.log <==
Flushing stats at  Mon May 16 2022 12:52:08 GMT+0000 (Coordinated Universal Time)
{
  counters: {
    'statsd.bad_lines_seen': 0,
    'statsd.packets_received': 0,
    'statsd.metrics_received': 0
  },
  timers: {},
  gauges: {},
  timer_data: {},
  counter_rates: {
    'statsd.bad_lines_seen': 0,
    'statsd.packets_received': 0,
    'statsd.metrics_received': 0
  },
  sets: {},
  pctThreshold: [ 90 ]
}  

Log of rabbitmq and postgresql show the containers start successfully.
Rabbitmq log shows it is listening on 5672.
Postgresql log shows it is listening on 5432.
And it looks like OnlyOffice is using them successfully.

At least this proves rabbitmq and postgresql by itself are not the issues, their containers run fine on Manjaro.

However, when I go to my server lan IP:8811, the page loads forever. Nothing loads.
nginx.error.log is an empty file.
The creation of this file seems to indicate an error happened wth nginx. But there is no errormessage.

Not sure how to move forward now?

<!-- gh-comment-id:1127634160 --> @zilexa commented on GitHub (May 16, 2022): As you said first it was waiting for rabbitmq, now for psql so I added that one too. ``` version: "2.4" services: office: container_name: office image: onlyoffice/4testing-documentserver:7.1.0.199 networks: - office restart: always environment: JWT_ENABLED: true JWT_SECRET: $ONLYOFFICEJWT AMQP_URI: amqp://officerabbitmq:5672 DB_HOST: officedb DB_PORT: 5432 DB_NAME: officedb DB_USER: office DB_PWD: office01 ports: - 8811:80 officerabbitmq: container_name: officerabbitmq image: rabbitmq restart: always networks: - office officedb: container_name: officedb image: postgres networks: - office restart: always environment: POSTGRES_DB: officedb POSTGRES_USER: office POSTGRES_PASSWORD: office01 networks: office: driver: bridge ``` Log of Onlyoffice: ``` Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 Waiting for connection to the officerabbitmq host on port 5672 psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:4: NOTICE: table "doc_callbacks" does not exist, skipping psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:9: NOTICE: function merge_db(pg_catalog.varchar,int2,int8,pg_catalog.timestamp,pg_catalog.varchar,int8,int8) does not exist, skipping psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:10: NOTICE: function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,pg_catalog.varchar,int4,int4) does not exist, skipping Starting supervisor: supervisord. * Starting periodic command scheduler cron ...done. * Starting nginx nginx ...done. Generating AllFonts.js, please wait...Done Generating presentation themes, please wait...Done ds:docservice: stopped ds:docservice: started ds:converter: stopped ds:converter: started * Reloading nginx configuration nginx ...done. ==> /var/log/onlyoffice/documentserver/converter/err.log <== ==> /var/log/onlyoffice/documentserver/converter/out.log <== [2022-05-16T12:42:08.223] [WARN] nodeJS - update cluster with 1 workers [2022-05-16T12:42:08.232] [WARN] nodeJS - worker 420 started. [2022-05-16T12:42:08.234] [WARN] nodeJS - update cluster with 1 workers [2022-05-16T12:42:46.681] [WARN] nodeJS - update cluster with 1 workers [2022-05-16T12:42:46.687] [WARN] nodeJS - worker 483 started. [2022-05-16T12:42:46.689] [WARN] nodeJS - update cluster with 1 workers ==> /var/log/onlyoffice/documentserver/docservice/err.log <== ==> /var/log/onlyoffice/documentserver/docservice/out.log <== [2022-05-16T12:42:08.811] [WARN] nodeJS - Express server starting... [2022-05-16T12:42:08.814] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability [2022-05-16T12:42:08.909] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199 [2022-05-16T12:42:45.179] [WARN] nodeJS - Express server starting... [2022-05-16T12:42:45.182] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability [2022-05-16T12:42:45.232] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 199 ==> /var/log/onlyoffice/documentserver/metrics/err.log <== ==> /var/log/onlyoffice/documentserver/metrics/out.log <== 16 May 12:42:08 - [377] reading config file: ./config/config.js 16 May 12:42:08 - server is up INFO ==> /var/log/onlyoffice/documentserver/nginx.error.log <== Flushing stats at Mon May 16 2022 12:52:08 GMT+0000 (Coordinated Universal Time) { counters: { 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0, 'statsd.metrics_received': 0 }, timers: {}, gauges: {}, timer_data: {}, counter_rates: { 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0, 'statsd.metrics_received': 0 }, sets: {}, pctThreshold: [ 90 ] } ``` Log of rabbitmq and postgresql show the containers start successfully. Rabbitmq log shows it is listening on 5672. Postgresql log shows it is listening on 5432. And it looks like OnlyOffice is using them successfully. At least this proves rabbitmq and postgresql by itself are not the issues, their containers run fine on Manjaro. However, when I go to my server lan IP:8811, the page loads forever. Nothing loads. nginx.error.log is an empty file. The creation of this file seems to indicate an error happened wth nginx. But there is no errormessage. Not sure how to move forward now?
Author
Owner

@ShockwaveNN commented on GitHub (May 16, 2022):

I've rehcked your latest compose on ubuntu 20.04 and seems it working fine, IP:8811 is accessible

So I still need time to install Manjaor to check on it

<!-- gh-comment-id:1127709274 --> @ShockwaveNN commented on GitHub (May 16, 2022): I've rehcked your latest compose on `ubuntu 20.04` and seems it working fine, IP:8811 is accessible So I still need time to install Manjaor to check on it
Author
Owner

@ShockwaveNN commented on GitHub (May 19, 2022):

So

I've setup clean manjaro from manjaro-xfce-21.2.6-220416-linux515.iso

Run your docker-compose and it started fine and uses correct port
image

I think your problem has something to do with your specific setup

<!-- gh-comment-id:1131864190 --> @ShockwaveNN commented on GitHub (May 19, 2022): So I've setup clean manjaro from `manjaro-xfce-21.2.6-220416-linux515.iso` Run your docker-compose and it started fine and uses correct port ![image](https://user-images.githubusercontent.com/668524/169334609-43999f04-b353-4a80-a3b9-c91d573d900d.png) I think your problem has something to do with your specific setup
Author
Owner

@ShockwaveNN commented on GitHub (Jun 24, 2022):

I'm closing this issue since it should be resolved in v7.1.x

Feel free to open new if any problems occur and you know how to reproduce them

<!-- gh-comment-id:1165669940 --> @ShockwaveNN commented on GitHub (Jun 24, 2022): I'm closing this issue since it should be resolved in v7.1.x Feel free to open new if any problems occur and you know how to reproduce them
Author
Owner

@zilexa commented on GitHub (Jul 24, 2022):

Now that more people are using my docker compose example, others running Manjaro with BTRFS filesystem are also unable to get OnlyOffice Documentserver working. No issue with other docker images.

I know you spend time testing this, but us there a chance you can test this on a real machine instead of VM and by selecting BTRFS (no swap) as filesystem during installation?

<!-- gh-comment-id:1193341303 --> @zilexa commented on GitHub (Jul 24, 2022): Now that more people are using my docker compose example, others running Manjaro with BTRFS filesystem are also unable to get OnlyOffice Documentserver working. No issue with other docker images. I know you spend time testing this, but us there a chance you can test this on a real machine instead of VM and by selecting BTRFS (no swap) as filesystem during installation?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#218
No description provided.