[GH-ISSUE #92] RabbitMQ fails to start, permission issue? #49

Closed
opened 2026-02-26 09:35:34 +03:00 by kerem · 62 comments
Owner

Originally created by @poVoq on GitHub (Apr 2, 2018).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92

Originally assigned to: @agolybev on GitHub.

Hi,
I am trying to install the OO document server via docker (specifically through portainer with a traefik reverse proxy, but I don't think it matters for this problem). I am using the latest Docker image (5.1.0.115 as of writing this).

My problem is that the the RabbitMQ server seems to not (re-)start properly.
Initially everything seems to go well, but then it tries to restart rabbitmq and fails:

* Starting PostgreSQL 9.5 database server
  ...done.
* Starting RabbitMQ Messaging Server rabbitmq-server
  ...done.
Starting redis-server: redis-server.
Starting supervisor: supervisord.
* Starting nginx nginx
  ...done.
Generating AllFonts.js, please wait...Done
onlyoffice-documentserver:docservice: stopped
onlyoffice-documentserver:docservice: started
onlyoffice-documentserver:converter: stopped
onlyoffice-documentserver:converter: started
* Reloading nginx configuration nginx
  ...done.
* Starting PostgreSQL 9.5 database server
  ...done.
* Starting RabbitMQ Messaging Server rabbitmq-server
* FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
  ...fail!
Starting redis-server: redis-server.
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

The /var/log/rabbitmq/startup_err then has the following error:
mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied

If I then create a specific volume for it pointing to "/var/run/rabbitmq" the general log stops with:
* Starting RabbitMQ Messaging Server rabbitmq-server

And I get the following error in the /var/log/rabbitmq/startup_err log file:
/usr/lib/rabbitmq/bin/rabbitmq-server: 42: /usr/lib/rabbitmq/bin/rabbitmq-server: cannot create /var/run/rabbitmq/pid: Permission denied

Any idea what could be causing this? It seems strange that it starts up the first time fine according to the logs?

Thanks for the help.

Originally created by @poVoq on GitHub (Apr 2, 2018). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92 Originally assigned to: @agolybev on GitHub. Hi, I am trying to install the OO document server via docker (specifically through portainer with a traefik reverse proxy, but I don't think it matters for this problem). I am using the latest Docker image (5.1.0.115 as of writing this). My problem is that the the RabbitMQ server seems to not (re-)start properly. Initially everything seems to go well, but then it tries to restart rabbitmq and fails: ``` * Starting PostgreSQL 9.5 database server ...done. * Starting RabbitMQ Messaging Server rabbitmq-server ...done. Starting redis-server: redis-server. Starting supervisor: supervisord. * Starting nginx nginx ...done. Generating AllFonts.js, please wait...Done onlyoffice-documentserver:docservice: stopped onlyoffice-documentserver:docservice: started onlyoffice-documentserver:converter: stopped onlyoffice-documentserver:converter: started * Reloading nginx configuration nginx ...done. * Starting PostgreSQL 9.5 database server ...done. * Starting RabbitMQ Messaging Server rabbitmq-server * FAILED - check /var/log/rabbitmq/startup_\{log, _err\} ...fail! Starting redis-server: redis-server. 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 ``` The /var/log/rabbitmq/startup_err then has the following error: `mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied` If I then create a specific volume for it pointing to "/var/run/rabbitmq" the general log stops with: ` * Starting RabbitMQ Messaging Server rabbitmq-server` And I get the following error in the /var/log/rabbitmq/startup_err log file: `/usr/lib/rabbitmq/bin/rabbitmq-server: 42: /usr/lib/rabbitmq/bin/rabbitmq-server: cannot create /var/run/rabbitmq/pid: Permission denied` Any idea what could be causing this? It seems strange that it starts up the first time fine according to the logs? Thanks for the help.
kerem 2026-02-26 09:35:34 +03:00
Author
Owner

@ShockwaveNN commented on GitHub (Apr 3, 2018):

but then it tries to restart rabbitmq and fails:

But why it try to restart rabbitmq server in first place?
Normal docker start process looks like this:

 * Starting PostgreSQL 9.5 database server                                                                                                                [ OK ] 
 * Starting RabbitMQ Messaging Server rabbitmq-server                                                                                                     [ OK ] 
Starting redis-server: redis-server.
Starting supervisor: supervisord.
 * Starting nginx nginx                                                                                                                                   [ OK ] 
Generating AllFonts.js, please wait...Done
onlyoffice-documentserver:docservice: stopped
onlyoffice-documentserver:docservice: started
onlyoffice-documentserver:converter: stopped
onlyoffice-documentserver:converter: started
 * Reloading nginx configuration nginx 
<!-- gh-comment-id:378164499 --> @ShockwaveNN commented on GitHub (Apr 3, 2018): > but then it tries to restart rabbitmq and fails: But why it try to restart rabbitmq server in first place? Normal docker start process looks like this: ``` * Starting PostgreSQL 9.5 database server [ OK ] * Starting RabbitMQ Messaging Server rabbitmq-server [ OK ] Starting redis-server: redis-server. Starting supervisor: supervisord. * Starting nginx nginx [ OK ] Generating AllFonts.js, please wait...Done onlyoffice-documentserver:docservice: stopped onlyoffice-documentserver:docservice: started onlyoffice-documentserver:converter: stopped onlyoffice-documentserver:converter: started * Reloading nginx configuration nginx ```
Author
Owner

@poVoq commented on GitHub (Apr 3, 2018):

Yeah, exactly my question :) There seems to be nothing that I am doing specifically that would cause that.

<!-- gh-comment-id:378178676 --> @poVoq commented on GitHub (Apr 3, 2018): Yeah, exactly my question :) There seems to be nothing that I am doing specifically that would cause that.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 3, 2018):

