ONLYOFFICE / Docker-DocumentServer

ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
GNU Affero General Public License v3.0
1.39k stars 477 forks source link

Document-server fails to run #503

Closed alexeyvolkoff closed 1 year ago

alexeyvolkoff commented 1 year ago

Hi, my docker-compose integration fails to run after one of the latest upgrades. Actually, it runs, but I get 502 error on api request.

docket stats is very strange - container consumes only 600k of memory with 2 pids:

5f93fa2e28e 0.20% 656 KiB / 7.906 GiB 0.01% 1.45 kB / 786 B 521 kB / 615 kB 2

I checked docker logs for the container 5f93fa2e28e and it shows like it is trying to connect to some invalid port:

Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 

Like some config is broken.

I tried to remove the data volume in hope that it will re-create the default config, but it didn't.

Any idea?

alexeyvolkoff commented 1 year ago

Yes, the problem exists in the latest (7.3) build. Version 7.2 works fine

ShockwaveNN commented 1 year ago

What do you mean by v7.3?

There is no such version even in development

https://hub.docker.com/r/onlyoffice/documentserver-ee/tags/?page=1&ordering=last_updated

alexeyvolkoff commented 1 year ago

sorry, it is tag 7.2 (or latest) working tag is 7.1

onlyoffice-document-server:
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver:7.1
    restart: always
    environment:
       - JWT_ENABLED=false
    ports:
       - 127.0.0.1:8082:80
    volumes:
      - document_data:/var/www/onlyoffice/Data
      - document_log:/var/log/onlyoffice
ShockwaveNN commented 1 year ago

Try to change ports line for something simpler, not sure if we ever tested with such notation

alexeyvolkoff commented 1 year ago

tried the simplest way: docker run -i -t -d -p 8080:80 onlyoffice/documentserver

ShockwaveNN commented 1 year ago

Got it, seems this is the same problem that occurred for several users, but we never found out a root case or how to reproduce it

Please make sure you've using latest docker sever and describe your host os

Seems this problem depends of host

alexeyvolkoff commented 1 year ago

cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core) [root@onmydisk onmydisk-integration]# docker -v Docker version 1.13.1, build 64e9980/1.13.1 Sorry, no option for upgrade

ShockwaveNN commented 1 year ago

this version of docker is not supported by docker

https://endoflife.date/docker-engine

So ubuntu-22.04 image simply too new for that

upgrade to docker 20.10

alexeyvolkoff commented 1 year ago

Ok, thanks!

rabesocke commented 1 year ago

I have the same problem with the tag 7.2. I also downgraded to 7.1.

I use the all-in-one docker image with no separate volume. The error log says, that the PostgreSQL cannot start and that's why localhost:5432 is not accessible.

ShockwaveNN commented 1 year ago

@rabesocke which docker service version are you using? Old and deprecated?

rabesocke commented 1 year ago

@ShockwaveNN I use just docker run with 5:20.10.18~3-0~debian-buster

ShockwaveNN commented 1 year ago

I think this may be another problem, you need to provide exact details how to reproduce it

rabesocke commented 1 year ago

Just start the latest image with the default docker run command as you describe in the Github readme

sudo docker run -i -t -d -p 80:80 onlyoffice/documentserver:latest

That's running, when I create a completely new container.

I now removed all non-persistent volumes in my existing container and started the latest image. Now it's working.

I think, the problem is the migration to Postgres 14. That's not flawless if you have an existing container since several years.

aol-nnov commented 1 year ago

I think, I've found the root cause

root@c90dd84f29ac:/var/www/onlyoffice/documentserver/npm# ./json 
./json[5681]: ../src/node_platform.cc:61:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0x8e08f0 node::Abort() [./json]
 2: 0x8e096c  [./json]
 3: 0x94c4f7 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [./json]
 4: 0x94c607 node::NodePlatform::NodePlatform(int, v8::TracingController*) [./json]
 5: 0x8bee61 node::InitializeOncePerProcess(int, char**) [./json]
 6: 0x8bf19c node::Start(int, char**) [./json]
 7: 0x7f1eb4fb4d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f1eb4fb4e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0x842a71  [./json]
