Documentserver: `/var/log/onlyoffice/documentserver/nginx.error.log` spams with crit errors

Created on 28 Jun 2017  路  6Comments  路  Source: ONLYOFFICE/DocumentServer

  1. Run latest docker image docker run -itd -p 80:80 onlyoffice/documentserver-integration:4.3.6.2
  2. Start test example docker exec $(docker ps -q) supervisorctl start onlyoffice-documentserver:example
  3. Open any example files
  4. Execute docker exec $(docker ps -q) cat /var/log/onlyoffice/documentserver/nginx.error.log

Result:
A lot of crit warnings in this file.

2017/06/28 08:53:55 [crit] 417#0: *1 connect() to [::1]:8000 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /2017-06-27-18-13/doc/-247428085/c/info?t=1498640035036 HTTP/1.1", upstream: "http://[::1]:8000/2017-06-27-18-13/doc/-247428085/c/info?t=1498640035036", host: "localhost", referrer: "http://localhost/2017-06-27-18-13/web-apps/apps/documenteditor/main/index.html?_dc=2017-06-27-18-13&lang=en&customer=ONLYOFFICE&frameEditorId=iframeEditor"
2017/06/28 08:54:18 [crit] 417#0: *1 connect() to [::1]:8000 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /2017-06-27-18-13/doc/-247428085/c/info?t=1498640058036 HTTP/1.1", upstream: "http://[::1]:8000/2017-06-27-18-13/doc/-247428085/c/info?t=1498640058036", host: "localhost", referrer: "http://localhost/2017-06-27-18-13/web-apps/apps/documenteditor/main/index.html?_dc=2017-06-27-18-13&lang=en&customer=ONLYOFFICE&frameEditorId=iframeEditor"
2017/06/28 08:54:23 [crit] 417#0: *1 connect() to [::1]:3000 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /example/stylesheets/jquery-ui.css HTTP/1.1", upstream: "http://[::1]:3000/stylesheets/jquery-ui.css", host: "localhost", referrer: "http://localhost/example/"
2017/06/28 08:54:27 [crit] 417#0: *79 connect() to [::1]:8080 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /2017-06-09-09-09/spellchecker/doc/1251287954/c/795/ugaxn1zr/websocket HTTP/1.1", upstream: "http://[::1]:8080/doc/1251287954/c/795/ugaxn1zr/websocket", host: "localhost"
2017/06/28 08:54:40 [crit] 417#0: *1 connect() to [::1]:8000 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /2017-06-27-18-13/doc/-247428085/c/info?t=1498640080036 HTTP/1.1", upstream: "http://[::1]:8000/2017-06-27-18-13/doc/-247428085/c/info?t=1498640080036", host: "localhost", referrer: "http://localhost/2017-06-27-18-13/web-apps/apps/documenteditor/main/index.html?_dc=2017-06-27-18-13&lang=en&customer=ONLYOFFICE&frameEditorId=iframeEditor"

But everything seems working fine

bug

Most helpful comment

@ShockwaveNN Sorry, I should have it tested before answering.
I'm using a named network to deal with this:
docker network create --ipv6 --subnet fe80:1113:1719::/64 --gateway fe80:1113:1719::1 onlyoffice_net
The container is started with this:
docker run -itd -p 80:80 --network onlyoffice_net --name documentserver onlyoffice/documentserver-integration:4.3.6.2

All 6 comments

This is not a bug. It is caused by the nginx trying to connect to the server by using the IPv6 address of localhost. And the container is started without IPv6 by default. You can try starting the docker daemon with the --ipv6 switch.

BTW: If you started the documentserver by using docker-compose. You could try this.

@acui seems running docker with --ipv6 is not enough
I started dockerd on my ubuntu 17.04 like this:
sudo dockerd --ipv6
and get bridge errors like this
Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
I think I should specify custom --bip command for this, but not quite sure how safe it is (I'm not very good in ipv6 :(

@ShockwaveNN , you should not add the switch to dockerd
It's to be added to container command line like:
docker run -itd --ipv6 -p 80:80 --name documentserver onlyoffice/documentserver-integration:4.3.6.2
You could verify the ipv6 is working by run
docker exec -it documentserver ip address
And see the inet6 ::1/128 line:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

@acui Hm, according to docker run --help there is no --ipv6 flag for docker run and cause unknown flag: --ipv6
This is flag for dockerd

@ShockwaveNN Sorry, I should have it tested before answering.
I'm using a named network to deal with this:
docker network create --ipv6 --subnet fe80:1113:1719::/64 --gateway fe80:1113:1719::1 onlyoffice_net
The container is started with this:
docker run -itd -p 80:80 --network onlyoffice_net --name documentserver onlyoffice/documentserver-integration:4.3.6.2

@acui Yeah, thank you very much. After creating network
docker exec $(docker ps -q) cat /var/log/onlyoffice/documentserver/nginx.error.log
show empty log

Was this page helpful?
0 / 5 - 0 ratings