@poVoq How did you start container? Via portainer (of which I'm not familiar)

<!-- gh-comment-id:378178983 --> @ShockwaveNN commented on GitHub (Apr 3, 2018): @poVoq How did you start container? Via `portainer` (of which I'm not familiar)
Author
Owner

@poVoq commented on GitHub (Apr 3, 2018):

Yes, but Portainer is just a GUI for regular Docker commands. Hmm, but I could try again with a docker-compose file (as I need to pass certain labels to the Traefik reverse-proxy) and see if that makes a difference. Would be surprising though.

<!-- gh-comment-id:378179637 --> @poVoq commented on GitHub (Apr 3, 2018): Yes, but Portainer is just a GUI for regular Docker commands. Hmm, but I could try again with a docker-compose file (as I need to pass certain labels to the Traefik reverse-proxy) and see if that makes a difference. Would be surprising though.
Author
Owner

@agolybev commented on GitHub (Apr 3, 2018):

Hi @poVoq, You could find docker-compose project with traefik proxy and document server here.

<!-- gh-comment-id:378182555 --> @agolybev commented on GitHub (Apr 3, 2018): Hi @poVoq, You could find docker-compose project with traefik proxy and document server [here](https://github.com/ONLYOFFICE/document-server-proxy/blob/master/tests/traefik/minimal/docker-compose.yaml).
Author
Owner

@JustasStankunas commented on GitHub (Apr 3, 2018):

i am having same issue, with docker-compose..

  onlyoffice:
    container_name: onlyoffice
    image: onlyoffice/documentserver:latest
    restart: unless-stopped
    expose:
      - "443"
    volumes:
      - onlyoffice-data:/var/www/onlyoffice/Data
      - onlyoffice-log:/var/log/
<!-- gh-comment-id:378226298 --> @JustasStankunas commented on GitHub (Apr 3, 2018): i am having same issue, with docker-compose.. ``` onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver:latest restart: unless-stopped expose: - "443" volumes: - onlyoffice-data:/var/www/onlyoffice/Data - onlyoffice-log:/var/log/ ```
Author
Owner

@agolybev commented on GitHub (Apr 3, 2018):

Hi @JustasStankunas, could you provide entire 'docker-compose.yml' file?

<!-- gh-comment-id:378230123 --> @agolybev commented on GitHub (Apr 3, 2018): Hi @JustasStankunas, could you provide entire 'docker-compose.yml' file?
Author
Owner

@JustasStankunas commented on GitHub (Apr 3, 2018):

(removed sensitive data)

version: '3.4'

services:
  nextcloud-db:
    image: mariadb
    container_name: nextcloud-db
    restart: unless-stopped
    volumes:
      - nextcloud_db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=
    env_file:
      - nextcloud_db.env

  nextcloud-app:
    image: nextcloud:fpm
    container_name: nextcloud-app
    restart: unless-stopped
    volumes:
      - nextcloud_app:/var/www/html
    environment:
      - MYSQL_HOST=nextcloud-db
    env_file:
      - nextcloud_db.env
    depends_on:
      - nextcloud-db

  nextcloud-web:
    build: ./nextcloud-web
    container_name: nextcloud-web
    restart: unless-stopped
    volumes:
      - nextcloud_app:/var/www/html:ro
    environment:
      - VIRTUAL_HOST=
      - VIRTUAL_NETWORK=public_proxy-tier
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=
      - LETSENCRYPT_EMAIL=
    depends_on:
      - nextcloud-app
    networks:
      - proxy-tier
      - default

  onlyoffice:
    container_name: onlyoffice
    image: onlyoffice/documentserver:latest
    restart: unless-stopped
    expose:
      - "443"
    volumes:
      - onlyoffice-data:/var/www/onlyoffice/Data
      - onlyoffice-log:/var/log/

volumes:
  nextcloud_app:
  nextcloud_db:
  onlyoffice-data:
  onlyoffice-log:

networks:
  proxy-tier:
    external:
      name: public_proxy-tier

though not sure what could be causing this issue outside from its container..

<!-- gh-comment-id:378235570 --> @JustasStankunas commented on GitHub (Apr 3, 2018): (removed sensitive data) ``` version: '3.4' services: nextcloud-db: image: mariadb container_name: nextcloud-db restart: unless-stopped volumes: - nextcloud_db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD= env_file: - nextcloud_db.env nextcloud-app: image: nextcloud:fpm container_name: nextcloud-app restart: unless-stopped volumes: - nextcloud_app:/var/www/html environment: - MYSQL_HOST=nextcloud-db env_file: - nextcloud_db.env depends_on: - nextcloud-db nextcloud-web: build: ./nextcloud-web container_name: nextcloud-web restart: unless-stopped volumes: - nextcloud_app:/var/www/html:ro environment: - VIRTUAL_HOST= - VIRTUAL_NETWORK=public_proxy-tier - VIRTUAL_PORT=80 - LETSENCRYPT_HOST= - LETSENCRYPT_EMAIL= depends_on: - nextcloud-app networks: - proxy-tier - default onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver:latest restart: unless-stopped expose: - "443" volumes: - onlyoffice-data:/var/www/onlyoffice/Data - onlyoffice-log:/var/log/ volumes: nextcloud_app: nextcloud_db: onlyoffice-data: onlyoffice-log: networks: proxy-tier: external: name: public_proxy-tier ``` though not sure what could be causing this issue outside from its container..
Author
Owner

@agolybev commented on GitHub (Apr 3, 2018):

OK @JustasStankunas, I'll test it.

<!-- gh-comment-id:378239263 --> @agolybev commented on GitHub (Apr 3, 2018): OK @JustasStankunas, I'll test it.
Author
Owner

@JustasStankunas commented on GitHub (Apr 3, 2018):

@agolybev, by the way, nextcloud is working just fine. i am using it already for more then half a year. i just tried to add onlyoffice today.

<!-- gh-comment-id:378246496 --> @JustasStankunas commented on GitHub (Apr 3, 2018): @agolybev, by the way, nextcloud is working just fine. i am using it already for more then half a year. i just tried to add onlyoffice today.
Author
Owner

@agolybev commented on GitHub (Apr 3, 2018):

@JustasStankunas , unfortunally it work for me.
I've simplified your docker-compose.yml file to this:

version: '2.0'

services:
  onlyoffice:
    container_name: onlyoffice
    image: onlyoffice/documentserver:latest
    restart: unless-stopped
    expose:
      - "443"
    volumes:
      - onlyoffice-data:/var/www/onlyoffice/Data
      - onlyoffice-log:/var/log/

volumes:
  onlyoffice-data:
  onlyoffice-log:

networks:
  proxy-tier:
    external:
      name: public_proxy-tier

And documentserver ran successfully:

$ sudo docker-compose up
WARNING: Some networks were defined but are not used by any service: proxy-tier
Starting onlyoffice ... 
Starting onlyoffice ... done
Attaching to onlyoffice
onlyoffice    |  * Starting PostgreSQL 9.5 database server
onlyoffice    |    ...done.
onlyoffice    |  * Starting RabbitMQ Messaging Server rabbitmq-server
onlyoffice    |    ...done.
onlyoffice    | Starting redis-server: redis-server.
onlyoffice    | Starting supervisor: supervisord.
onlyoffice    |  * Starting nginx nginx
onlyoffice    |    ...done.
onlyoffice    | Generating AllFonts.js, please wait...Done
onlyoffice    | onlyoffice-documentserver:docservice: stopped
onlyoffice    | onlyoffice-documentserver:docservice: started
onlyoffice    | onlyoffice-documentserver:converter: stopped
onlyoffice    | onlyoffice-documentserver:converter: started
onlyoffice    |  * Reloading nginx configuration nginx
onlyoffice    |    ...done.

We'll watch for this issue.

<!-- gh-comment-id:378288506 --> @agolybev commented on GitHub (Apr 3, 2018): @JustasStankunas , unfortunally it work for me. I've simplified your `docker-compose.yml` file to this: ``` version: '2.0' services: onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver:latest restart: unless-stopped expose: - "443" volumes: - onlyoffice-data:/var/www/onlyoffice/Data - onlyoffice-log:/var/log/ volumes: onlyoffice-data: onlyoffice-log: networks: proxy-tier: external: name: public_proxy-tier ``` And documentserver ran successfully: ``` $ sudo docker-compose up WARNING: Some networks were defined but are not used by any service: proxy-tier Starting onlyoffice ... Starting onlyoffice ... done Attaching to onlyoffice onlyoffice | * Starting PostgreSQL 9.5 database server onlyoffice | ...done. onlyoffice | * Starting RabbitMQ Messaging Server rabbitmq-server onlyoffice | ...done. onlyoffice | Starting redis-server: redis-server. onlyoffice | Starting supervisor: supervisord. onlyoffice | * Starting nginx nginx onlyoffice | ...done. onlyoffice | Generating AllFonts.js, please wait...Done onlyoffice | onlyoffice-documentserver:docservice: stopped onlyoffice | onlyoffice-documentserver:docservice: started onlyoffice | onlyoffice-documentserver:converter: stopped onlyoffice | onlyoffice-documentserver:converter: started onlyoffice | * Reloading nginx configuration nginx onlyoffice | ...done. ``` We'll watch for this issue.
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

@agolybev. so it looks there are two different views.. in the attached mode it does not show up anything . but if checked logs it shows up these errors.

then i thought that maybe exposing ports instead of mapping them could be the issue, but changeing this part did not gave any affect.

i have tried running this container without docker-compose and it worked.
docker run -i -t -p 192.168.11.103:80:80 onlyoffice/documentserver

so it definitely looks like something with compose.. i have tried other versions and that resulted into just infinite loop of continues restarting (though now permissions issue).

<!-- gh-comment-id:378505829 --> @JustasStankunas commented on GitHub (Apr 4, 2018): @agolybev. so it looks there are two different views.. in the attached mode it does not show up anything . but if checked logs it shows up these errors. then i thought that maybe exposing ports instead of mapping them could be the issue, but changeing this part did not gave any affect. i have tried running this container without docker-compose and it worked. docker run -i -t -p 192.168.11.103:80:80 onlyoffice/documentserver so it definitely looks like something with compose.. i have tried other versions and that resulted into just infinite loop of continues restarting (though now permissions issue).
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas Try to check permission on host for onlyoffice-log:/var/log/, (or /var/www/onlyoffice/Data just in case), cause user onlyoffice inside container need write privilege to those dirs

Or run
docker run -i -t -p 192.168.11.103:80:80 -v onlyoffice-data:/var/www/onlyoffice/Data -v onlyoffice-log:/var/log/ onlyoffice/documentserver
and see if it working

<!-- gh-comment-id:378508070 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas Try to check permission on host for `onlyoffice-log:/var/log/`, (or `/var/www/onlyoffice/Data` just in case), cause user `onlyoffice` inside container need write privilege to those dirs Or run `docker run -i -t -p 192.168.11.103:80:80 -v onlyoffice-data:/var/www/onlyoffice/Data -v onlyoffice-log:/var/log/ onlyoffice/documentserver` and see if it working
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

@ShockwaveNN,

docker run -i -t -p 192.168.11.103:80:80 -v onlyoffice-data:/var/www/onlyoffice/Data -v onlyoffice-log:/var/log/ onlyoffice/documentserver
works just fine.

<!-- gh-comment-id:378510548 --> @JustasStankunas commented on GitHub (Apr 4, 2018): @ShockwaveNN, `docker run -i -t -p 192.168.11.103:80:80 -v onlyoffice-data:/var/www/onlyoffice/Data -v onlyoffice-log:/var/log/ onlyoffice/documentserver` works just fine.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas I'm not 100% sure of that, but seems this is still actual. https://github.com/moby/moby/issues/7198

<!-- gh-comment-id:378512880 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas I'm not 100% sure of that, but seems this is still actual. https://github.com/moby/moby/issues/7198
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

though looking now into volumes, it looks that running without docker-compose. this container creates more volumes, then with docker-compose.
for example running it with command:
docker run -i -t -p 192.168.11.103:80:80 -v onlyoffice-data:/var/www/onlyoffice/Data -v onlyoffice-log:/var/log/ onlyoffice/documentserver
i can see additional volumes for these dirs in addition what is defined above:

  • /etc/onlyoffice
  • /usr/share/fonts/truetype/custom
  • /var/lib/postgresql
  • /var/lib/onlyoffice
  • /var/log/onlyoffice
<!-- gh-comment-id:378513695 --> @JustasStankunas commented on GitHub (Apr 4, 2018): though looking now into volumes, it looks that running without docker-compose. this container creates more volumes, then with docker-compose. for example running it with command: `docker run -i -t -p 192.168.11.103:80:80 -v onlyoffice-data:/var/www/onlyoffice/Data -v onlyoffice-log:/var/log/ onlyoffice/documentserver` i can see additional volumes for these dirs in addition what is defined above: - /etc/onlyoffice - /usr/share/fonts/truetype/custom - /var/lib/postgresql - /var/lib/onlyoffice - /var/log/onlyoffice
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas Yeah, they mentioned in https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/README.md#storing-data but they are not required to mount
At least they are not empty inside container?

<!-- gh-comment-id:378514408 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas Yeah, they mentioned in https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/README.md#storing-data but they are not required to mount At least they are not empty inside container?
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

i must take back my comment about persistent volumes. it looks all to be ok..
and by the way if i run onlyoffice with compose it is working (i can open it via web browser) for very short amount of time - until it tries to restart itself.

<!-- gh-comment-id:378521671 --> @JustasStankunas commented on GitHub (Apr 4, 2018): i must take back my comment about persistent volumes. it looks all to be ok.. and by the way if i run onlyoffice with compose it is working (i can open it via web browser) for very short amount of time - until it tries to restart itself.
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas So if documentserver trying to restart itself it mean somewhere in logs (/var/log/onlyoffice) there is an error by which it try to restart

<!-- gh-comment-id:378525517 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas So if `documentserver` trying to restart itself it mean somewhere in logs (`/var/log/onlyoffice`) there is an error by which it try to restart
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

hmm. maybe they are more saying to you then me..

root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat converter/err.log
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat converter/out.log

[2018-04-04 09:26:05.771] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:05.779] [WARN] nodeJS - worker 628 started.
[2018-04-04 09:26:05.780] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:13.034] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:13.041] [WARN] nodeJS - worker 687 started.
[2018-04-04 09:26:13.041] [WARN] nodeJS - update cluster with 1 workers