Aborted (core dumped)

json utility is used to query default values for different variables, that may be, in other case, passed via environment.

That explains why those parameters are missing now.

aol-nnov commented 1 year ago

@ShockwaveNN it pretty much looks like that binary was built with some newer CPU optimisations (such as SSE4).

just in case, mine is:

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       38 bits physical, 48 bits virtual
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               23
Model name:          Intel(R) Xeon(R) CPU           E5440  @ 2.83GHz
Stepping:            6
CPU MHz:             2000.204
BogoMIPS:            5667.25
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            6144K
NUMA node0 CPU(s):   0-7
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 lahf_lm pti tpr_shadow vnmi flexpriority dtherm

And I'm experiencing this issue as we talk.

Btw, recent gitlab release was struggling with the similar issue, too https://gitlab.com/gitlab-org/gitlab/-/issues/368656

ShockwaveNN commented 1 year ago

This may be, since we updated our build infrastructure to Ubuntu 16.04 to use newer and faster cef

aol-nnov commented 1 year ago

This is a disaster... Any plans to support older CPUs as it was prior to 7.2 release?

As an emergency measure I had to rollback to 7.1

igwyd commented 1 year ago

hello @rabesocke provide please you cpu model and os version. I understand correctly that it is repeated only with new images? And as i see you have docker 20.10, its true?

Hello @aol-nnov provide please too os version and docker version. I doubt this is due to the processor model, but I need to check.

aol-nnov commented 1 year ago

@igwyd it's proxmox 6.1 here

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:25:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:24:29 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

I understand correctly that it is repeated only with new images?

right. 7.1 tag works like a charm (and it saved my ass today ;) )

igwyd commented 1 year ago

@aol-nnov Docker Engine 19.03.5 not supported, please update to the latest version 20.10 and try again.

aol-nnov commented 1 year ago

@igwyd could you please guide me to that part of documentation?

How come 7.1 works and 7.2 is "not supported"? Minor version bump and such a breaking change without a notice... What a bummer..

Unfortunately, I'm unable to update docker engine any time soon. It's a production environment and I'm running low with spare hw.

rabesocke commented 1 year ago

For me the problem was the upgrade to 7.2 because of all the last versions I used before several years. All the upgrades from one image to the other were no problem since version 7.2. It seems that you did an upgrade of Postgres in the Docker image. Before, there was Postgres 12 and now you use Postgres 14.

When I clean up all the volumes and create a complete new container without any previous volumes/data, the image 7.2 is working. That's now my situation - I have no previous data left.

Maybe I or you can reproduce this, when you set up a new container with 7.1 and upgrade then to 7.2.

Prozessor: AMD Turion(tm) II Neo N54L Dual-Core Processor
Kernel: Linux 5.10.0-18-amd64
Docker: 20.10.18~3-0~debian-buster
aol-nnov commented 1 year ago

/var/www/onlyoffice/documentserver/npm/json works fine on that my CPU, if it is extracted from container. So, it's not unsupported CPU features issue. It might be something with limits...

igwyd commented 1 year ago

@aol-nnov docker claims to only support the latest version, we follow this in docker distribution. We think problem in change base image ubuntu in docker, we updated it from 20.04 to 22.04.

@rabesocke ok, thanks.

igwyd commented 1 year ago

@rabesocke i can't reproduce, update from 7.1 to 7.2 works correctly for me, the volumes saves including postgres. i run:

sudo docker run -i -t -d -p 80:80 --restart=always \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql  onlyoffice/documentserver:7.1

and updated it via our manual here. Could you describe your installation and update process in more detail with your specific commands?

rabesocke commented 1 year ago

I found the reason, why the direct upgrade to 7.2 was not working for me.

