Docker-CommunityServer: Community Server does not start correctly ?
Hi,
I have just started playing with onlyoffice because I would like to test it in docker environments before buying a licence.
It seems I can not really start the community edition container since it does not serve the WebUI.
Context:
- I am running the Docker installation with simply mysql + community edition.
- Docker Version 18.06.1-ce
- MacBook Pro 2018; 16 Gb RAM; 2,2 GHz Intel Core i7
I did follow step by step the docker setup (network creation, mysql start and community edition start) without adding or changing any environmental variables.
First I noticed that community edition container always take a while to start (around 6-8 minutes) because of the several mysql updates. But at the end, it reaches the tail -f /dev/null and the container just waits (what it suppose to do due to the run-community-server.sh). Find below the logs -f:
+ '[' -f /var/www/onlyoffice/Data/certs/onlyoffice.crt -a -f /var/www/onlyoffice/Data/certs/onlyoffice.key ']'
+ cp /etc/nginx/includes/onlyoffice-communityserver-common.conf.template /app/onlyoffice/config/nginx/prepare-onlyoffice
+ sed -i 1d /etc/logrotate.d/nginx
+ sed '1 i\/var/log/nginx/*.log /var/log/onlyoffice/nginx.*.log {' -i /etc/logrotate.d/nginx
+ '[' 192.168.80.3/20 ']'
+ sed 's,{{DOCKER_ONLYOFFICE_SUBNET}},192.168.80.3/20,' -i /app/onlyoffice/config/nginx/prepare-onlyoffice
+ '[' ']'
+ echo Start=No
+ grep -q 'name="textindex"' /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.Config
+ '[' false == true ']'
+ '[' false == true ']'
+ '[' false == true ']'
+ '[' SERVER == SERVER ']'
++ seq 1 1
+ for serverID in '$(seq 1 ${ONLYOFFICE_MONOSERVE_COUNT})'
+ '[' 1 == 1 ']'
+ sed '/web.warmup.count/s/value=\"\S*\"/value=\"1\"/g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/web.warmup.domain/s/value=\"\S*\"/value=\"localhost\/warmup\"/g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/core.machinekey/s!value=".*"!value="Vskoproizvolny Salt par Chivreski"!g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/core.machinekey/s!value=".*"!value="Vskoproizvolny Salt par Chivreski"!g' -i /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/core.machinekey/s!value=".*"!value="Vskoproizvolny Salt par Chivreski"!g' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.Config
+ sed '/core\.machinekey/s!"core\.machinekey".*!"core\.machinekey":"Vskoproizvolny Salt par Chivreski",!' -i /var/www/onlyoffice/Services/ASC.Socket.IO/config/config.json
+ sed '/core.machinekey/s!value=".*"!value="Vskoproizvolny Salt par Chivreski"!g' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ sed '/core.machinekey/s!value=".*"!value="Vskoproizvolny Salt par Chivreski"!g' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ continue
+ sed 's/{{ONLYOFFICE_NIGNX_KEEPLIVE}}/32/g' -i /app/onlyoffice/config/nginx/prepare-onlyoffice
+ bash -c 'echo "onlyoffice ALL=(ALL) NOPASSWD: /usr/sbin/service" | (EDITOR="tee -a" visudo)'
onlyoffice ALL=(ALL) NOPASSWD: /usr/sbin/service
+ '[' false == true ']'
+ service redis-server start
redis-server: unrecognized service
+ '[' true == true ']'
+ rm -f /etc/god/conf.d/mysql.god
+ '[' SERVER == SERVICES ']'
+ '[' DEBUG ']'
+ echo 'fix docker bug volume mapping for onlyoffice'
fix docker bug volume mapping for onlyoffice
+ chown -R onlyoffice:onlyoffice /var/log/onlyoffice
+ chown -R onlyoffice:onlyoffice /var/www/onlyoffice/DocumentServerData
++ ls -alhd /var/www/onlyoffice/Data
++ awk '{ print $3 }'
+ '[' onlyoffice '!=' onlyoffice ']'
++ seq 1 1
+ for serverID in '$(seq 1 ${ONLYOFFICE_MONOSERVE_COUNT})'
+ index=1
+ '[' 1 == 1 ']'
+ index=
+ service monoserve restart
Starting monoserve... OK
+ service monoserveApiSystem restart
Starting monoserveApiSystem... OK
+ '[' false == true ']'
+ service onlyofficeSocketIO restart
Starting onlyofficeSocketIO... OK
+ service onlyofficeFeed restart
Starting onlyofficeFeed... OK
+ service onlyofficeIndex restart
Starting onlyofficeIndex... OK
+ service onlyofficeJabber restart
Starting onlyofficeJabber... OK
+ service onlyofficeMailAggregator restart
Starting onlyofficeMailAggregator... OK
+ service onlyofficeMailWatchdog restart
Starting onlyofficeMailWatchdog... OK
+ service onlyofficeNotify restart
Starting onlyofficeNotify... OK
+ service onlyofficeBackup restart
Starting onlyofficeBackup... OK
+ service onlyofficeAutoreply stop
onlyofficeAutoreply is not running
+ service onlyofficeHealthCheck stop
onlyofficeHealthCheck: unrecognized service
+ service god restart
Restarting god... The server is not available (or you do not have permissions to access it)
OK
+ '[' SERVER == SERVER ']'
+ mv /app/onlyoffice/config/nginx/prepare-onlyoffice /etc/nginx/sites-enabled/onlyoffice
+ service nginx reload
* Reloading nginx nginx [ OK ]
+ log_debug 'reload nginx config'
+ echo 'onlyoffice: [Debug] reload nginx config'
onlyoffice: [Debug] reload nginx config
+ log_debug FINISH
+ echo 'onlyoffice: [Debug] FINISH'
onlyoffice: [Debug] FINISH
++ ps auxf
++ grep cron
++ awk '{print $2}'
++ grep -v grep
+ PID=
+ '[' -n '' ']'
+ cron
+ '[' true == true ']'
+ exec tail -f /dev/null
Notice that some serviced have not been restarted, for instance onlyofficeHealthCheck, god. I do not know the impact of this in the container start.
On the other hand, meanwhile the community container runs it is possible to visit the WebUI atlocalhost:80, but I receive 502 in loop due to a HTTP GET /api/2.0/capabilities.json
head -n10 /var/log/nginx/access.log
192.168.48.1 - - [16/Sep/2018:11:40:24 +0000] "GET /api/2.0/capabilities.json HTTP/1.1" 502 173 "http://localhost/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13;
rv:62.0) Gecko/20100101 Firefox/62.0" "-"
192.168.48.1 - - [16/Sep/2018:11:40:29 +0000] "GET /api/2.0/capabilities.json HTTP/1.1" 502 173 "http://localhost/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13;
rv:62.0) Gecko/20100101 Firefox/62.0" "-"
I have checked the nginx error logs:
head -n10 /var/log/nginx/error.log
2018/09/16 11:40:23 [alert] 59#59: worker process 65 exited on signal 9
2018/09/16 11:40:24 [crit] 100#100: *1 connect() to unix:/var/run/onlyoffice/onlyoffice.socket failed (2: No such file or directory) while connecting to upstream,
client: 192.168.48.1, server: , request: "GET /api/2.0/capabilities.json HTTP/1.1", upstream: "fastcgi://unix:/var/run/onlyoffice/onlyoffice.socket:", host: "loc
alhost", referrer: "http://localhost/"
2018/09/16 11:40:25 [alert] 59#59: worker process 100 exited on signal 9
2018/09/16 11:40:25 [alert] 59#59: worker process 66 exited on signal 9
In addition, these calls stop in the very moment the community server container stalls in exec tail -f /dev/null.
I am not sure yet of what is going on under the hoods, but it can be a great help to start the service to really understand =]
Any ideas on how I can continue and avoid this issue? Thank you !
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 38 (12 by maintainers)
Ok. Thanks to your technical support, it seemed that in my case the problem was due to the server not having enough memory. By adding a swap file, it works now! But I’ll move it to a server with more real memory ASAP.
Thank you very much.