root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat docservice/err.log
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat docservice/out.log

[2018-04-04 09:26:05.696] [WARN] nodeJS - Plugins watch exception (https://nodejs.org/docs/latest/api/fs.html#fs_availability).
[2018-04-04 09:26:05.709] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:05.719] [WARN] nodeJS - worker 618 started.
[2018-04-04 09:26:05.720] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:06.147] [WARN] nodeJS - Express server starting...
[2018-04-04 09:26:08.801] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode
[2018-04-04 09:26:11.690] [WARN] nodeJS - Plugins watch exception (https://nodejs.org/docs/latest/api/fs.html#fs_availability).
[2018-04-04 09:26:11.699] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:11.704] [WARN] nodeJS - worker 664 started.
[2018-04-04 09:26:11.705] [WARN] nodeJS - update cluster with 1 workers
[2018-04-04 09:26:12.105] [WARN] nodeJS - Express server starting...
[2018-04-04 09:26:12.486] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode

root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat gc/err.log
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat gc/out.log
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat metrics/err.log
(node:544) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat metrics/out.log

4 Apr 09:26:05 - [544] reading config file: ../../config/config.js
4 Apr 09:26:05 - server is up INFO

root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat nginx.error.log
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat spellchecker/err.log
root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat spellchecker/out.log