I use Portainer and normally upgrade via the "Replace" button with "Pull latest image" active.

image

The problem was, that some environment variables were set, that are used in the start up. Here is one variable called PG_VERSION which was set to 12. Due to the upgrade to Ubuntu 22.04 the Postgres was upgraded to 14. When I change the environment variable to 14 the container with the image 7.2 starts without problems.

igwyd commented 1 year ago

@rabesocke ok, thanks for details)

qqxadyy commented 1 year ago

@igwyd I have the same problem. So the 7.2 version must depends on docker 20+?

elpito commented 1 year ago

The onlyoffice container does not start:

/var/www/onlyoffice/documentserver/npm/json[35]: ../src/node_platform.cc:61:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0x8e08f0 node::Abort() [/var/www/onlyoffice/documentserver/npm/json]
 2: 0x8e096c  [/var/www/onlyoffice/documentserver/npm/json]
 3: 0x94c4f7 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [/var/www/onlyoffice/documentserver/npm/json]
 4: 0x94c607 node::NodePlatform::NodePlatform(int, v8::TracingController*) [/var/www/onlyoffice/documentserver/npm/json]
 5: 0x8bee61 node::InitializeOncePerProcess(int, char**) [/var/www/onlyoffice/documentserver/npm/json]
 6: 0x8bf19c node::Start(int, char**) [/var/www/onlyoffice/documentserver/npm/json]
 7: 0x7f7425190d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f7425190e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0x842a71  [/var/www/onlyoffice/documentserver/npm/json]
/app/ds/run-document-server.sh: line 215: -3: substring expression < 0
nc: port number invalid:

Ist this probably related to this issue?

elpito commented 1 year ago

Forgot to post our environment: Host Almalinux 8.6 Docker: docker-ce-cli-20.10.6-3.el8.x86_64 docker-ce-20.10.6-3.el8.x86_64 OnlyOffice version 7.2 (latest)

aol-nnov commented 1 year ago

@elpito /var/www/onlyoffice/documentserver/npm/json aborts due some limits (as in ulimit -a).

I've extracted it from container recently and run successfully on the same CPU.

@igwyd look! @elpito has docker 20.10 and yet the same error as me! So, it's not the docker version. We need to investigate more...

aol-nnov commented 1 year ago

Found it!!! https://askubuntu.com/a/1410408

If I start onlyoffice container with --security-opt seccomp=unconfined, then aforementioned json program does not abort! (I'm well aware, that running so is a security risk, but, unfortunately, it's the only chance for me now)

It runs fine even on docker 18.09.1. Sooo, @igwyd it has to do with the base image you're now using for your image!

elpito commented 1 year ago

@aol-nnov OK, thank you. I have checked this before I have posted my comments. But, I have checked it again, but, no luck. Starting the container using --security-opt seccomp=unconfined is also working on my side. But, this is not a real solution for the problem.

igwyd commented 1 year ago

@aol-nnov @elpito latest version docker include minor of course - 20.10.18 https://endoflife.date/docker-engine

We don't recomend run with --security-opt seccomp=unconfined , much better update docker.

ShockwaveNN commented 1 year ago

Closing this issue, since 99% sure OP's problem with VERY old docker version - 1.13.1

Anyone having similar problems - should upgrade the docker engine to the latest stable version (v20.10.18 as of now)

ShockwaveNN commented 1 year ago

I've added mention of this problem to CHANGELOG and Docker-DocumentServer's README

WWWWYYYY commented 1 year ago

Hi, my docker-compose integration fails to run after one of the latest upgrades. Actually, it runs, but I get 502 error on api request.

docket stats is very strange - container consumes only 600k of memory with 2 pids:

5f93fa2e28e 0.20% 656 KiB / 7.906 GiB 0.01% 1.45 kB / 786 B 521 kB / 615 kB 2

I checked docker logs for the container 5f93fa2e28e and it shows like it is trying to connect to some invalid port:

Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 
nc: port number invalid: 
Waiting for connection to the  host on port 

