ONLYOFFICE/Docker-CommunityServer

community server (deployed in k8s) web UI not reachable

jakoberpf opened this issue · 7 comments

Hello peoples,

in short I have troubles understanding the run-community-server.sh as I am unable to reach the web UI.

Context
I am currently trying the deploy the only office workspace on kubernetes, with a lift of the docker-compose deployment towards a helm chart.

Here is my current WIP for that, if of interest: Helm Chart

Problem
I have all the onlyoffice container deploys and a mysql instance running, which community-server is configured to use. As community-server was able to run all sql init scripts I assume that the database is working correctly:

(⎈ |erpf-athena-live:onlyoffice)➜  onlyoffice git:(main) ✗ kc get pods
NAME                                       READY   STATUS    RESTARTS       AGE
onlyoffice-community-bfd5fc8d5-5j86j       2/2     Running   0              21m
onlyoffice-controlpanel-6d897c5d99-bxfdj   2/2     Running   0              5d9h
onlyoffice-documents-7845754d9b-zz9zx      2/2     Running   0              5d9h
onlyoffice-mail-cf8d67b4f-msbx7            2/2     Running   0              5d9h
onlyoffice-mysql-0                         2/2     Running   0              42m
onlyoffice-nfs-server-provisioner-0        2/2     Running   1 (5d9h ago)   5d9h

But even though I don't see any errors in the logs of community-server I am unable to reach any kind of Web UI.

(⎈ |erpf-athena-live:onlyoffice)➜  onlyoffice git:(main) ✗ curl -vv http://localhost:60601/
*   Trying 127.0.0.1:60601...
* connect to 127.0.0.1 port 60601 failed: Connection refused
*   Trying ::1:60601...
* connect to ::1 port 60601 failed: Connection refused
* Failed to connect to localhost port 60601 after 4 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 60601 after 4 ms: Connection refused

I wasn't able to find anything in the run-community-server.sh what could tell me if I still have an issue. Or is there something in the nginx proxy, that would prevent me to reach the WebUI via simple localhost?

Any hints would be appreciated. Thanks...

community-server logs:

+ echo '##########################################################'
+ echo '#########  Start container configuration  ################'
##########################################################
#########  Start container configuration  ################
##########################################################
+ echo '##########################################################'
+ SERVER_HOST=
+ APP_DIR=/var/www/onlyoffice
+ APP_DATA_DIR=/var/www/onlyoffice/Data
+ APP_INDEX_DIR=/var/www/onlyoffice/Data/Index/v7.10.0
+ APP_PRIVATE_DATA_DIR=/var/www/onlyoffice/Data/.private
+ APP_SERVICES_DIR=/var/www/onlyoffice/Services
+ APP_CONFIG_DIR=/etc/onlyoffice/communityserver
+ APP_SQL_DIR=/var/www/onlyoffice/Sql
+ APP_ROOT_DIR=/var/www/onlyoffice/WebStudio
+ APP_APISYSTEM_DIR=/var/www/onlyoffice/ApiSystem
+ APP_GOD_DIR=/etc/god/conf.d
+ APP_MONOSERVER_PATH=/lib/systemd/system/monoserve.service
+ APP_HYPERFASTCGI_PATH=/etc/hyperfastcgi/onlyoffice
+ APP_MONOSERVE_COUNT=1
+ APP_MODE=SERVER
+ APP_CRON_DIR=/etc/cron.d
+ APP_CRON_PATH=/etc/cron.d/onlyoffice
+ LICENSE_FILE_PATH=/var/www/onlyoffice/DocumentServerData/license.lic
++ ip -o -f inet addr show
++ awk '/scope global/ {print $4}'
++ head -1
+ DOCKER_APP_SUBNET=10.233.86.230/32
++ ip addr show eth0
++ awk '/inet / {gsub(/\/.*/,"",$2); print $2}'
++ head -1
+ DOCKER_CONTAINER_IP=10.233.86.230
+ DOCKER_CONTAINER_NAME=onlyoffice-community-server
+ DOCKER_DOCUMENT_SERVER_CONTAINER_NAME=onlyoffice-document-server
+ DOCKER_ENABLED=true
+++ dirname /app/run-community-server.sh
++ cd /app
++ pwd
+ DIR=/app
+ NGINX_CONF_DIR=/etc/nginx/sites-enabled
++ cat /proc/cpuinfo
++ awk '{print $1}'
++ grep -i processor
++ wc -l
++ grep -i processor
+ CPU_PROCESSOR_COUNT=8
++ ulimit -n
+ NGINX_WORKER_CONNECTIONS=1048576
+ SERVICE_SSO_AUTH_HOST_ADDR=
++ sudo sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' /var/www/onlyoffice/WebStudio/web.appsettings.config
+ DEFAULT_APP_CORE_MACHINEKEY='Vskoproizvolny Salt par Chivreski'
+ IS_UPDATE=false
+ WORKSPACE_ENTERPRISE=false
+ '[' '!' -e /var/www/onlyoffice/Data/.private/machinekey ']'
+ mkdir -p /var/www/onlyoffice/Data/.private
+ APP_CORE_MACHINEKEY=core_secret
+ echo core_secret
++ sudo sed -n '/"version.release-date"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' /var/www/onlyoffice/WebStudio/web.appsettings.config
+ RELEASE_DATE=
++ CreateAuthToken '' core_secret
++ local pkey=
+++ echo -n core_secret
++ local machinekey=core_secret
++ local a=1
++ local LIMIT=10
++ '[' 1 -le 10 ']'
+++ date +%Y%m%d%H%M%S
++ local now=20220601161527
+++ echo -n -e '20220601161527\n'
+++ openssl dgst -sha1 -binary -mac HMAC -macopt key:core_secret
++ local 'authkey=�&��x���|ɂ��U|Tؙ�'
+++ echo -n '�&��x���|ɂ��U|Tؙ�'
+++ base64
++ authkey=Hugmou14y9rhfMmCv4ZVfFTYmdo=
++ local 'result=ASC :20220601161527:Hugmou14y9rhfMmCv4ZVfFTYmdo='
++ a=2
+++ grep ==
+++ echo '"ASC' ':20220601161527:Hugmou14y9rhfMmCv4ZVfFTYmdo="'
++ '[' -z '' ']'
++ echo 'ASC :20220601161527:Hugmou14y9rhfMmCv4ZVfFTYmdo='
++ exit 0
+ RELEASE_DATE_SIGN='ASC :20220601161527:Hugmou14y9rhfMmCv4ZVfFTYmdo='
+ sed -i '/version.release-date.sign/s!value="[^"]*"!value=\"ASC :20220601161527:Hugmou14y9rhfMmCv4ZVfFTYmdo=\"!g' /var/www/onlyoffice/WebStudio/web.appsettings.config
++ head -n 1 /var/www/onlyoffice/Data/.private/release_date
head: cannot open '/var/www/onlyoffice/Data/.private/release_date' for reading: No such file or directory
+ PREV_RELEASE_DATE=
+ '[' '' '!=' '' ']'
+ chmod -R 444 /var/www/onlyoffice/Data/.private
+ cat /proc/1/cgroup
+ grep -qE 'docker|lxc|kubepods|libpod'
+ DOCKER_ENABLED=true
+ '[' '!' -d /etc/nginx/sites-enabled ']'
+ '[' '!' -d /var/www/onlyoffice/DocumentServerData ']'
+ NGINX_ROOT_DIR=/etc/nginx
+ VALID_IP_ADDRESS_REGEX='^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
+ LOG_DEBUG=
+ LOG_DIR=/var/log/onlyoffice/
+ APP_HTTPS=false
+ SSL_CERTIFICATES_DIR=/var/www/onlyoffice/Data/certs
+ SSL_CERTIFICATE_PATH=/var/www/onlyoffice/Data/certs/onlyoffice.crt
+ SSL_KEY_PATH=/var/www/onlyoffice/Data/certs/onlyoffice.key
+ SSL_CERTIFICATE_PATH_PFX=/var/www/onlyoffice/Data/certs/onlyoffice.pfx
+ SSL_CERTIFICATE_PATH_PFX_PWD=onlyoffice
+ SSL_DHPARAM_PATH=/var/www/onlyoffice/Data/certs/dhparam.pem
+ SSL_VERIFY_CLIENT=off
+ SSL_OCSP_CERTIFICATE_PATH=/var/www/onlyoffice/Data/certs/stapling.trusted.crt
+ CA_CERTIFICATES_PATH=/var/www/onlyoffice/Data/certs/ca.crt
+ APP_HTTPS_HSTS_ENABLED=true
+ APP_HTTPS_HSTS_MAXAGE=63072000
+ SYSCONF_TEMPLATES_DIR=/app/config
+ mkdir -p /app/config/nginx
+ SYSCONF_TOOLS_DIR=/app/assets/tools
+ APP_SERVICES_INTERNAL_HOST=
+ APP_SERVICES_EXTERNAL=false
+ DOCUMENT_SERVER_ENABLED=false
+ DOCUMENT_SERVER_JWT_ENABLED=true
+ DOCUMENT_SERVER_JWT_SECRET=SNl5Wl+HgQPDqoTFH5SgfnWPZqXkycx6yexQXDBffij4vAfgPZlW9lSE0+5XQ9oP
+ DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt
+ DOCUMENT_SERVER_HOST=
+ DOCUMENT_SERVER_PROTOCOL=http
+ DOCUMENT_SERVER_API_URL=
+ DOCUMENT_SERVER_HOST_IP=
+ CONTROL_PANEL_ENABLED=false
+ MAIL_SERVER_ENABLED=false
+ MYSQL_SERVER_ROOT_PASSWORD=CufxGnnQSrf9krmO1bkLgpuHEiibY8lkbaiBEt4huH9ZoAok
+ MYSQL_SERVER_HOST=onlyoffice-mysql
+ MYSQL_SERVER_PORT=3306
+ MYSQL_SERVER_DB_NAME=onlyoffice
+ MYSQL_SERVER_USER=onlyoffice_user
+ MYSQL_SERVER_PASS=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z
+ MYSQL_SERVER_EXTERNAL=false
+ mkdir -p /var/www/onlyoffice/Data/certs/.well-known/acme-challenge
+ '[' 10.233.86.230/32 ']'
++ normalize_subnet 10.233.86.230/32
++ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
++ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
+++ echo 10.233.86.230/32
+++ sed -ne 's:^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)/.*$:\1 \2 \3 \4:p'
++ local IP
++ MASK=($(echo "$1" | sed -ne 's:^[^/]*/'"$IPRE"'$:\1 \2 \3 \4:p'))
+++ echo 10.233.86.230/32
+++ sed -ne 's:^[^/]*/\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$:\1 \2 \3 \4:p'
++ local MASK
++ '[' 0 -ne 4 ']'
++ BITCNT=($(echo "$1" | sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'))
+++ echo 10.233.86.230/32
+++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ local BITCNT
++ BITCNT=4294967295
++ (( I=0 ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++  ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++  ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++  ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++  ))
++ (( I<4 ))
++ NETWORK=()
++ local NETWORK
++ (( I=0 ))
++ (( I<4 ))
++ NETWORK[$I]=10
++ (( I++  ))
++ (( I<4 ))
++ NETWORK[$I]=233
++ (( I++  ))
++ (( I<4 ))
++ NETWORK[$I]=86
++ (( I++  ))
++ (( I<4 ))
++ NETWORK[$I]=230
++ (( I++  ))
++ (( I<4 ))
+++ echo 10.233.86.230/32
+++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ local IP_MASK=32
++ echo 10.233.86.230/32
+ DOCKER_APP_SUBNET=10.233.86.230/32
+ check_partnerdata
+ PARTNER_DATA_FILE=/var/www/onlyoffice/Data/json-data.txt
+ '[' -f /var/www/onlyoffice/Data/json-data.txt ']'
+ re='^[0-9]+$'
+ [[ 1 =~ ^[0-9]+$ ]]
+ '[' '!' -f /proc/net/if_inet6 ']'
+ cp /etc/nginx/includes/onlyoffice-communityserver-nginx.conf.template /etc/nginx/nginx.conf
+ sed 's/^worker_processes.*/worker_processes 8;/' -i /etc/nginx/nginx.conf
+ sed 's/worker_connections.*/worker_connections 1048576;/' -i /etc/nginx/nginx.conf
+ cp /etc/nginx/includes/onlyoffice-communityserver-common-init.conf.template /etc/nginx/sites-enabled/onlyoffice
+ '[' -f /var/www/onlyoffice/Data/certs/onlyoffice.crt -a -f /var/www/onlyoffice/Data/certs/onlyoffice.key ']'
+ sed '/{{SSL_CERTIFICATE_PATH}}/d' -i /etc/nginx/sites-enabled/onlyoffice
+ sed '/{{SSL_KEY_PATH}}/d' -i /etc/nginx/sites-enabled/onlyoffice
+ sed '/listen\s*443/d' -i /etc/nginx/sites-enabled/onlyoffice
+ rm -f /etc/nginx/conf.d/default.conf
+ service nginx restart
 * Restarting nginx nginx
start-stop-daemon: warning: failed to kill 18622: No such process
   ...done.
++ free -m
++ head -n 1
++ grep -oP '\d+'
+ TOTAL_MEMORY=31356
+ MEMORY_REQUIREMENTS=12228
+ '[' 31356 -gt 12228 ']'
+ grep -q '[-]Xms1g' /etc/elasticsearch/jvm.options
+ sed -i s/-Xms1g/-Xms4g/ /etc/elasticsearch/jvm.options
+ grep -q '[-]Xmx1g' /etc/elasticsearch/jvm.options
+ sed -i s/-Xmx1g/-Xmx4g/ /etc/elasticsearch/jvm.options
+ '[' ']'
+ '[' ']'
+ '[' ']'
+ '[' false == true ']'
+ '[' true == true ']'
+ '[' '' == onlyoffice-document-server ']'
+ '[' onlyoffice-mysql '!=' localhost ']'
+ '[' onlyoffice-mysql '!=' 127.0.0.1 ']'
+ MYSQL_SERVER_EXTERNAL=true
+ '[' ']'
+ '[' ']'
+ MAIL_SERVER_API_PORT=8081
+ MAIL_SERVER_API_HOST=
+ MAIL_SERVER_DB_HOST=
+ MAIL_SERVER_DB_PORT=3306
+ MAIL_SERVER_DB_NAME=onlyoffice_mailserver
+ MAIL_SERVER_DB_USER=mail_admin
+ MAIL_SERVER_DB_PASS=Isadmin123
+ '[' ']'
++ date +%Y-%m-%dT%H:%M:%S
+ MAIL_IMAPSYNC_START_DATE=2022-06-01T16:15:28
+ sed 's_\(\"ImapSyncStartDate":\).*,_\1 "2022-06-01T16:15:28",_' -i /etc/onlyoffice/communityserver/mail.production.json
+ sed '/mail\.imap-sync-start-date/s/value="\S*"/value="2022-06-01T16:15:28"/g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ '[' ']'
+ REDIS_SERVER_HOST=
+ REDIS_SERVER_CACHEPORT=6379
+ REDIS_SERVER_PASSWORD=
+ REDIS_SERVER_SSL=false
+ REDIS_SERVER_DATABASE=0
+ REDIS_SERVER_CONNECT_TIMEOUT=5000
+ REDIS_SERVER_EXTERNAL=false
+ '[' ']'
+ '[' false == false ']'
+ '[' -e /etc/redis/redis.conf ']'
+ sed -i 's/bind .*/bind 127.0.0.1/g' /etc/redis/redis.conf
+ ELASTICSEARCH_SERVER_HOST=
+ ELASTICSEARCH_SERVER_HTTPPORT=9200
+ grep -q '<section name="elastic" type="ASC.ElasticSearch.Config.ElasticSection, ASC.ElasticSearch" />' /var/www/onlyoffice/WebStudio/Web.config
+ '[' ']'
+ '[' true == false ']'
+ service mysql stop
 * Stopping MySQL database server mysqld
+ systemctl disable mysql.service
   ...done.
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable mysql
+ mysql_check_connection
+ '[' ']'
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
+ sleep 1
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
+ sleep 1
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
+ sleep 1
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
+ sleep 1
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
+ sleep 1
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
+ sleep 1
+ mysqladmin ping -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z --silent
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
mysqld is alive
++ mysql_scalar_exec 'SELECT SCHEMA_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='\''onlyoffice'\''' opt_ignore_db_name
++ local queryResult=
++ '[' opt_ignore_db_name == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z -e 'SELECT SCHEMA_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='\''onlyoffice'\'''
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=onlyoffice
++ echo onlyoffice
+ DB_IS_EXIST=onlyoffice
++ mysql_scalar_exec 'SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='\''onlyoffice'\''' opt_ignore_db_name
++ local queryResult=
++ '[' opt_ignore_db_name == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z -e 'SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='\''onlyoffice'\'''
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=utf8
++ echo utf8
+ DB_CHARACTER_SET_NAME=utf8
++ mysql_scalar_exec 'SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='\''onlyoffice'\''' opt_ignore_db_name
++ local queryResult=
++ '[' opt_ignore_db_name == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z -e 'SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='\''onlyoffice'\'''
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=utf8_general_ci
++ echo utf8_general_ci
+ DB_COLLATION_NAME=utf8_general_ci
++ mysql_scalar_exec 'SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='\''onlyoffice'\'''
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z -D onlyoffice -e 'SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='\''onlyoffice'\'''
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=199
++ echo 199
+ DB_TABLES_COUNT=199
+ '[' -z onlyoffice ']'
+ '[' utf8 '!=' utf8 ']'
+ change_connections default /var/www/onlyoffice/WebStudio/web.connections.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/WebStudio/web.connections.config
+ change_connections teamlabsite /var/www/onlyoffice/WebStudio/web.connections.config
+ sed '/teamlabsite/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/WebStudio/web.connections.config
+ change_connections default /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ change_connections default /var/www/onlyoffice/Services/Jabber/ASC.Xmpp.Server.Launcher.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/Jabber/ASC.Xmpp.Server.Launcher.exe.config
+ change_connections default /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/ApiSystem/Web.config
+ sed 's!"host":.*,!"host":"onlyoffice-mysql",!' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed 's!"user":.*,!"user":"onlyoffice_user",!' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed 's!"password":.*,!"password":"ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z",!' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed 's!"database":.*!"database":"onlyoffice"!' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed -i 's/Server=.*/Server=onlyoffice-mysql;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;",/g' /etc/onlyoffice/communityserver/appsettings.production.json
+ '[' 199 -eq 0 ']'
+ '[' false == true ']'
+ mysql_scalar_exec 'DELETE FROM webstudio_settings WHERE id='\''5C699566-34B1-4714-AB52-0E82410CE4E5'\'';'
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql -P 3306 -u onlyoffice_user --password=ywntJa4iF7aJWa93gaN9Jf9PzglGYDdVS8GB6wQiPbPwsD6Z -D onlyoffice -e 'DELETE FROM webstudio_settings WHERE id='\''5C699566-34B1-4714-AB52-0E82410CE4E5'\'';'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo

+ '[' -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/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
+ '[' 10.233.86.230/32 ']'
+ sed 's,{{DOCKER_APP_SUBNET}},10.233.86.230/32,' -i /app/config/nginx/prepare-onlyoffice
+ '[' ']'
+ '[' true == true ']'
+ sed '/files\.docservice\.secret/s!\(value\s*=\s*\"\)[^\"]*\"!\1SNl5Wl+HgQPDqoTFH5SgfnWPZqXkycx6yexQXDBffij4vAfgPZlW9lSE0+5XQ9oP\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.secret.header/s!\(value\s*=\s*\"\)[^\"]*\"!\1AuthorizationJwt\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.secret/s!\(value\s*=\s*\"\)[^\"]*\"!\1SNl5Wl+HgQPDqoTFH5SgfnWPZqXkycx6yexQXDBffij4vAfgPZlW9lSE0+5XQ9oP\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/files\.docservice\.secret.header/s!\(value\s*=\s*\"\)[^\"]*\"!\1AuthorizationJwt\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' false == true ']'
+ '[' false == true ']'
+ '[' false == true ']'
+ '[' SERVER == SERVER ']'
++ seq 1 1
+ for serverID in $(seq 1 ${APP_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="core_secret"!g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/core.machinekey/s!value=".*"!value="core_secret"!g' -i /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/core.machinekey/s!value=".*"!value="core_secret"!g' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/core\.machinekey/s!"core\.machinekey".*!"core\.machinekey":"core_secret",!' -i /var/www/onlyoffice/Services/ASC.Socket.IO/config/config.json
+ sed 's!machine_key\s*=.*!machine_key = core_secret!g' -i /var/www/onlyoffice/Services/TeamLabSvc/radicale.config
+ sed 's!"core\.machinekey":.*,!"core\.machinekey":"core_secret",!g' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed 's!"machinekey":.*!"machinekey":"core_secret",!' -i /etc/onlyoffice/communityserver/appsettings.production.json
+ continue
+ sed 's/{{APP_NIGNX_KEEPLIVE}}/32/g' -i /app/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 ']'
+ systemctl enable redis-server.service
Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable redis-server
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
+ service redis-server start
Starting redis-server: redis-server.
+ redis-cli config set save ''
OK
+ redis-cli config rewrite
OK
+ redis-cli flushall
OK
+ service redis-server stop
Stopping redis-server: redis-server.
+ '[' SERVER == SERVICES ']'
+ systemctl enable monoserveApiSystem.service
++ seq 1 1
+ for serverID in $(seq 1 ${APP_MONOSERVE_COUNT})
+ index=1
+ '[' 1 == 1 ']'
+ index=
+ systemctl enable monoserve.service
+ 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 ']'
+ '[' '!' -d /var/www/onlyoffice/Data/Index/v7.10.0 ']'
+ mkdir -p /var/log/onlyoffice//Index
+ mkdir -p /var/www/onlyoffice/Data/Index/v7.10.0
++ ls -alhd /var/www/onlyoffice/Data/Index/v7.10.0
++ awk '{ print $3 }'
+ '[' elasticsearch '!=' elasticsearch ']'
+ chown -R elasticsearch:elasticsearch /var/log/onlyoffice//Index
+ dpkg -l
+ grep -q onlyoffice-xmppserver
+ sed '/web\.talk/s/value=\"\S*\"/value=\"true\"/g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/web\.chat/s/value=\"\S*\"/value=\"false\"/g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ systemctl stop onlyofficeRadicale
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeTelegram
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeSocketIO
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeThumb
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeFeed
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeIndex
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeJabber
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeMailAggregator
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeMailWatchdog
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeMailCleaner
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeMailImap
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeNotify
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeBackup
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeStorageMigrate
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeStorageEncryption
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeUrlShortener
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeThumbnailBuilder
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop onlyofficeAutoCleanUp
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop god
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl enable god
+ systemctl stop elasticsearch
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop redis-server
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop mysql
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop nginx
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl stop monoserveApiSystem.service
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl enable monoserveApiSystem.service
++ seq 1 1
+ for serverID in $(seq 1 ${APP_MONOSERVE_COUNT})
+ index=1
+ '[' 1 == 1 ']'
+ index=
+ systemctl stop monoserve.service
System has not been booted with systemd as init system (PID 1). Can't operate.
+ systemctl enable monoserve.service
+ '[' false == true ']'
+ systemctl enable onlyofficeRadicale.service
+ systemctl enable onlyofficeTelegram.service
+ systemctl enable onlyofficeSocketIO.service
+ systemctl enable onlyofficeThumb.service
+ systemctl enable onlyofficeFeed.service
+ systemctl enable onlyofficeIndex.service
+ systemctl enable onlyofficeJabber.service
+ systemctl enable onlyofficeMailAggregator.service
+ systemctl enable onlyofficeMailWatchdog.service
+ systemctl enable onlyofficeMailCleaner.service
+ systemctl enable onlyofficeMailImap.service
+ systemctl enable onlyofficeNotify.service
+ systemctl enable onlyofficeBackup.service
+ systemctl enable onlyofficeStorageMigrate.service
+ systemctl enable onlyofficeStorageEncryption.service
+ systemctl enable onlyofficeUrlShortener.service
+ systemctl enable onlyofficeThumbnailBuilder.service
+ systemctl enable onlyofficeAutoCleanUp.service
+ '[' SERVER == SERVER ']'
+ mv /app/config/nginx/prepare-onlyoffice /etc/nginx/sites-enabled/onlyoffice
+ service nginx stop
+ systemctl enable nginx.service
Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx
++ ps auxf
++ grep cron
++ grep -v grep
++ awk '{print $2}'
+ PID=
+ '[' ']'
+ systemctl enable elasticsearch.service
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch
Created symlink /etc/systemd/system/multi-user.target.wants/elasticsearch.service → /usr/lib/systemd/system/elasticsearch.service.
+ '[' -n '' ']'
+ rm -dfr '/tmp/onlyoffice*'
+ rm -dfr '/var/run/onlyoffice/*'
+ rm -dfr '/var/cache/nginx/onlyoffice/*'
+ '[' true == true ']'
+ exec /lib/systemd/systemd

Hello @jakoberpf It looks like nginx is not responding. Can you check the status of this service in the communityserver container? Is it also possible that there are some errors in the logs?

Hey @Carazyda, very good point. I can start the nginx server manually.

root@onlyoffice-community-bfd5fc8d5-5j86j:/# service nginx status
 * nginx is not running
root@onlyoffice-community-bfd5fc8d5-5j86j:/# service nginx restart
 * Restarting nginx nginx                                                                                          [ OK ] 

And then I am greeted with a loading error page

...
<h1 id="header">Error 502.  App Crash</h1>
        <p id="text">The server was unable to complete your request.</p>
<div id="button-container"></div>
...

I am guessing that an error page from nginx?

"Error 502. App Crash" this means that our site is not running, try systemctl start monoserve. Also, check if other onlyoffice services are running?

Running ps aux reveals that no onlyoffice services are running.

root@onlyoffice-community-7c4f69946c-gx5zp:/# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0  76276  3640 ?        Ss   11:04   0:00 /lib/systemd/systemd
redis        212  0.1  0.0  71496  5476 ?        Ssl  11:04   0:00 /usr/bin/redis-server 127.0.0.1:6379
root         320  0.0  0.0  20316  4096 pts/0    Ss   11:05   0:00 bash
root         349  0.0  0.0 295708  1124 ?        Ss   11:05   0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/ngi
nginx        350  2.8  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        351  2.8  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        352  3.1  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        353  3.0  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        354  3.0  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        355  3.5  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        356  3.0  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        357  3.3  1.3 742468 445904 ?       S    11:05   0:00 nginx: worker process
nginx        358  0.0  0.0 300324  4084 ?        S    11:05   0:00 nginx: cache manager process
nginx        359  0.0  0.0 300324  3676 ?        S    11:05   0:00 nginx: cache loader process
root         361  0.0  0.0  36088  3500 pts/0    R+   11:05   0:00 ps aux

And I just recoginzed in the logs the System has not been booted with systemd as init system (PID 1). Can't operate. This does not seem normal? Maybe the runtime environment of kubernetes pod is so different in the way that the services cannot start.

Actually found this post which tells me that systemctl won't work, which is a problem since the run script does use it. Post. Seems that I would have to edit the run script to use service <name> start/stop instead of systemctl to maybe get this working?

Note:
Other option would be to run a privileged, but this would be very much unsafe.

Questions:

Can you restart the community server container? maybe this will help.

Did this multiple times for debugging, but same outcome. systemctl commands fail, therefore none of the services (besides redis because it started with service command) are started. I did some troubleshooting step to get it running with --privileged (in k8s called securityContext) and docker cmd /sbin/init.d. I think I need to find a way to handle the service enabled/start/stop commands without systemctl.

I faced to the same problem. Document server helm chart is not sufficient for my client use case. It should be great to have a dedicated helm chart for workspace part.
Container with systemd are really painful to use with kubernetes. Podman runtime could help, but many k8s managed services don't use it. Replacing systemd by supervisor could be an alternative.