[2018-04-04 09:26:05.435] [WARN] nodeJS - start cluster with 1 workers
[2018-04-04 09:26:05.452] [WARN] nodeJS - worker 604 started.
[2018-04-04 09:26:06.028] [WARN] nodeJS - Express server starting...
[2018-04-04 09:26:06.081] [WARN] nodeJS - Express server listening on port 8080 in production-linux mode
<!-- gh-comment-id:378541169 --> @JustasStankunas commented on GitHub (Apr 4, 2018): hmm. maybe they are more saying to you then me.. root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **converter/err.log** root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **converter/out.log** ``` [2018-04-04 09:26:05.771] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:05.779] [WARN] nodeJS - worker 628 started. [2018-04-04 09:26:05.780] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:13.034] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:13.041] [WARN] nodeJS - worker 687 started. [2018-04-04 09:26:13.041] [WARN] nodeJS - update cluster with 1 workers ``` root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **docservice/err.log** root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **docservice/out.log** ``` [2018-04-04 09:26:05.696] [WARN] nodeJS - Plugins watch exception (https://nodejs.org/docs/latest/api/fs.html#fs_availability). [2018-04-04 09:26:05.709] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:05.719] [WARN] nodeJS - worker 618 started. [2018-04-04 09:26:05.720] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:06.147] [WARN] nodeJS - Express server starting... [2018-04-04 09:26:08.801] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode [2018-04-04 09:26:11.690] [WARN] nodeJS - Plugins watch exception (https://nodejs.org/docs/latest/api/fs.html#fs_availability). [2018-04-04 09:26:11.699] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:11.704] [WARN] nodeJS - worker 664 started. [2018-04-04 09:26:11.705] [WARN] nodeJS - update cluster with 1 workers [2018-04-04 09:26:12.105] [WARN] nodeJS - Express server starting... [2018-04-04 09:26:12.486] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode ``` root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **gc/err.log** root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **gc/out.log** root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **metrics/err.log** `(node:544) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.` root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **metrics/out.log** ``` 4 Apr 09:26:05 - [544] reading config file: ../../config/config.js 4 Apr 09:26:05 - server is up INFO ``` root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **nginx.error.log** root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **spellchecker/err.log** root@ca1b94d32e6c:/var/log/onlyoffice/documentserver# cat **spellchecker/out.log** ``` [2018-04-04 09:26:05.435] [WARN] nodeJS - start cluster with 1 workers [2018-04-04 09:26:05.452] [WARN] nodeJS - worker 604 started. [2018-04-04 09:26:06.028] [WARN] nodeJS - Express server starting... [2018-04-04 09:26:06.081] [WARN] nodeJS - Express server listening on port 8080 in production-linux mode ```
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas docservice/out.log seem weird, starting of workers should performed only once. But nevertheless I see no error :(
Ok, and what it RabbitMQ service log? (AFAIK log should be at default location)

<!-- gh-comment-id:378550427 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas `docservice/out.log` seem weird, starting of workers should performed only once. But nevertheless I see no error :( Ok, and what it RabbitMQ service log? (AFAIK log should be at default location)
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

here are RabbitMQ logs. (other are empty):
startup_err.log
rabbit@9606a2735689.log
rabbit@1555cc7c0c41.log
shutdown_log.log

interestingly there looks to be some old (from March) logs:

root@9606a2735689:/var/log/rabbitmq# ls -l
total 16
-rw-r--r-- 1 rabbitmq rabbitmq 2294 Mar 26 13:53 rabbit@1555cc7c0c41.log
-rw-r--r-- 1 rabbitmq rabbitmq    0 Mar 26 13:53 rabbit@1555cc7c0c41-sasl.log
-rw-r--r-- 1 rabbitmq rabbitmq 3123 Apr  4 10:59 rabbit@9606a2735689.log
-rw-r--r-- 1 rabbitmq rabbitmq    0 Apr  4 10:59 rabbit@9606a2735689-sasl.log
-rw-r--r-- 1 root     root        0 Mar 26 13:53 shutdown_err
-rw-r--r-- 1 root     root       50 Mar 26 13:53 shutdown_log
-rw-r--r-- 1 rabbitmq rabbitmq   74 Apr  4 10:59 startup_err
-rw-r--r-- 1 rabbitmq rabbitmq    0 Apr  4 10:59 startup_log
<!-- gh-comment-id:378564382 --> @JustasStankunas commented on GitHub (Apr 4, 2018): here are RabbitMQ logs. (other are empty): [startup_err.log](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/1875446/startup_err.log) [rabbit@9606a2735689.log](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/1875447/rabbit.9606a2735689.log) [rabbit@1555cc7c0c41.log](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/1875448/rabbit.1555cc7c0c41.log) [shutdown_log.log](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/1875449/shutdown_log.log) interestingly there looks to be some old (from March) logs: ``` root@9606a2735689:/var/log/rabbitmq# ls -l total 16 -rw-r--r-- 1 rabbitmq rabbitmq 2294 Mar 26 13:53 rabbit@1555cc7c0c41.log -rw-r--r-- 1 rabbitmq rabbitmq 0 Mar 26 13:53 rabbit@1555cc7c0c41-sasl.log -rw-r--r-- 1 rabbitmq rabbitmq 3123 Apr 4 10:59 rabbit@9606a2735689.log -rw-r--r-- 1 rabbitmq rabbitmq 0 Apr 4 10:59 rabbit@9606a2735689-sasl.log -rw-r--r-- 1 root root 0 Mar 26 13:53 shutdown_err -rw-r--r-- 1 root root 50 Mar 26 13:53 shutdown_log -rw-r--r-- 1 rabbitmq rabbitmq 74 Apr 4 10:59 startup_err -rw-r--r-- 1 rabbitmq rabbitmq 0 Apr 4 10:59 startup_log ```
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas Could you try this solution inside container and see if Rabbit restart works?
https://stackoverflow.com/a/9013572/820501
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/

<!-- gh-comment-id:378565501 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas Could you try this solution inside container and see if Rabbit restart works? https://stackoverflow.com/a/9013572/820501 `chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/`
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

@ShockwaveNN just tried that, restarted container and nothing changed.
i checked before doing this (since there are not a lot directories and files in this location) and everything were owned by rabbitmq:rabbitmq anyway..

just a curious question, can you replicate this issue on your end, or it is just on my end?

<!-- gh-comment-id:378572611 --> @JustasStankunas commented on GitHub (Apr 4, 2018): @ShockwaveNN just tried that, restarted container and nothing changed. i checked before doing this (since there are not a lot directories and files in this location) and everything were owned by rabbitmq:rabbitmq anyway.. just a curious question, can you replicate this issue on your end, or it is just on my end?
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas I tried simplified version from https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92#issuecomment-378288506 and everything seems fine for me too.
So we cannot replicate your issue on our end, sorry.
I've never seen any troubles with rabbit inside docker before.

<!-- gh-comment-id:378574395 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas I tried simplified version from https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92#issuecomment-378288506 and everything seems fine for me too. So we cannot replicate your issue on our end, sorry. I've never seen any troubles with rabbit inside docker before.
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

just tried creating new compose file but still same issue.. :( only thing i could think of now is different versions of docker compose and docker itself?

docker-compose version 1.20.1, build 5d8c71b
Docker version 18.03.0-ce, build 0520e24
<!-- gh-comment-id:378577804 --> @JustasStankunas commented on GitHub (Apr 4, 2018): just tried creating new compose file but still same issue.. :( only thing i could think of now is different versions of docker compose and docker itself? ``` docker-compose version 1.20.1, build 5d8c71b Docker version 18.03.0-ce, build 0520e24 ```
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas
Same here on Kubuntu 17.10
To be clear - simplified version from https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92#issuecomment-378288506 also give you Rabbit error?
If so I'm alsmost sure it is permission problem, try chmod -R 777 in all mounts (I know it's a bad practice and overkill but I have no better ideas :()

<!-- gh-comment-id:378583505 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas Same here on Kubuntu 17.10 To be clear - simplified version from https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92#issuecomment-378288506 also give you Rabbit error? If so I'm alsmost sure it is permission problem, try `chmod -R 777` in all mounts (I know it's a bad practice and overkill but I have no better ideas :()
Author
Owner

@JustasStankunas commented on GitHub (Apr 4, 2018):

@ShockwaveNN do you mean in docker itself chmod everything to 777 or on my host?

<!-- gh-comment-id:378601840 --> @JustasStankunas commented on GitHub (Apr 4, 2018): @ShockwaveNN do you mean in docker itself **chmod** everything to 777 or on my host?
Author
Owner

@ShockwaveNN commented on GitHub (Apr 4, 2018):

@JustasStankunas on host, but be carefull and have backups of all files just in case :)

<!-- gh-comment-id:378606208 --> @ShockwaveNN commented on GitHub (Apr 4, 2018): @JustasStankunas on host, but be carefull and have backups of all files just in case :)
Author
Owner

@thomass4t commented on GitHub (Apr 10, 2018):

Hello,
I had the same issue. I created the folder /var/run/rabbitmq manually within the container and made a chown rabbitmy:rabbitmy rabbitmy
Afterwards I stopped and restarted the container successfully.

Short addendum:
The issue seems to happen from time to time. When I start a container via plain docker, sometimes this error message shows up, sometimes not. Up to now I couldn't figure out the root cause.

<!-- gh-comment-id:380111185 --> @thomass4t commented on GitHub (Apr 10, 2018): Hello, I had the same issue. I created the folder /var/run/rabbitmq manually within the container and made a chown rabbitmy:rabbitmy rabbitmy Afterwards I stopped and restarted the container successfully. Short addendum: The issue seems to happen from time to time. When I start a container via plain docker, sometimes this error message shows up, sometimes not. Up to now I couldn't figure out the root cause.
Author
Owner

@JustasStankunas commented on GitHub (Apr 16, 2018):

@thomass4t this looks interesting. i checked what worked for you and in my case it looks little different. when ever i start fresh onlyoffice container and if i am quick enough i can see /var/run/rabbitmq and it is owned by rabbitmq. But when it restarts it self, this folder is gone, and then rabbitmq is not starting anymore. if i create it manually and chown it to rabbitmq:rabbitmq and restart container, same thing happens again.

<!-- gh-comment-id:381504896 --> @JustasStankunas commented on GitHub (Apr 16, 2018): @thomass4t this looks interesting. i checked what worked for you and in my case it looks little different. when ever i start fresh onlyoffice container and if i am quick enough i can see **/var/run/rabbitmq** and it is owned by rabbitmq. But when it restarts it self, this folder is gone, and then rabbitmq is not starting anymore. if i create it manually and **chown** it to **rabbitmq:rabbitmq** and restart container, same thing happens again.
Author
Owner

@thomass4t commented on GitHub (Apr 16, 2018):

Hello Justas,
yes... i can confirm this observation. When I restart the container the folder is gone and problem pops up again.

<!-- gh-comment-id:381510738 --> @thomass4t commented on GitHub (Apr 16, 2018): Hello Justas, yes... i can confirm this observation. When I restart the container the folder is gone and problem pops up again.
Author
Owner

@JustasStankunas commented on GitHub (Apr 16, 2018):

@thomass4t, i think i have just found the problem. it looks to be related to already logged issue #68 regards not being able to run onlyoffice without interactive shell. if adding stdin_open: true to docker-compose file (which corresponds to docker -i) problem is gone.

though now it is interesting that @ShockwaveNN @agolybev were able to run this container without stdin_open: true as it looks that docker-compose is starting container without interactive (at least for me).

<!-- gh-comment-id:381526263 --> @JustasStankunas commented on GitHub (Apr 16, 2018): @thomass4t, i think i have just found the problem. it looks to be related to already logged [issue #68]( https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/68) regards not being able to run onlyoffice without interactive shell. if adding **stdin_open: true** to docker-compose file (which corresponds to docker -i) problem is gone. though now it is interesting that @ShockwaveNN @agolybev were able to run this container without **stdin_open: true** as it looks that docker-compose is starting container without interactive (at least for me).
Author
Owner

@ShockwaveNN commented on GitHub (Apr 16, 2018):

@JustasStankunas yeap, thanks to https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/99 we run documentserver without interactive mode, but currently it's not properly tested, so there may be troubles.
But it current stable version stdin_open: true is present in our example docker-compose.yml, so you should use it too.

<!-- gh-comment-id:381528225 --> @ShockwaveNN commented on GitHub (Apr 16, 2018): @JustasStankunas yeap, thanks to https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/99 we run documentserver without interactive mode, but currently it's not properly tested, so there may be troubles. But it current stable version `stdin_open: true` is present in our example [docker-compose.yml](https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/docker-compose.yml), so you should use it too.
Author
Owner

@mhoffmann75 commented on GitHub (Apr 19, 2018):

I can confirm that stdin_open: true fixes the problem. Otherwise rabbitmq fails to create its directory /var/run/rabbitmq in non-interactive mode (docker-compose up -d) . Strange enough in interactive mode it works ...
So from my understanding stdin_open: true is enough to make it work interactive and non-interactive and you might close this issue.

<!-- gh-comment-id:382642359 --> @mhoffmann75 commented on GitHub (Apr 19, 2018): I can confirm that `stdin_open: true` fixes the problem. Otherwise rabbitmq fails to create its directory **/var/run/rabbitmq** in non-interactive mode (`docker-compose up -d`) . Strange enough in interactive mode it works ... So from my understanding `stdin_open: true` is enough to make it work interactive and non-interactive and you might close this issue.
Author
Owner

@poVoq commented on GitHub (Apr 19, 2018):

Thus to confirm, selecting interactive mode and TTY (-i -t) in Portainer when creating the container make it work for me as well. Thanks a lot for the help!

Edit: the strange thing is though that when I "restart" the container through Portainer it again exhibits the same error... but if I "recreate" it it works fine.

<!-- gh-comment-id:382684733 --> @poVoq commented on GitHub (Apr 19, 2018): Thus to confirm, selecting interactive mode and TTY (-i -t) in Portainer when creating the container make it work for me as well. Thanks a lot for the help! Edit: the strange thing is though that when I "restart" the container through Portainer it again exhibits the same error... but if I "recreate" it it works fine.
Author
Owner

@danielepercivaldi commented on GitHub (Apr 28, 2018):

I tested versions from 5.0.7.38 to 5.1.3.35.
The issue was injected in version 5.1.0.115.
In version 5.0.7.38 it works like a charm.
Starting fron version 5.1.0.115 you need restarting it twice in order to make RabbitMQ to start normally.

  1. The first time it cannot create its folder in /var/run due to denied permissions.
  2. The second time it works.

So, I think, something went wrong when version 5.1 was released and that this issue should be reopened.

<!-- gh-comment-id:385194665 --> @danielepercivaldi commented on GitHub (Apr 28, 2018): I tested versions from 5.0.7.38 to 5.1.3.35. The issue was injected in version 5.1.0.115. In version 5.0.7.38 it works like a charm. Starting fron version 5.1.0.115 you need restarting it twice in order to make RabbitMQ to start normally. 1. The first time it cannot create its folder in /var/run due to denied permissions. 2. The second time it works. So, I think, something went wrong when version 5.1 was released and that this issue should be reopened.
Author
Owner

@ShockwaveNN commented on GitHub (May 3, 2018):

@danielepercivaldi Hi, could you show exact parameters of your docker run command? I try to inspect this issue

<!-- gh-comment-id:386207266 --> @ShockwaveNN commented on GitHub (May 3, 2018): @danielepercivaldi Hi, could you show exact parameters of your `docker run` command? I try to inspect this issue
Author
Owner

@danielepercivaldi commented on GitHub (May 8, 2018):

Hi @ShockwaveNN .
Sorry for the delay.
Below what you requested:
docker run --restart=always -i -t -d -p 8081:80 --name onlyoffice --env-file ./onlyoffice.env onlyoffice/documentserver

onlyoffice.env:

JWT_ENABLED=true
JWT_SECRET=*************
JWT_HEADER=AuthorizationJwt

Thanks.

<!-- gh-comment-id:387517798 --> @danielepercivaldi commented on GitHub (May 8, 2018): Hi @ShockwaveNN . Sorry for the delay. Below what you requested: `docker run --restart=always -i -t -d -p 8081:80 --name onlyoffice --env-file ./onlyoffice.env onlyoffice/documentserver` onlyoffice.env: ``` JWT_ENABLED=true JWT_SECRET=************* JWT_HEADER=AuthorizationJwt ``` Thanks.
Author
Owner

@ShockwaveNN commented on GitHub (May 10, 2018):

@danielepercivaldi I see nothing wrong in running documentserver by your command.
I think trouble persist only if there some docker volumes mounts, but your command has none

<!-- gh-comment-id:387988703 --> @ShockwaveNN commented on GitHub (May 10, 2018): @danielepercivaldi I see nothing wrong in running documentserver by your command. I think trouble persist only if there some docker volumes mounts, but your command has none
Author
Owner

@danielepercivaldi commented on GitHub (May 10, 2018):

@ShockwaveNN Are you able to reproduce the issue?

<!-- gh-comment-id:387992137 --> @danielepercivaldi commented on GitHub (May 10, 2018): @ShockwaveNN Are you able to reproduce the issue?
Author
Owner

@ShockwaveNN commented on GitHub (May 10, 2018):

@danielepercivaldi No, I'm not able to reproduce issue.
RabbitMQ started normally via your command from first time on 5.1.0.115
Which docker and Host OS you are using? Maybe it somehow related.
Mine is
Ubuntu 18.04 LTS
Docker version 18.03.1-ce, build 9ee9f40

<!-- gh-comment-id:387995150 --> @ShockwaveNN commented on GitHub (May 10, 2018): @danielepercivaldi No, I'm not able to reproduce issue. RabbitMQ started normally via your command from first time on 5.1.0.115 Which docker and Host OS you are using? Maybe it somehow related. Mine is `Ubuntu 18.04 LTS` `Docker version 18.03.1-ce, build 9ee9f40`
Author
Owner

@danielepercivaldi commented on GitHub (May 10, 2018):

@ShockwaveNN Mine is
Ubuntu 16.04 LTS
Docker version 18.03.1-ce, build 9ee9f40

<!-- gh-comment-id:387996959 --> @danielepercivaldi commented on GitHub (May 10, 2018): @ShockwaveNN Mine is Ubuntu 16.04 LTS Docker version 18.03.1-ce, build 9ee9f40
Author
Owner

@ShockwaveNN commented on GitHub (May 10, 2018):

@danielepercivaldi so to make sure
you run
docker run --restart=always -i -t -d -p 8081:80 --name onlyoffice --env-file ./onlyoffice.env onlyoffice/documentserver:5.1.0.115
and have errors in starting RabbitMQ?

<!-- gh-comment-id:387999994 --> @ShockwaveNN commented on GitHub (May 10, 2018): @danielepercivaldi so to make sure you run `docker run --restart=always -i -t -d -p 8081:80 --name onlyoffice --env-file ./onlyoffice.env onlyoffice/documentserver:5.1.0.115` and have errors in starting RabbitMQ?
Author
Owner

@danielepercivaldi commented on GitHub (May 10, 2018):

@ShockwaveNN No.
Problem occurs when you "docker restart onlyoffice".
You need restarting it twice in order to make RabbitMQ start right.

<!-- gh-comment-id:388006682 --> @danielepercivaldi commented on GitHub (May 10, 2018): @ShockwaveNN No. Problem occurs when you "docker restart onlyoffice". You need restarting it twice in order to make RabbitMQ start right.
Author
Owner

@ShockwaveNN commented on GitHub (May 10, 2018):

@danielepercivaldi Oh, thanks. I can confirm, it's some bug.

Works fine:

docker run -itd --name onlyoffice onlyoffice/documentserver:5.0.7.38
sleep 1m # for init of services
docker restart onlyoffice
sleep 1m # for init of services
docker exec onlyoffice cat /var/log/rabbitmq/startup_err

out mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied :

docker run -itd --name onlyoffice onlyoffice/documentserver:5.1.0.115
sleep 1m # for init of services
docker restart onlyoffice
sleep 1m # for init of services
docker exec onlyoffice cat /var/log/rabbitmq/startup_err
<!-- gh-comment-id:388029406 --> @ShockwaveNN commented on GitHub (May 10, 2018): @danielepercivaldi Oh, thanks. I can confirm, it's some bug. Works fine: ``` docker run -itd --name onlyoffice onlyoffice/documentserver:5.0.7.38 sleep 1m # for init of services docker restart onlyoffice sleep 1m # for init of services docker exec onlyoffice cat /var/log/rabbitmq/startup_err ``` out `mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied` : ``` docker run -itd --name onlyoffice onlyoffice/documentserver:5.1.0.115 sleep 1m # for init of services docker restart onlyoffice sleep 1m # for init of services docker exec onlyoffice cat /var/log/rabbitmq/startup_err ```
Author
Owner

@ShockwaveNN commented on GitHub (May 11, 2018):

Just a note - problem seems actual for host with Ubuntu 16.04 and 18.04
Problem didn't reproduces on host with Ubuntu 14.04 (travis.ci latest image and DigitalOcean image) and Centos 7. Strange.

<!-- gh-comment-id:388295639 --> @ShockwaveNN commented on GitHub (May 11, 2018): Just a note - problem seems actual for host with Ubuntu 16.04 and 18.04 Problem didn't reproduces on host with Ubuntu 14.04 (travis.ci latest image and DigitalOcean image) and Centos 7. Strange.
Author
Owner

@DrRSatzteil commented on GitHub (May 25, 2018):

I also had the same problem on Ubuntu 17.10. And it is still there after the 18.04 update.

<!-- gh-comment-id:391954742 --> @DrRSatzteil commented on GitHub (May 25, 2018): I also had the same problem on Ubuntu 17.10. And it is still there after the 18.04 update.
Author
Owner

@Nine-Tailed commented on GitHub (May 25, 2018):

Similar error in virtualbox with ubuntu 16.04.
docker run -dit -p 88:80 --restart always --name oods onlyoffice/documentserver

<!-- gh-comment-id:392205551 --> @Nine-Tailed commented on GitHub (May 25, 2018): Similar error in virtualbox with ubuntu 16.04. `docker run -dit -p 88:80 --restart always --name oods onlyoffice/documentserver`
Author
Owner

@Daniel-Beardsmore commented on GitHub (Jun 25, 2018):

What would you change in hostconfig.json and config.v2.json to apply this setting?

<!-- gh-comment-id:399913620 --> @Daniel-Beardsmore commented on GitHub (Jun 25, 2018): What would you change in hostconfig.json and config.v2.json to apply this setting?
Author
Owner

@ShockwaveNN commented on GitHub (Jun 26, 2018):

@Daniel-Beardsmore sorry, can you explain in more details?

<!-- gh-comment-id:400233594 --> @ShockwaveNN commented on GitHub (Jun 26, 2018): @Daniel-Beardsmore sorry, can you explain in more details?
Author
Owner

@Daniel-Beardsmore commented on GitHub (Jun 26, 2018):

"stdin_open: true" only works if you have docker-compose.yml. What do you add instead into hostconfig.json and config.v2.json to apply the same change afterwards to a container that demonstrates this fault?

<!-- gh-comment-id:400236764 --> @Daniel-Beardsmore commented on GitHub (Jun 26, 2018): "stdin_open: true" only works if you have docker-compose.yml. What do you add instead into hostconfig.json and config.v2.json to apply the same change afterwards to a container that demonstrates this fault?
Author
Owner

@ShockwaveNN commented on GitHub (Jun 26, 2018):

@Daniel-Beardsmore next stable version of Docker-Documentserver (5.2) will not require stdin_open: true
Since https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/99/files
Son I don't think we should discuss it if I understand you correctly

<!-- gh-comment-id:400237858 --> @ShockwaveNN commented on GitHub (Jun 26, 2018): @Daniel-Beardsmore next stable version of Docker-Documentserver (5.2) will not require `stdin_open: true` Since https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/99/files Son I don't think we should discuss it if I understand you correctly
Author
Owner

@danielepercivaldi commented on GitHub (Jul 1, 2018):

@agolybev @ShockwaveNN Any news? Need waiting for V.5.2?
Thanks.

<!-- gh-comment-id:401597201 --> @danielepercivaldi commented on GitHub (Jul 1, 2018): @agolybev @ShockwaveNN Any news? Need waiting for V.5.2? Thanks.
Author
Owner

@ShockwaveNN commented on GitHub (Jul 2, 2018):

@danielepercivaldi problem with mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied is still actual in 5.2. We post any updates here.

<!-- gh-comment-id:401698160 --> @ShockwaveNN commented on GitHub (Jul 2, 2018): @danielepercivaldi problem with `mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied` is still actual in 5.2. We post any updates here.
Author
Owner

@svalo commented on GitHub (Jul 17, 2018):

I was hit by this as well, running a docker exec <name-of-container> service rabbitmq-server restart makes rabbit start and onlyoffice work. It seems rabbit doesn't like the way docker handles the container restart.
I do not have any problem issuing docker stop <name-of-container> followed by docker start <name-of-container>.

If it's not possible to handle the way docker restarts a container would it be possible to insert a timeout in the 'wait_for_connection' function so it returns an error and the container exits?

In this way the container wouldn't wait indefinitely for rabbitmq and a 'restart unless-stopped' policy would restart the second time the container bringing it up.

If this solution isn't the way to go maybe issuing a restart of the rabbitmq-server service inside the container after a certain timeout in the 'wait_for_rabbitmq' function would be another option

thanks

<!-- gh-comment-id:405548147 --> @svalo commented on GitHub (Jul 17, 2018): I was hit by this as well, running a `docker exec <name-of-container> service rabbitmq-server restart` makes rabbit start and onlyoffice work. It seems rabbit doesn't like the way docker handles the container restart. I do not have any problem issuing `docker stop <name-of-container>` followed by `docker start <name-of-container>`. If it's not possible to handle the way docker restarts a container would it be possible to insert a timeout in the 'wait_for_connection' function so it returns an error and the container exits? In this way the container wouldn't wait indefinitely for rabbitmq and a 'restart unless-stopped' policy would restart the second time the container bringing it up. If this solution isn't the way to go maybe issuing a restart of the `rabbitmq-server` service inside the container after a certain timeout in the 'wait_for_rabbitmq' function would be another option thanks
Author
Owner

@unclegaara commented on GitHub (Jul 30, 2018):

I have the same issue with docker-compose version 1.22.0 on ubuntu 18.04

<!-- gh-comment-id:408890666 --> @unclegaara commented on GitHub (Jul 30, 2018): I have the same issue with docker-compose version 1.22.0 on ubuntu 18.04
Author
Owner

@pgera commented on GitHub (Oct 11, 2018):

Seeing this too with systemd. It doesn't come up on boot due to the error described in this thread. However, restarting the service makes it work on the second attempt

docker-compose file:

version: '3'

services:
  onlyoffice-document-server:
    container_name: onlyoffice-document-server
    image: onlyoffice/documentserver
    restart: always
    stdin_open: true
    tty: true
    ports:
      - 9980:80
    env_file:
      - onlyoffice.env

systemd file:

[Unit]
Description=%i service with docker compose
After=docker.service network-online.target
Requires=docker.service network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes

WorkingDirectory=/etc/docker/compose/%i

ExecStartPre=/usr/bin/docker-compose build --pull
ExecStart=/usr/bin/docker-compose up -d

ExecStop=/usr/bin/docker-compose down

ExecReload=/usr/bin/docker-compose pull --quiet
ExecReload=/usr/bin/docker-compose up -d

[Install]
WantedBy=multi-user.target
<!-- gh-comment-id:428911552 --> @pgera commented on GitHub (Oct 11, 2018): Seeing this too with systemd. It doesn't come up on boot due to the error described in this thread. However, restarting the service makes it work on the second attempt docker-compose file: ``` version: '3' services: onlyoffice-document-server: container_name: onlyoffice-document-server image: onlyoffice/documentserver restart: always stdin_open: true tty: true ports: - 9980:80 env_file: - onlyoffice.env ``` systemd file: ``` [Unit] Description=%i service with docker compose After=docker.service network-online.target Requires=docker.service network-online.target [Service] Type=oneshot RemainAfterExit=yes WorkingDirectory=/etc/docker/compose/%i ExecStartPre=/usr/bin/docker-compose build --pull ExecStart=/usr/bin/docker-compose up -d ExecStop=/usr/bin/docker-compose down ExecReload=/usr/bin/docker-compose pull --quiet ExecReload=/usr/bin/docker-compose up -d [Install] WantedBy=multi-user.target ```
Author
Owner

@snorre-k commented on GitHub (Oct 21, 2018):

The problem is related to the way, the container is stopped (only tested on Ubuntu).

On the first start, the directory /var/run/rabbitmq does not exist and is created by the Rabbitmq startup script (/etc/init.d/rabbitmq-server).

When stopping (on Ubuntu), there is no graceful shutdown of the container. Instead the container gets killed. You can test this with a huge stop timeout (e.g.: time docker stop -t 180 onlyoffice-document-server - this ends after 180 seconds with sending a kill -9 to the start process).

After this kill, the directory is left and this prevents the next start of Rabbitmq.

The directory /var/run/rabbitmq is removed by the Rabbitmq start script at the failing start.
Therefore the next (second) start goes well.

I have probably fixed this problem by deleting the directory in the Documentserver start script /app/onlyoffice/run-document-server.sh around line 301:

  if [ ${RABBITMQ_SERVER_HOST} != "localhost" ]; then
    update_rabbitmq_setting
  else
    LOCAL_SERVICES+=("rabbitmq-server")
    # allow Rabbitmq startup after container kill
    rm -rf /var/run/rabbitmq
  fi

With this little code a docker restart onlyoffice-document-server works every time. Also a restart of docker itself (systemctl restart docker.service) and a reboot of the host do work.

Maybe you could add this two lines to the container startup file.

<!-- gh-comment-id:431655508 --> @snorre-k commented on GitHub (Oct 21, 2018): The problem is related to the way, the container is stopped (only tested on Ubuntu). On the first start, the directory `/var/run/rabbitmq` does not exist and is created by the Rabbitmq startup script (`/etc/init.d/rabbitmq-server`). When stopping (on Ubuntu), there is no graceful shutdown of the container. Instead the container gets killed. You can test this with a huge stop timeout (e.g.: `time docker stop -t 180 onlyoffice-document-server` - this ends after 180 seconds with [sending a ](https://docs.docker.com/engine/reference/commandline/stop/)`kill -9` to the start process). After this kill, the directory is left and this prevents the next start of Rabbitmq. The directory `/var/run/rabbitmq` is removed by the Rabbitmq start script at the failing start. Therefore the next (second) start goes well. I have probably fixed this problem by deleting the directory in the Documentserver start script `/app/onlyoffice/run-document-server.sh` around line 301: ```bash if [ ${RABBITMQ_SERVER_HOST} != "localhost" ]; then update_rabbitmq_setting else LOCAL_SERVICES+=("rabbitmq-server") # allow Rabbitmq startup after container kill rm -rf /var/run/rabbitmq fi ``` With this little code a `docker restart onlyoffice-document-server` works every time. Also a restart of docker itself (`systemctl restart docker.service`) and a reboot of the host do work. Maybe you could add this two lines to the container startup file.
Author
Owner

@ShockwaveNN commented on GitHub (Oct 22, 2018):

@snorre-k Thank you for your investigation and fix, we added those lines at https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/131
And checked by

docker run -itd --name onlyoffice onlyoffice/4testing-documentserver-ie:5.2.3.49
sleep 1m # for init of services
docker restart onlyoffice
sleep 1m # for init of services
docker exec onlyoffice cat /var/log/rabbitmq/startup_err

Everything seems good, Rabbitmq starts correctly.
This will be released as 5.2.3 soon.

<!-- gh-comment-id:431815885 --> @ShockwaveNN commented on GitHub (Oct 22, 2018): @snorre-k Thank you for your investigation and fix, we added those lines at https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/131 And checked by ``` docker run -itd --name onlyoffice onlyoffice/4testing-documentserver-ie:5.2.3.49 sleep 1m # for init of services docker restart onlyoffice sleep 1m # for init of services docker exec onlyoffice cat /var/log/rabbitmq/startup_err ``` Everything seems good, Rabbitmq starts correctly. This will be released as 5.2.3 soon.
Author
Owner

@ShockwaveNN commented on GitHub (Oct 22, 2018):

@exodus3318 please create separate issue for your problem and describe your problem in more details

<!-- gh-comment-id:431815984 --> @ShockwaveNN commented on GitHub (Oct 22, 2018): @exodus3318 please create separate issue for your problem and describe your problem in more details
Author
Owner

@ShockwaveNN commented on GitHub (Oct 31, 2018):

DocumentServer 5.2.3.64 is released by now.
Issue should be fixed.

<!-- gh-comment-id:434672400 --> @ShockwaveNN commented on GitHub (Oct 31, 2018): DocumentServer 5.2.3.64 is released by now. Issue should be fixed.
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#49
No description provided.