Like some config is broken.

I tried to remove the data volume in hope that it will re-create the default config, but it didn't.

Any idea?

exec docker run -itd --restart=always --name=onlyoffice --privileged -p 8085:80 onlyoffice/documentserver it is work.

alexeyvolkoff commented 1 year ago

Confirming. After upgrading docker to latest docker-ce everithing works!

liudonghua123 commented 3 months ago

I have the same issue with docker 26.1.2.

Details ```shell [root@ha-master-1 nextcloud]# cat compose.yml version: '3' services: app: image: nextcloud restart: unless-stopped ports: - "8082:80" volumes: - ./nextcloud:/var/www/html environment: - NEXTCLOUD_ADMIN_USER=admin - NEXTCLOUD_ADMIN_PASSWORD=admin@ynu - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.app.ynu.edu.cn - MYSQL_HOST=db - MYSQL_DATABASE=nextcloud - MYSQL_USER=db_user - MYSQL_PASSWORD=db_password - LANG=zh_CN.UTF-8 depends_on: - db db: image: mariadb restart: unless-stopped volumes: - ./mysql:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=db_root_password - MYSQL_DATABASE=nextcloud - MYSQL_USER=db_user - MYSQL_PASSWORD=db_password onlyoffice: image: onlyoffice/documentserver restart: unless-stopped privileged: true volumes: - ./onlyoffice:/var ports: - "80" [root@ha-master-1 nextcloud]# docker compose down onlyoffice WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete [+] Running 2/1 ✔ Container nextcloud-onlyoffice-1 Removed 10.6s ! Network nextcloud_default Resource is still in use 0.0s [root@ha-master-1 nextcloud]# docker compose up -d onlyoffice WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete [+] Running 1/1 ✔ Container nextcloud-onlyoffice-1 Started 5.4s [root@ha-master-1 nextcloud]# docker compose logs onlyoffice WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete onlyoffice-1 | stat: cannot statx '/var/www/onlyoffice/documentserver/server/DocService/docservice': No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 148: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 149: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 158: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 165: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 166: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 167: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 169: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 221: -3: substring expression < 0 onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port [root@ha-master-1 nextcloud]# ll onlyoffice/ total 20 drwxr-xr-x. 5 root root 4096 Jun 1 13:56 . drwxr-xr-x. 5 root root 4096 Jun 1 17:58 .. drwxr-xr-x. 6 root root 4096 Jun 1 13:56 lib drwxr-xr-x. 3 root root 4096 Jun 1 13:56 log drwxr-xr-x. 3 root root 4096 Jun 1 13:56 www [root@ha-master-1 nextcloud]# rm -rf onlyoffice/ [root@ha-master-1 nextcloud]# docker compose down onlyoffice WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete [+] Running 2/2 ✔ Container nextcloud-onlyoffice-1 Removed 10.5s ! Network nextcloud_default Resource is still in use 0.0s [root@ha-master-1 nextcloud]# docker compose up -d onlyoffice WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete [+] Running 1/1 ✔ Container nextcloud-onlyoffice-1 Started 4.6s [root@ha-master-1 nextcloud]# docker compose logs onlyoffice WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete onlyoffice-1 | stat: cannot statx '/var/www/onlyoffice/documentserver/server/DocService/docservice': No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 148: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 149: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 158: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 165: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 166: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 167: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 169: /var/www/onlyoffice/documentserver/npm/json: No such file or directory onlyoffice-1 | /app/ds/run-document-server.sh: line 221: -3: substring expression < 0 onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port onlyoffice-1 | nc: port number invalid: onlyoffice-1 | Waiting for connection to the host on port [root@ha-master-1 nextcloud]# docker compose exec onlyoffice bash WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete root@bb9422020a74:/# ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 10:00 ? 00:00:00 /bin/bash /app/ds/run-document-server.sh root 373 0 0 10:02 pts/0 00:00:00 bash root 386 1 0 10:02 ? 00:00:00 sleep 1 root 387 373 0 10:02 pts/0 00:00:00 ps -ef root@bb9422020a74:/# netstat -nap Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.11:39281 0.0.0.0:* LISTEN - udp 0 0 127.0.0.11:40381 0.0.0.0:* - Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node PID/Program name Path root@bb9422020a74:/# exit exit [root@ha-master-1 nextcloud]# [root@ha-master-1 nextcloud]# docker --version Docker version 26.1.2, build 211e74b [root@ha-master-1 nextcloud]# [root@ha-master-1 nextcloud]# docker compose ps WARN[0000] /root/app/nextcloud/compose.yml: `version` is obsolete NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS nextcloud-app-1 nextcloud "/entrypoint.sh apac…" app 4 hours ago Up 4 hours 0.0.0.0:8082->80/tcp, :::8082->80/tcp nextcloud-db-1 mariadb "docker-entrypoint.s…" db 4 hours ago Up 4 hours 3306/tcp nextcloud-onlyoffice-1 onlyoffice/documentserver "/app/ds/run-documen…" onlyoffice 3 minutes ago Up 3 minutes 443/tcp, 0.0.0.0:32774->80/tcp, :::32774->80/tcp [root@ha-master-1 nextcloud]# ```
liudonghua123 commented 3 months ago

I have also tried docker run -itd --name=onlyoffice --privileged -p 8085:80 onlyoffice/documentserver. But it seems the 80 port was not served.

[root@ha-master-1 nextcloud]# docker run -itd  --name=onlyoffice --privileged -p 8085:80 onlyoffice/documentserver
afff68da312633f273a58c07654f7ad1dc32b304005ff82bc67e00402ada57fe
[root@ha-master-1 nextcloud]# docker ps | grep onlyoffice
afff68da3126   onlyoffice/documentserver          "/app/ds/run-documen…"    18 seconds ago   Up 13 seconds                   443/tcp, 0.0.0.0:8085->80/tcp, :::8085->80/tcp                                                                                                                                                                          onlyoffice
bb9422020a74   onlyoffice/documentserver          "/app/ds/run-documen…"    6 minutes ago    Up 6 minutes                    443/tcp, 0.0.0.0:32774->80/tcp, :::32774->80/tcp                                                                                                                                                                        nextcloud-onlyoffice-1
[root@ha-master-1 nextcloud]#
[root@ha-master-1 nextcloud]# docker exec -it onlyoffice bash
root@afff68da3126:/# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 10:06 pts/0    00:00:00 /bin/bash /app/ds/run-document-server.sh
postgres     310       1  0 10:06 ?        00:00:00 /usr/lib/postgresql/14/bin/postgres -D /var/lib/postgresql/14/main -c config_file=/etc/postgresql/14/main/postgresql.conf
postgres     312     310  0 10:06 ?        00:00:00 postgres: 14/main: checkpointer 
postgres     313     310  0 10:06 ?        00:00:00 postgres: 14/main: background writer 
postgres     314     310  0 10:06 ?        00:00:00 postgres: 14/main: walwriter 
postgres     315     310  0 10:06 ?        00:00:00 postgres: 14/main: autovacuum launcher 
postgres     316     310  0 10:06 ?        00:00:00 postgres: 14/main: stats collector 
postgres     317     310  0 10:06 ?        00:00:00 postgres: 14/main: logical replication launcher 
root         329       1  0 10:06 pts/0    00:00:00 /bin/sh /etc/init.d/rabbitmq-server start
rabbitmq     419       1  0 10:06 ?        00:00:00 /usr/lib/erlang/erts-12.2.1/bin/epmd -daemon
rabbitmq     479       1 98 10:06 ?        00:00:31 start-stop-daemon --quiet --chuid rabbitmq --start --exec /usr/sbin/rabbitmq-server --pidfile  --background
root         480     329  0 10:06 pts/0    00:00:00 /bin/sh /usr/sbin/rabbitmqctl wait --timeout 600 /var/run/rabbitmq/pid
root         491     480  0 10:06 pts/0    00:00:00 su rabbitmq -s /bin/sh -c /usr/lib/rabbitmq/bin/rabbitmqctl  "wait" "--timeout" "600" "/var/run/rabbitmq/pid"
rabbitmq     492     491  0 10:06 ?        00:00:00 sh -c /usr/lib/rabbitmq/bin/rabbitmqctl  "wait" "--timeout" "600" "/var/run/rabbitmq/pid"
rabbitmq     493     492  2 10:06 ?        00:00:00 /usr/lib/erlang/erts-12.2.1/bin/beam.smp -B -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -boot start_clean -no
rabbitmq     503     493  0 10:06 ?        00:00:00 erl_child_setup 1024
root         557       0  0 10:06 pts/1    00:00:00 bash
root         565     557  0 10:06 pts/1    00:00:00 ps -ef
root@afff68da3126:/# netstat -nap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      310/postgres        
tcp        0      0 0.0.0.0:35672           0.0.0.0:*               LISTEN      493/beam.smp        
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      419/epmd            
tcp        0      0 127.0.0.1:46278         127.0.0.1:4369          ESTABLISHED 493/beam.smp        
tcp        0      0 172.17.0.2:4369         172.17.0.2:51868        TIME_WAIT   -                   
tcp        0      0 172.17.0.2:4369         172.17.0.2:51880        TIME_WAIT   -                   
tcp        0      0 127.0.0.1:4369          127.0.0.1:46278         ESTABLISHED 419/epmd            
tcp        0      0 172.17.0.2:4369         172.17.0.2:51854        TIME_WAIT   -                   
tcp        0      0 127.0.0.1:46264         127.0.0.1:4369          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:46262         127.0.0.1:4369          TIME_WAIT   -                   
tcp6       0      0 ::1:5432                :::*                    LISTEN      310/postgres        
tcp6       0      0 :::4369                 :::*                    LISTEN      419/epmd            
udp6       0      0 ::1:53412               ::1:53412               ESTABLISHED 310/postgres        
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     47919698 310/postgres         /var/run/postgresql/.s.PGSQL.5432
unix  3      [ ]         STREAM     CONNECTED     47919038 493/beam.smp         
unix  3      [ ]         STREAM     CONNECTED     47919039 503/erl_child_setup  
root@afff68da3126:/# curl localhost
curl: (7) Failed to connect to localhost port 80 after 0 ms: Connection refused
root@afff68da3126:/# exit
exit
[root@ha-master-1 nextcloud]# docker logs onlyoffice 
 * Starting PostgreSQL 14 database server                                                                                                                                          [ OK ] 
[root@ha-master-1 nextcloud]#

After a few seconds, I tried again, it seems worked now.

[root@ha-master-1 nextcloud]# docker logs onlyoffice 
 * Starting PostgreSQL 14 database server                                                                                                                                          [ OK ] 
 * Starting RabbitMQ Messaging Server rabbitmq-server                                                                                                                              [ OK ] 
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
psql:/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql:11: NOTICE:  function merge_db(pg_catalog.varchar,int2,int4,pg_catalog.timestamp,int4,int4,text,text) does not exist, skipping
Starting supervisor: supervisord.
 * Starting periodic command scheduler cron                                                                                                                                        [ OK ] 
 * Starting nginx nginx                                                                                                                                                            [ OK ] 
Generating AllFonts.js, please wait...Done
Generating presentation themes, please wait...Done
Generating js caches, please wait...Done
ds:docservice: stopped
ds:docservice: started
ds:converter: stopped
ds:converter: started
 * Reloading nginx configuration nginx                                                                                                                                             [ OK ] 
JWT is enabled by default. A random secret is generated automatically. Run the command "docker exec afff68da3126 sudo documentserver-jwt-status.sh" to get information about JWT.
==> /var/log/onlyoffice/documentserver/converter/err.log <==

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2024-06-01T10:08:32.672] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 16; availableParallelism: undefined
[2024-06-01T10:08:32.674] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers
[2024-06-01T10:08:32.681] [WARN] [localhost] [docId] [userId] nodeJS - worker 782 started.
[2024-06-01T10:08:32.683] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 16; availableParallelism: undefined
[2024-06-01T10:08:32.684] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers
[2024-06-01T10:09:05.449] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 16; availableParallelism: undefined
[2024-06-01T10:09:05.451] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers
[2024-06-01T10:09:05.460] [WARN] [localhost] [docId] [userId] nodeJS - worker 1073 started.
[2024-06-01T10:09:05.463] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 16; availableParallelism: undefined
[2024-06-01T10:09:05.463] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers

==> /var/log/onlyoffice/documentserver/docservice/err.log <==

==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2024-06-01T10:08:33.114] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2024-06-01T10:08:33.116] [WARN] [localhost] [docId] [userId] 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
[2024-06-01T10:08:33.361] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.0.1. Build: 31
[2024-06-01T10:09:03.714] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2024-06-01T10:09:03.718] [WARN] [localhost] [docId] [userId] 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
[2024-06-01T10:09:03.877] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.0.1. Build: 31

==> /var/log/onlyoffice/documentserver/metrics/err.log <==

==> /var/log/onlyoffice/documentserver/metrics/out.log <==
1 Jun 10:08:32 - [727] reading config file: ./config/config.js
1 Jun 10:08:32 - server is up INFO

==> /var/log/onlyoffice/documentserver/nginx.error.log <==
[root@ha-master-1 nextcloud]# docker exec -it onlyoffice bash
root@afff68da3126:/# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 10:06 pts/0    00:00:00 /bin/bash /app/ds/run-document-server.sh
postgres     310       1  0 10:06 ?        00:00:00 /usr/lib/postgresql/14/bin/postgres -D /var/lib/postgresql/14/main -c config_file=/etc/postgresql/14/main/postgresql.conf
postgres     312     310  0 10:06 ?        00:00:00 postgres: 14/main: checkpointer 
postgres     313     310  0 10:06 ?        00:00:00 postgres: 14/main: background writer 
postgres     314     310  0 10:06 ?        00:00:00 postgres: 14/main: walwriter 
postgres     315     310  0 10:06 ?        00:00:00 postgres: 14/main: autovacuum launcher 
postgres     316     310  0 10:06 ?        00:00:00 postgres: 14/main: stats collector 
postgres     317     310  0 10:06 ?        00:00:00 postgres: 14/main: logical replication launcher 
rabbitmq     419       1  0 10:06 ?        00:00:00 /usr/lib/erlang/erts-12.2.1/bin/epmd -daemon
rabbitmq     479       1 43 10:06 ?        00:02:11 /bin/sh /usr/sbin/rabbitmq-server
rabbitmq     576     479  0 10:08 ?        00:00:00 /bin/sh /usr/lib/rabbitmq/bin/rabbitmq-server
rabbitmq     581     576  2 10:08 ?        00:00:04 /usr/lib/erlang/erts-12.2.1/bin/beam.smp -W w -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 
rabbitmq     588     581  0 10:08 ?        00:00:00 erl_child_setup 1073741816
rabbitmq     664     588  0 10:08 ?        00:00:00 inet_gethost 4
rabbitmq     665     664  0 10:08 ?        00:00:00 inet_gethost 4
root         714       1  0 10:08 ?        00:00:00 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
ds           727     714  0 10:08 ?        00:00:00 /var/www/onlyoffice/documentserver/server/Metrics/metrics ./config/config.js
root         752       1  0 10:08 ?        00:00:00 /usr/sbin/cron -P
root         777       1  0 10:08 ?        00:00:00 nginx: master process /usr/sbin/nginx
ds          1055     714  0 10:09 ?        00:00:01 /var/www/onlyoffice/documentserver/server/DocService/docservice
ds          1067     714  0 10:09 ?        00:00:00 /var/www/onlyoffice/documentserver/server/FileConverter/converter
ds          1073    1067  0 10:09 ?        00:00:01 /var/www/onlyoffice/documentserver/server/FileConverter/converter /snapshot/server/FileConverter/sources/convertermaster.js
root        8084       1  0 10:09 pts/0    00:00:00 tail -f /var/log/onlyoffice/documentserver/converter/err.log /var/log/onlyoffice/documentserver/converter/out.log /var/log/onlyoffice/
www-data    8085     777  0 10:09 ?        00:00:00 nginx: worker process
root        8160       0  0 10:10 pts/1    00:00:00 bash
root        8173    8160  0 10:11 pts/1    00:00:00 ps -ef
root@afff68da3126:/# netstat -nap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      581/beam.smp        
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      310/postgres        
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      777/nginx: master p 
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      419/epmd            
tcp        0      0 127.0.0.1:4369          127.0.0.1:50424         ESTABLISHED 419/epmd            
tcp        0      0 127.0.0.1:53182         127.0.0.1:5672          ESTABLISHED 1073/converter      
tcp        0      0 127.0.0.1:53180         127.0.0.1:5672          ESTABLISHED 1055/docservice     
tcp        0      0 127.0.0.1:56204         127.0.0.1:4369          TIME_WAIT   -                   
tcp        0      0 127.0.0.1:53172         127.0.0.1:5672          ESTABLISHED 1055/docservice     
tcp        0      0 172.17.0.2:4369         172.17.0.2:48616        TIME_WAIT   -                   
tcp        0      0 127.0.0.1:50424         127.0.0.1:4369          ESTABLISHED 581/beam.smp        
tcp6       0      0 ::1:5432                :::*                    LISTEN      310/postgres        
tcp6       0      0 :::80                   :::*                    LISTEN      777/nginx: master p 
tcp6       0      0 :::8000                 :::*                    LISTEN      1055/docservice     
tcp6       0      0 :::8126                 :::*                    LISTEN      727/metrics         
tcp6       0      0 :::5672                 :::*                    LISTEN      581/beam.smp        
tcp6       0      0 :::4369                 :::*                    LISTEN      419/epmd            
tcp6       0      0 127.0.0.1:5672          127.0.0.1:53172         ESTABLISHED 581/beam.smp        
tcp6       0      0 127.0.0.1:5672          127.0.0.1:53180         ESTABLISHED 581/beam.smp        
tcp6       0      0 127.0.0.1:5672          127.0.0.1:53182         ESTABLISHED 581/beam.smp        
udp        0      0 0.0.0.0:8125            0.0.0.0:*                           727/metrics         
udp6       0      0 ::1:53412               ::1:53412               ESTABLISHED 310/postgres        
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     47919698 310/postgres         /var/run/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     47945099 714/python3          /var/run/supervisor.sock.713
unix  3      [ ]         STREAM     CONNECTED     47942415 588/erl_child_setup  
unix  3      [ ]         STREAM     CONNECTED     47945385 1067/converter       
unix  3      [ ]         STREAM     CONNECTED     47962165 777/nginx: master p  
unix  3      [ ]         STREAM     CONNECTED     47962166 777/nginx: master p  
unix  3      [ ]         STREAM     CONNECTED     47945386 1073/converter       
unix  3      [ ]         STREAM     CONNECTED     47942414 581/beam.smp         
root@afff68da3126:/# curl localhost
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
root@afff68da3126:/#

But why the onlyoffice service in compose doesn't work?

liudonghua123 commented 3 months ago

I tried to remove the volumes and it works now for me. Why❓

    volumes:
      - ./onlyoffice:/var