Closed RooyeKhat closed 2 years ago
Hello @RooyeKhat Is that a duplicate of this issue ? Seems you have a mail server, that's not running. How it happened? Try to start it.
Hi first i say , yes i updated control panel first and document server next update community server
i try to run mail server show this
[root@portal ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b5da80cbb406 onlyoffice/communityserver:11.5.2.1542 "/app/run-communit..." 5 hours ago Restarting (246) 52 minutes ago onlyoffice-community-server
5d5f14e35462 onlyoffice/documentserver:6.3.1.32 "/app/ds/run-docum..." 5 hours ago Up 4 hours 80/tcp, 443/tcp onlyoffice-document-server
43409d4a6a47 onlyoffice/controlpanel:3.0.0.381 "/var/www/onlyoffi..." 20 hours ago Up 4 hours 80/tcp, 443/tcp, 9833-9834/tcp onlyoffice-control-panel
6c2102891cd7 onlyoffice/mailserver:1.6.75 "/bin/sh -c 'expor..." 6 months ago Created onlyoffice-mail-server
291b38d7eb5b mysql:5.7.30 "docker-entrypoint..." 8 months ago Up 4 hours 3306/tcp, 33060/tcp onlyoffice-mysql-server
[root@portal ~]# docker start 6c2102891cd7
Error response from daemon: driver failed programming external connectivity on endpoint onlyoffice-mail-server (4b057328a803cb5cd51acb3ecc3aa9fce480c8a1ce6b589a42676e89f84a3429): Error starting userland proxy: listen tcp 0.0.0.0:25: bind: address already in use
Error: failed to start containers: 6c2102891cd7
[root@portal ~]# sudo netstat -pna | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1562/master
tcp6 0 0 ::1:25 :::* LISTEN 1562/master
unix 2 [ ACC ] STREAM LISTENING 20574 1043/dockerd-curren /run/docker/libnetwork/40bc466cd4d9c25b2f92d892db261ca3f23f80bfeb6476af3085d01e67e5b1f4.sock
unix 3 [ ] STREAM CONNECTED 22572 684/dbus-daemon /run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 427 525/systemd-udevd
unix 2 [ ] DGRAM 1805 525/systemd-udevd
unix 3 [ ] DGRAM 1817 525/systemd-udevd
unix 3 [ ] STREAM CONNECTED 16625 682/systemd-logind
unix 3 [ ] DGRAM 1818 525/systemd-udevd
[root@portal ~]#
Hi i found problem centos install Postfix Mail Server must stop and restart mail server and run again communityserver
but not run server and cant access via web
docker log
+ 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.9.0
+ APP_PRIVATE_DATA_DIR=/var/www/onlyoffice/Data/.private
+ APP_SERVICES_DIR=/var/www/onlyoffice/Services
+ 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
++ head -1
++ awk '/scope global/ {print $4}'
+ DOCKER_APP_SUBNET=172.18.0.6/16
++ ip addr show eth0
++ head -1
++ awk '/inet / {gsub(/\/.*/,"",$2); print $2}'
+ DOCKER_CONTAINER_IP=172.18.0.6
+ 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
++ awk '{print $1}'
++ cat /proc/cpuinfo
++ grep -i processor
++ grep -i processor
++ wc -l
+ CPU_PROCESSOR_COUNT=6
++ ulimit -n
+ NGINX_WORKER_CONNECTIONS=1048576
+ SERVICE_SSO_AUTH_HOST_ADDR=onlyoffice-control-panel
++ sudo sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' /var/www/onlyoffice/WebStudio/web.appsettings.config
+ DEFAULT_APP_CORE_MACHINEKEY=MoPVfsJlwyzt
+ IS_UPDATE=false
+ WORKSPACE_ENTERPRISE=false
+ '[' '!' -e /var/www/onlyoffice/Data/.private/machinekey ']'
++ head -n 1 /var/www/onlyoffice/Data/.private/machinekey
+ APP_CORE_MACHINEKEY=MoPVfsJlwyzt
++ sudo sed -n '/"version.release-date"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' /var/www/onlyoffice/WebStudio/web.appsettings.config
+ RELEASE_DATE=20210602
++ CreateAuthToken 20210602 MoPVfsJlwyzt
++ local pkey=20210602
+++ echo -n MoPVfsJlwyzt
++ local machinekey=MoPVfsJlwyzt
++ local a=1
++ local LIMIT=10
++ '[' 1 -le 10 ']'
+++ date +%Y%m%d%H%M%S
++ local now=20210730135016
+++ echo -n -e '20210730135016\n20210602'
+++ openssl dgst -sha1 -binary -mac HMAC -macopt key:MoPVfsJlwyzt
PuTTYPuTTY++ local $'authkey=\027%v\320\320H\200f\230\251:\324\306\034\346\375\207=\310\361'
+++ echo -n $'\027%v\320\320H\200f\230\251:\324\306\034\346\375\207=\310\361'
+++ base64
++ authkey=FyV20NBIgGaYqTrUxhzm/Yc9yPE=
++ local 'result=ASC 20210602:20210730135016:FyV20NBIgGaYqTrUxhzm/Yc9yPE='
++ a=2
+++ echo '"ASC' '20210602:20210730135016:FyV20NBIgGaYqTrUxhzm/Yc9yPE="'
+++ grep ==
++ '[' -z '' ']'
++ echo 'ASC 20210602:20210730135016:FyV20NBIgGaYqTrUxhzm/Yc9yPE='
++ exit 0
+ RELEASE_DATE_SIGN='ASC 20210602:20210730135016:FyV20NBIgGaYqTrUxhzm/Yc9yPE='
+ sed -i '/version.release-date.sign/s!value="[^"]*"!value=\"ASC 20210602:20210730135016:FyV20NBIgGaYqTrUxhzm/Yc9yPE=\"!g' /var/www/onlyoffice/WebStudio/web.appsettings.config
++ head -n 1 /var/www/onlyoffice/Data/.private/release_date
+ PREV_RELEASE_DATE=20210602
+ '[' 20210602 '!=' 20210602 ']'
+ chmod -R 444 /var/www/onlyoffice/Data/.private
+ grep -qE 'docker|lxc|kubepods|libpod'
+ cat /proc/1/cgroup
+ 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=6UwJncWToW4T
+ 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=my-secret-pw
+ MYSQL_SERVER_HOST=onlyoffice-mysql-server
+ MYSQL_SERVER_PORT=3306
+ MYSQL_SERVER_DB_NAME=onlyoffice
+ MYSQL_SERVER_USER=onlyoffice_user
+ MYSQL_SERVER_PASS=onlyoffice_pass
+ MYSQL_SERVER_EXTERNAL=false
+ mkdir -p /var/www/onlyoffice/Data/certs/.well-known/acme-challenge
+ '[' 172.18.0.6/16 ']'
++ normalize_subnet 172.18.0.6/16
++ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
++ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
+++ echo 172.18.0.6/16
+++ 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'))
+++ sed -ne 's:^[^/]*/\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$:\1 \2 \3 \4:p'
+++ echo 172.18.0.6/16
++ local MASK
++ '[' 0 -ne 4 ']'
++ BITCNT=($(echo "$1" | sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'))
+++ echo 172.18.0.6/16
+++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ local BITCNT
++ BITCNT=4294901760
++ (( I=0 ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++ ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++ ))
++ (( I<4 ))
++ MASK[$I]=0
++ (( I++ ))
++ (( I<4 ))
++ MASK[$I]=0
++ (( I++ ))
++ (( I<4 ))
++ NETWORK=()
++ local NETWORK
++ (( I=0 ))
++ (( I<4 ))
++ NETWORK[$I]=172
++ (( I++ ))
++ (( I<4 ))
++ NETWORK[$I]=18
++ (( I++ ))
++ (( I<4 ))
++ NETWORK[$I]=0
++ (( I++ ))
++ (( I<4 ))
++ NETWORK[$I]=0
++ (( I++ ))
++ (( I<4 ))
+++ echo 172.18.0.6/16
+++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ local IP_MASK=16
++ echo 172.18.0.0/16
+ DOCKER_APP_SUBNET=172.18.0.0/16
+ 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 6;/' -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 's,{{SSL_CERTIFICATE_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.crt,' -i /etc/nginx/sites-enabled/onlyoffice
+ sed 's,{{SSL_KEY_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.key,' -i /etc/nginx/sites-enabled/onlyoffice
+ rm -f '/etc/nginx/conf.d/*.conf'
+ service nginx restart
* Restarting nginx nginx [ OK ]
++ head -n 1
++ free -m
++ grep -oP '\d+'
+ TOTAL_MEMORY=32011
+ MEMORY_REQUIREMENTS=12228
+ '[' 32011 -gt 12228 ']'
+ grep -q '[-]Xms1g' /etc/elasticsearch/jvm.options
+ echo -Xms4g
+ grep -q '[-]Xmx1g' /etc/elasticsearch/jvm.options
+ echo -Xmx4g
+ '[' ']'
+ '[' ']'
+ '[' onlyoffice-document-server ']'
+ DOCUMENT_SERVER_ENABLED=true
+ DOCUMENT_SERVER_HOST=onlyoffice-document-server
+ DOCUMENT_SERVER_API_URL='\/ds-vpath'
+ '[' true == true ']'
+ '[' 172.18.0.0/16 ']'
+ '[' -z '' ']'
++ dig +short onlyoffice-document-server
+ DOCUMENT_SERVER_HOST_IP=172.18.0.3
+ check_ip_is_internal 172.18.0.0/16 172.18.0.3
+ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
+ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
++ echo 172.18.0.0/16
++ 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 172.18.0.0/16
++ 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 172.18.0.0/16
++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
+ local BITCNT
+ BITCNT=4294901760
+ (( I=0 ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK=()
+ local NETWORK
+ (( I=0 ))
+ (( I<4 ))
+ NETWORK[$I]=172
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=18
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ INIP=($(echo "$2" | sed -ne 's:^'"$IPRE"'$:\1 \2 \3 \4:p'))
++ echo 172.18.0.3
++ sed -ne 's:^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$:\1 \2 \3 \4:p'
+ local INIP
+ (( I=0 ))
+ (( I<4 ))
+ [[ 172 -ne 172 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 18 -ne 18 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ return 0
++ dig +short onlyoffice-community-server
+ _DOCKER_CONTAINER_IP=172.18.0.6
+ '[' 172.18.0.6 == 172.18.0.6 ']'
+ SERVER_HOST=onlyoffice-community-server
+ '[' true == true ']'
+ '[' onlyoffice-document-server == onlyoffice-document-server ']'
+ bash /app/assets/tools/wait-for-it.sh onlyoffice-document-server:8000 --quiet -s -- echo 'Document Server is up'
Document Server is up
++ curl -s http://onlyoffice-document-server:8000/info/info.json
++ jq .licenseInfo.packageType
+ DOCKER_DOCUMENT_SERVER_PACKAGE_TYPE=0
+ '[' -n 0 ']'
+ '[' 0 -gt 0 ']'
+ '[' onlyoffice-mysql-server '!=' localhost ']'
+ '[' onlyoffice-mysql-server '!=' 127.0.0.1 ']'
+ MYSQL_SERVER_EXTERNAL=true
+ '[' ']'
+ '[' 80 ']'
+ CONTROL_PANEL_ENABLED=true
+ MAIL_SERVER_API_PORT=8081
+ MAIL_SERVER_API_HOST=onlyoffice-mail-server
+ MAIL_SERVER_DB_HOST=onlyoffice-mysql-server
+ MAIL_SERVER_DB_PORT=3306
+ MAIL_SERVER_DB_NAME=onlyoffice_mailserver
+ MAIL_SERVER_DB_USER=root
+ MAIL_SERVER_DB_PASS=my-secret-pw
+ '[' onlyoffice-mysql-server ']'
+ MAIL_SERVER_ENABLED=true
+ '[' -z onlyoffice-mail-server ']'
+ [[ ! onlyoffice-mail-server =~ ^(([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])$ ]]
++ dig +short onlyoffice-mail-server
+ MAIL_SERVER_API_HOST=172.18.0.2
+ '[' -z 172.18.0.2 ']'
+ '[' 172.18.0.2 ']'
+ '[' '!' bash /app/assets/tools/wait-for-it.sh 172.18.0.2:25 --timeout=300 --quiet -s -- echo 'MailServer is up' ']'
/app/run-community-server.sh: line 435: [: too many arguments
+ 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 [ OK ]
+ systemctl disable mysql.service
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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass --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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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=203
++ echo 203
+ DB_TABLES_COUNT=203
+ '[' -z onlyoffice ']'
+ '[' utf8 '!=' utf8 ']'
+ change_connections default /var/www/onlyoffice/WebStudio/web.connections.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ change_connections default /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ change_connections default /var/www/onlyoffice/Services/MailWatchdog/ASC.Mail.Watchdog.Service.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailWatchdog/ASC.Mail.Watchdog.Service.exe.config
+ change_connections default /var/www/onlyoffice/Services/MailCleaner/ASC.Mail.StorageCleaner.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailCleaner/ASC.Mail.StorageCleaner.exe.config
+ change_connections default /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server",!' -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":"onlyoffice_pass",!' -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
+ '[' 203 -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-ssl.conf.template /app/config/nginx/prepare-onlyoffice
+ mkdir -p /var/log/onlyoffice//nginx
+ sed 's,{{SSL_CERTIFICATE_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.crt,' -i /app/config/nginx/prepare-onlyoffice
+ sed 's,{{SSL_KEY_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.key,' -i /app/config/nginx/prepare-onlyoffice
+ sed 's/TLSv1.2;/TLSv1.2 TLSv1.3;/' -i /app/config/nginx/prepare-onlyoffice
+ '[' '!' -f /var/www/onlyoffice/Data/certs/dhparam.pem ']'
+ sed 's,{{SSL_DHPARAM_PATH}},/var/www/onlyoffice/Data/certs/dhparam.pem,' -i /app/config/nginx/prepare-onlyoffice
+ '[' '!' -f /var/www/onlyoffice/Data/certs/onlyoffice.pfx ']'
+ '[' -r /var/www/onlyoffice/Data/certs/stapling.trusted.crt ']'
+ sed 's,{{SSL_OCSP_CERTIFICATE_PATH}},/var/www/onlyoffice/Data/certs/stapling.trusted.crt,' -i /app/config/nginx/prepare-onlyoffice
+ sed 's,{{SSL_VERIFY_CLIENT}},off,' -i /app/config/nginx/prepare-onlyoffice
+ '[' -f /var/www/onlyoffice/Data/certs/ca.crt ']'
+ sed '/{{CA_CERTIFICATES_PATH}}/d' -i /app/config/nginx/prepare-onlyoffice
+ sed '/certificate"/s!\(value\s*=\s*\"\).*\"!\1/var/www/onlyoffice/Data/certs/onlyoffice.pfx\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/certificatePassword/s/\(value\s*=\s*\"\).*\"/\1onlyoffice\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/startTls/s/\(value\s*=\s*\"\).*\"/\1optional\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/mail\.default-api-scheme/s/\(value\s*=\s*\"\).*\"/\1https\"/' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ sed -i 1d /etc/logrotate.d/nginx
+ sed '1 i\/var/log/nginx/*.log /var/log/onlyoffice/nginx.*.log {' -i /etc/logrotate.d/nginx
+ '[' 172.18.0.0/16 ']'
+ sed 's,{{DOCKER_APP_SUBNET}},172.18.0.0/16,' -i /app/config/nginx/prepare-onlyoffice
+ '[' ']'
+ '[' true == true ']'
+ sed '/files\.docservice\.secret/s!\(value\s*=\s*\"\)[^\"]*\"!\16UwJncWToW4T\"!' -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*\"\)[^\"]*\"!\16UwJncWToW4T\"!' -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
+ '[' true == true ']'
+ cp /etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf.template /etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf
+ sed 's,{{DOCUMENT_SERVER_HOST_ADDR}},http:\/\/onlyoffice-document-server,' -i /etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf
+ sed '/files\.docservice\.url\.internal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-document-server\/\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.url\.public/s!\(value\s*=\s*\"\)[^\"]*\"!\1\/ds-vpath\/\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.url\.internal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-document-server\/\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/files\.docservice\.url\.public/s!\(value\s*=\s*\"\)[^\"]*\"!\1\/ds-vpath\/\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' -n 172.18.0.0/16 ']'
+ '[' -n onlyoffice-community-server ']'
+ sed '/files\.docservice\.url\.portal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-community-server\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.url\.portal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-community-server\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' false == true ']'
+ '[' true == true ']'
+ timeout=120
+ interval=10
+ '[' 10 -lt 120 ']'
+ interval=20
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.2'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=portal.solved-gmbh.de
+ [[ 0 -eq 0 ]]
+ [[ -n portal.solved-gmbh.de ]]
+ break
+ sed -r '/web\.hide-settings/s/,AdministrationPage//' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
++ mysql_scalar_exec 'select id from mail_server_server where mx_record='\''portal.solved-gmbh.de'\'' limit 1'
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'select id from mail_server_server where mx_record='\''portal.solved-gmbh.de'\'' limit 1'
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=
++ echo
+ MYSQL_MAIL_SERVER_ID=
+ echo 'MYSQL mail server id '\'''\'''
MYSQL mail server id ''
+ SENDER_IP=
+ check_ip_is_internal 172.18.0.0/16 172.18.0.2
+ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
+ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
++ echo 172.18.0.0/16
++ 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 172.18.0.0/16
++ 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'))
++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ echo 172.18.0.0/16
+ local BITCNT
+ BITCNT=4294901760
+ (( I=0 ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK=()
+ local NETWORK
+ (( I=0 ))
+ (( I<4 ))
+ NETWORK[$I]=172
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=18
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ INIP=($(echo "$2" | sed -ne 's:^'"$IPRE"'$:\1 \2 \3 \4:p'))
++ echo 172.18.0.2
++ sed -ne 's:^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$:\1 \2 \3 \4:p'
+ local INIP
+ (( I=0 ))
+ (( I<4 ))
+ [[ 172 -ne 172 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 18 -ne 18 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ return 0
++ hostname -i
+ SENDER_IP=172.18.0.6
+ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'DELETE FROM greylisting_whitelist WHERE Comment='\''onlyoffice-community-server'\'';'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'REPLACE INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ("SenderIP:172.18.0.6", '\''onlyoffice-community-server'\'', 0);'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ '[' -z ']'
+ mysql_scalar_exec
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e ''
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo
++ mysql_scalar_exec 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''imap'\'', '\''portal.solved-gmbh.de'\'', 143, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''imap'\'', '\''portal.solved-gmbh.de'\'', 143, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=1025
++ echo 1025
+ id1=1025
+ '[' ']'
++ mysql_scalar_exec 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''smtp'\'', '\''portal.solved-gmbh.de'\'', 587, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''smtp'\'', '\''portal.solved-gmbh.de'\'', 587, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=1026
++ echo 1026
+ id2=1026
+ '[' ']'
+ interval=10
+ '[' 10 -lt 120 ']'
+ interval=20
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'select access_token from api_keys where id=1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MYSQL_MAIL_SERVER_ACCESS_TOKEN=b470b1b07a7abfd32ed7d00e852c01e4
+ [[ 0 -eq 0 ]]
+ [[ -n b470b1b07a7abfd32ed7d00e852c01e4 ]]
+ break
+ '[' ']'
+ MAIL_SERVER_API_HOST_ADDRESS=172.18.0.2
+ [[ onlyoffice-mysql-server == \o\n\l\y\o\f\f\i\c\e\-\m\a\i\l\-\s\e\r\v\e\r ]]
+ mysql_scalar_exec 'DELETE FROM mail_server_server;'
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'DELETE FROM mail_server_server;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo
+ mysql_scalar_exec 'INSERT INTO mail_server_server (mx_record, connection_string, server_type, smtp_settings_id, imap_settings_id) VALUES ('\''portal.solved-gmbh.de'\'', '\''{"DbConnection" : "Server=onlyoffice-mysql-server;Database=onlyoffice_mailserver;User ID=root;Password=my-secret-pw;Pooling=True;Character Set=utf8;AutoEnlist=false;SSL Mode=None;Connection Timeout=30;Maximum Pool Size=300;", "Api":{"Protocol":"http", "Server":"172.18.0.2", "Port":"8081", "Version":"v1","Token":"b470b1b07a7abfd32ed7d00e852c01e4"}}'\'', 2, '\''1026'\'', '\''1025'\'');'
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'INSERT INTO mail_server_server (mx_record, connection_string, server_type, smtp_settings_id, imap_settings_id) VALUES ('\''portal.solved-gmbh.de'\'', '\''{"DbConnection" : "Server=onlyoffice-mysql-server;Database=onlyoffice_mailserver;User ID=root;Password=my-secret-pw;Pooling=True;Character Set=utf8;AutoEnlist=false;SSL Mode=None;Connection Timeout=30;Maximum Pool Size=300;", "Api":{"Protocol":"http", "Server":"172.18.0.2", "Port":"8081", "Version":"v1","Token":"b470b1b07a7abfd32ed7d00e852c01e4"}}'\'', 2, '\''1026'\'', '\''1025'\'');'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo
+ '[' true == true ']'
+ cp /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf.template /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf
+ sed 's,{{CONTROL_PANEL_HOST_ADDR}},onlyoffice-control-panel,' -i /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf
+ sed 's,{{SERVICE_SSO_AUTH_HOST_ADDR}},onlyoffice-control-panel,' -i /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf
+ sed '/web\.controlpanel\.url/s/\(value\s*=\s*\"\)[^\"]*\"/\1\/controlpanel\/\"/' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/web\.controlpanel\.url/s/\(value\s*=\s*\"\)[^\"]*\"/\1\/controlpanel\/\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' 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="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/core\.machinekey/s!"core\.machinekey".*!"core\.machinekey":"MoPVfsJlwyzt",!' -i /var/www/onlyoffice/Services/ASC.Socket.IO/config/config.json
+ sed 's!machine_key\s*=.*!machine_key = MoPVfsJlwyzt!g' -i /var/www/onlyoffice/Services/TeamLabSvc/radicale.config
+ sed 's!"core\.machinekey":.*,!"core\.machinekey":"MoPVfsJlwyzt",!g' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/MailCleaner/ASC.Mail.StorageCleaner.exe.config
+ 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
+ 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.9.0 ']'
+ mkdir -p /var/log/onlyoffice//Index
+ mkdir -p /var/www/onlyoffice/Data/Index/v7.9.0
++ ls -alhd /var/www/onlyoffice/Data/Index/v7.9.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 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 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 onlyofficeNotify.service
+ systemctl enable onlyofficeBackup.service
+ systemctl enable onlyofficeStorageMigrate.service
+ systemctl enable onlyofficeStorageEncryption.service
+ systemctl enable onlyofficeUrlShortener.service
+ systemctl enable onlyofficeThumbnailBuilder.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
++ awk '{print $2}'
++ grep cron
++ grep -v grep
+ 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
+ '[' -n '' ']'
+ rm -dfr /tmp/onlyofficeBackup /tmp/onlyofficeFeed /tmp/onlyofficeIndex /tmp/onlyofficeJabber /tmp/onlyofficeMailAggregator /tmp/onlyofficeMailWatchdog /tmp/onlyofficeNotify /tmp/onlyofficeRadicale /tmp/onlyofficeSocketIO /tmp/onlyofficeSsoAuth /tmp/onlyofficeStorageEncryption /tmp/onlyofficeStorageMigrate /tmp/onlyofficeTelegram /tmp/onlyoffice-temp-aspnet-0 /tmp/onlyofficeThumb /tmp/onlyofficeThumbnailBuilder /tmp/onlyofficeUrlShortener
+ rm -dfr '/var/run/onlyoffice/*'
+ rm -dfr '/var/cache/nginx/onlyoffice/*'
+ '[' true == true ']'
+ exec /lib/systemd/systemd
please help me for back machine to start and work correctly
Thanks
Did you installed Onlyoffice with our script and mapped all data in /app/ folder? If so, then try removing all containers and reinstalling them with our script.
Did you installed Onlyoffice with our script and mapped all data in /app/ folder? If so, then try removing all containers and reinstalling them with our script.
yes all data mapped and i install with our script how i can do it and how i trusted all data is correct ?
only stop old container and run this command ?
docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server-new -p 80:80 -p 443:443 -p 5222:5222 \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
-e MYSQL_SERVER_USER=onlyoffice_user \
-e MYSQL_SERVER_PASS=onlyoffice_pass \
-e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
-e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
-e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
-e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
-e MAIL_SERVER_DB_PORT=3306 \
-e MAIL_SERVER_DB_USER=root \
-e MAIL_SERVER_DB_PASS=my-secret-pw \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
onlyoffice/communityserver
can you tell me this way is true ? @Carazyda
Thanks
ok i removed all container machine and install again via workspace-install.sh but again show this error :
+ 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.9.0
+ APP_PRIVATE_DATA_DIR=/var/www/onlyoffice/Data/.private
+ APP_SERVICES_DIR=/var/www/onlyoffice/Services
+ 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=172.18.0.6/16
++ ip addr show eth0
++ awk '/inet / {gsub(/\/.*/,"",$2); print $2}'
++ head -1
+ DOCKER_CONTAINER_IP=172.18.0.6
+ 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
++ grep -i processor
++ grep -i processor
++ awk '{print $1}'
++ wc -l
+ CPU_PROCESSOR_COUNT=6
++ ulimit -n
+ NGINX_WORKER_CONNECTIONS=1048576
+ SERVICE_SSO_AUTH_HOST_ADDR=onlyoffice-control-panel
++ sudo sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' /var/www/onlyoffice/WebStudio/web.appsettings.config
+ DEFAULT_APP_CORE_MACHINEKEY=MoPVfsJlwyzt
+ IS_UPDATE=false
+ WORKSPACE_ENTERPRISE=false
+ '[' '!' -e /var/www/onlyoffice/Data/.private/machinekey ']'
++ head -n 1 /var/www/onlyoffice/Data/.private/machinekey
+ APP_CORE_MACHINEKEY=MoPVfsJlwyzt
++ sudo sed -n '/"version.release-date"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' /var/www/onlyoffice/WebStudio/web.appsettings.config
+ RELEASE_DATE=20210602
++ CreateAuthToken 20210602 MoPVfsJlwyzt
++ local pkey=20210602
+++ echo -n MoPVfsJlwyzt
++ local machinekey=MoPVfsJlwyzt
++ local a=1
++ local LIMIT=10
++ '[' 1 -le 10 ']'
+++ date +%Y%m%d%H%M%S
++ local now=20210730152845
+++ echo -n -e '20210730152845\n20210602'
+++ openssl dgst -sha1 -binary -mac HMAC -macopt key:MoPVfsJlwyzt
++ local 'authkey=a#▒▒▒D▒h▒t&_▒▒▒'
+++ echo -n 'a#▒▒▒D▒h▒t&_▒▒▒'
+++ base64
++ authkey=YRMjuRWXkESkaNZ0G2gmXwehoJo=
++ local 'result=ASC 20210602:20210730152845:YRMjuRWXkESkaNZ0G2gmXwehoJo='
++ a=2
+++ echo '"ASC' '20210602:20210730152845:YRMjuRWXkESkaNZ0G2gmXwehoJo="'
+++ grep ==
++ '[' -z '' ']'
++ echo 'ASC 20210602:20210730152845:YRMjuRWXkESkaNZ0G2gmXwehoJo='
++ exit 0
+ RELEASE_DATE_SIGN='ASC 20210602:20210730152845:YRMjuRWXkESkaNZ0G2gmXwehoJo='
+ sed -i '/version.release-date.sign/s!value="[^"]*"!value=\"ASC 20210602:20210730152845:YRMjuRWXkESkaNZ0G2gmXwehoJo=\"!g' /var/www/onlyoffice/WebStudio/web.appsettings.config
++ head -n 1 /var/www/onlyoffice/Data/.private/release_date
+ PREV_RELEASE_DATE=20210602
+ '[' 20210602 '!=' 20210602 ']'
+ chmod -R 444 /var/www/onlyoffice/Data/.private
+ grep -qE 'docker|lxc|kubepods|libpod'
+ cat /proc/1/cgroup
+ 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=6I9TcUFigWIk
+ 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=my-secret-pw
+ MYSQL_SERVER_HOST=onlyoffice-mysql-server
+ MYSQL_SERVER_PORT=3306
+ MYSQL_SERVER_DB_NAME=onlyoffice
+ MYSQL_SERVER_USER=onlyoffice_user
+ MYSQL_SERVER_PASS=onlyoffice_pass
+ MYSQL_SERVER_EXTERNAL=false
+ mkdir -p /var/www/onlyoffice/Data/certs/.well-known/acme-challenge
+ '[' 172.18.0.6/16 ']'
++ normalize_subnet 172.18.0.6/16
++ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
++ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
+++ echo 172.18.0.6/16
+++ 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 172.18.0.6/16
+++ 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 172.18.0.6/16
+++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ local BITCNT
++ BITCNT=4294901760
++ (( I=0 ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++ ))
++ (( I<4 ))
++ MASK[$I]=255
++ (( I++ ))
++ (( I<4 ))
++ MASK[$I]=0
++ (( I++ ))
++ (( I<4 ))
++ MASK[$I]=0
++ (( I++ ))
++ (( I<4 ))
++ NETWORK=()
++ local NETWORK
++ (( I=0 ))
++ (( I<4 ))
++ NETWORK[$I]=172
++ (( I++ ))
++ (( I<4 ))
++ NETWORK[$I]=18
++ (( I++ ))
++ (( I<4 ))
++ NETWORK[$I]=0
++ (( I++ ))
++ (( I<4 ))
++ NETWORK[$I]=0
++ (( I++ ))
++ (( I<4 ))
+++ echo 172.18.0.6/16
+++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
++ local IP_MASK=16
++ echo 172.18.0.0/16
+ DOCKER_APP_SUBNET=172.18.0.0/16
+ 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 6;/' -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 's,{{SSL_CERTIFICATE_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.crt,' -i /etc/nginx/sites-enabled/onlyoffice
+ sed 's,{{SSL_KEY_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.key,' -i /etc/nginx/sites-enabled/onlyoffice
+ rm -f '/etc/nginx/conf.d/*.conf'
+ service nginx restart
* Restarting nginx nginx [ OK ]
++ free -m
++ head -n 1
++ grep -oP '\d+'
+ TOTAL_MEMORY=32011
+ MEMORY_REQUIREMENTS=12228
+ '[' 32011 -gt 12228 ']'
+ grep -q '[-]Xms1g' /etc/elasticsearch/jvm.options
+ echo -Xms4g
+ grep -q '[-]Xmx1g' /etc/elasticsearch/jvm.options
+ echo -Xmx4g
+ '[' ']'
+ '[' ']'
+ '[' onlyoffice-document-server ']'
+ DOCUMENT_SERVER_ENABLED=true
+ DOCUMENT_SERVER_HOST=onlyoffice-document-server
+ DOCUMENT_SERVER_API_URL='\/ds-vpath'
+ '[' true == true ']'
+ '[' 172.18.0.0/16 ']'
+ '[' -z '' ']'
++ dig +short onlyoffice-document-server
+ DOCUMENT_SERVER_HOST_IP=172.18.0.2
+ check_ip_is_internal 172.18.0.0/16 172.18.0.2
+ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
+ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
++ echo 172.18.0.0/16
++ 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 172.18.0.0/16
++ 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 172.18.0.0/16
++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
+ local BITCNT
+ BITCNT=4294901760
+ (( I=0 ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK=()
+ local NETWORK
+ (( I=0 ))
+ (( I<4 ))
+ NETWORK[$I]=172
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=18
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ INIP=($(echo "$2" | sed -ne 's:^'"$IPRE"'$:\1 \2 \3 \4:p'))
++ echo 172.18.0.2
++ sed -ne 's:^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$:\1 \2 \3 \4:p'
+ local INIP
+ (( I=0 ))
+ (( I<4 ))
+ [[ 172 -ne 172 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 18 -ne 18 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ return 0
++ dig +short onlyoffice-community-server
+ _DOCKER_CONTAINER_IP=172.18.0.6
+ '[' 172.18.0.6 == 172.18.0.6 ']'
+ SERVER_HOST=onlyoffice-community-server
+ '[' true == true ']'
+ '[' onlyoffice-document-server == onlyoffice-document-server ']'
+ bash /app/assets/tools/wait-for-it.sh onlyoffice-document-server:8000 --quiet -s -- echo 'Document Server is up'
Document Server is up
++ curl -s http://onlyoffice-document-server:8000/info/info.json
++ jq .licenseInfo.packageType
+ DOCKER_DOCUMENT_SERVER_PACKAGE_TYPE=0
+ '[' -n 0 ']'
+ '[' 0 -gt 0 ']'
+ '[' onlyoffice-mysql-server '!=' localhost ']'
+ '[' onlyoffice-mysql-server '!=' 127.0.0.1 ']'
+ MYSQL_SERVER_EXTERNAL=true
+ '[' ']'
+ '[' 80 ']'
+ CONTROL_PANEL_ENABLED=true
+ MAIL_SERVER_API_PORT=8081
+ MAIL_SERVER_API_HOST=onlyoffice-mail-server
+ MAIL_SERVER_DB_HOST=onlyoffice-mysql-server
+ MAIL_SERVER_DB_PORT=3306
+ MAIL_SERVER_DB_NAME=onlyoffice_mailserver
+ MAIL_SERVER_DB_USER=root
+ MAIL_SERVER_DB_PASS=my-secret-pw
+ '[' onlyoffice-mysql-server ']'
+ MAIL_SERVER_ENABLED=true
+ '[' -z onlyoffice-mail-server ']'
+ [[ ! onlyoffice-mail-server =~ ^(([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])$ ]]
++ dig +short onlyoffice-mail-server
+ MAIL_SERVER_API_HOST=172.18.0.5
+ '[' -z 172.18.0.5 ']'
+ '[' 172.18.0.5 ']'
+ '[' '!' bash /app/assets/tools/wait-for-it.sh 172.18.0.5:25 --timeout=300 --quiet -s -- echo 'MailServer is up' ']'
/app/run-community-server.sh: line 435: [: too many arguments
+ 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 [ OK ]
+ systemctl disable mysql.service
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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass --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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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=203
++ echo 203
+ DB_TABLES_COUNT=203
+ '[' -z onlyoffice ']'
+ '[' utf8 '!=' utf8 ']'
+ change_connections default /var/www/onlyoffice/WebStudio/web.connections.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ change_connections default /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ change_connections default /var/www/onlyoffice/Services/MailWatchdog/ASC.Mail.Watchdog.Service.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailWatchdog/ASC.Mail.Watchdog.Service.exe.config
+ change_connections default /var/www/onlyoffice/Services/MailCleaner/ASC.Mail.StorageCleaner.exe.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300;\"/' -i /var/www/onlyoffice/Services/MailCleaner/ASC.Mail.StorageCleaner.exe.config
+ change_connections default /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/default/s/\(connectionString\s*=\s*\"\)[^\"]*\"/\1Server=onlyoffice-mysql-server;Port=3306;Database=onlyoffice;User ID=onlyoffice_user;Password=onlyoffice_pass;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-server",!' -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":"onlyoffice_pass",!' -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
+ '[' 203 -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-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -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-ssl.conf.template /app/config/nginx/prepare-onlyoffice
+ mkdir -p /var/log/onlyoffice//nginx
+ sed 's,{{SSL_CERTIFICATE_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.crt,' -i /app/config/nginx/prepare-onlyoffice
+ sed 's,{{SSL_KEY_PATH}},/var/www/onlyoffice/Data/certs/onlyoffice.key,' -i /app/config/nginx/prepare-onlyoffice
+ sed 's/TLSv1.2;/TLSv1.2 TLSv1.3;/' -i /app/config/nginx/prepare-onlyoffice
+ '[' '!' -f /var/www/onlyoffice/Data/certs/dhparam.pem ']'
+ sed 's,{{SSL_DHPARAM_PATH}},/var/www/onlyoffice/Data/certs/dhparam.pem,' -i /app/config/nginx/prepare-onlyoffice
+ '[' '!' -f /var/www/onlyoffice/Data/certs/onlyoffice.pfx ']'
+ '[' -r /var/www/onlyoffice/Data/certs/stapling.trusted.crt ']'
+ sed 's,{{SSL_OCSP_CERTIFICATE_PATH}},/var/www/onlyoffice/Data/certs/stapling.trusted.crt,' -i /app/config/nginx/prepare-onlyoffice
+ sed 's,{{SSL_VERIFY_CLIENT}},off,' -i /app/config/nginx/prepare-onlyoffice
+ '[' -f /var/www/onlyoffice/Data/certs/ca.crt ']'
+ sed '/{{CA_CERTIFICATES_PATH}}/d' -i /app/config/nginx/prepare-onlyoffice
+ sed '/certificate"/s!\(value\s*=\s*\"\).*\"!\1/var/www/onlyoffice/Data/certs/onlyoffice.pfx\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/certificatePassword/s/\(value\s*=\s*\"\).*\"/\1onlyoffice\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/startTls/s/\(value\s*=\s*\"\).*\"/\1optional\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/mail\.default-api-scheme/s/\(value\s*=\s*\"\).*\"/\1https\"/' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ sed -i 1d /etc/logrotate.d/nginx
+ sed '1 i\/var/log/nginx/*.log /var/log/onlyoffice/nginx.*.log {' -i /etc/logrotate.d/nginx
+ '[' 172.18.0.0/16 ']'
+ sed 's,{{DOCKER_APP_SUBNET}},172.18.0.0/16,' -i /app/config/nginx/prepare-onlyoffice
+ '[' ']'
+ '[' true == true ']'
+ sed '/files\.docservice\.secret/s!\(value\s*=\s*\"\)[^\"]*\"!\16I9TcUFigWIk\"!' -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*\"\)[^\"]*\"!\16I9TcUFigWIk\"!' -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
+ '[' true == true ']'
+ cp /etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf.template /etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf
+ sed 's,{{DOCUMENT_SERVER_HOST_ADDR}},http:\/\/onlyoffice-document-server,' -i /etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf
+ sed '/files\.docservice\.url\.internal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-document-server\/\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.url\.public/s!\(value\s*=\s*\"\)[^\"]*\"!\1\/ds-vpath\/\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.url\.internal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-document-server\/\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/files\.docservice\.url\.public/s!\(value\s*=\s*\"\)[^\"]*\"!\1\/ds-vpath\/\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' -n 172.18.0.0/16 ']'
+ '[' -n onlyoffice-community-server ']'
+ sed '/files\.docservice\.url\.portal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-community-server\"!' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/files\.docservice\.url\.portal/s!\(value\s*=\s*\"\)[^\"]*\"!\1http:\/\/onlyoffice-community-server\"!' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' false == true ']'
+ '[' true == true ']'
+ timeout=120
+ interval=10
+ '[' 10 -lt 120 ']'
+ interval=20
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 20 -lt 120 ']'
+ interval=30
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 30 -lt 120 ']'
+ interval=40
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 40 -lt 120 ']'
+ interval=50
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 50 -lt 120 ']'
+ interval=60
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 60 -lt 120 ']'
+ interval=70
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 70 -lt 120 ']'
+ interval=80
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 80 -lt 120 ']'
+ interval=90
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 90 -lt 120 ']'
+ interval=100
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 100 -lt 120 ']'
+ interval=110
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 110 -lt 120 ']'
+ interval=120
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'SELECT Comment from greylisting_whitelist where Source='\''SenderIP:172.18.0.5'\'' limit 1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MAIL_SERVER_HOSTNAME=
+ [[ 0 -eq 0 ]]
+ [[ -n '' ]]
+ sleep 10
+ '[' ']'
+ '[' 120 -lt 120 ']'
+ sed -r '/web\.hide-settings/s/,AdministrationPage//' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
++ mysql_scalar_exec 'select id from mail_server_server where mx_record='\'''\'' limit 1'
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'select id from mail_server_server where mx_record='\'''\'' limit 1'
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=
++ echo
+ MYSQL_MAIL_SERVER_ID=
+ echo 'MYSQL mail server id '\'''\'''
MYSQL mail server id ''
+ SENDER_IP=
+ check_ip_is_internal 172.18.0.0/16 172.18.0.5
+ local 'IPRE=\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)'
+ IP=($(echo "$1" | sed -ne 's:^'"$IPRE"'/.*$:\1 \2 \3 \4:p'))
++ sed -ne 's:^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)/.*$:\1 \2 \3 \4:p'
++ echo 172.18.0.0/16
+ local IP
+ MASK=($(echo "$1" | sed -ne 's:^[^/]*/'"$IPRE"'$:\1 \2 \3 \4:p'))
++ echo 172.18.0.0/16
++ 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 172.18.0.0/16
++ sed -ne 's:^[^/]*/\([0-9]\+\)$:\1:p'
+ local BITCNT
+ BITCNT=4294901760
+ (( I=0 ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=255
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ MASK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK=()
+ local NETWORK
+ (( I=0 ))
+ (( I<4 ))
+ NETWORK[$I]=172
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=18
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ NETWORK[$I]=0
+ (( I++ ))
+ (( I<4 ))
+ INIP=($(echo "$2" | sed -ne 's:^'"$IPRE"'$:\1 \2 \3 \4:p'))
++ sed -ne 's:^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)$:\1 \2 \3 \4:p'
++ echo 172.18.0.5
+ local INIP
+ (( I=0 ))
+ (( I<4 ))
+ [[ 172 -ne 172 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 18 -ne 18 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ [[ 0 -ne 0 ]]
+ (( I++ ))
+ (( I<4 ))
+ return 0
++ hostname -i
+ SENDER_IP=172.18.0.6
+ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'DELETE FROM greylisting_whitelist WHERE Comment='\''onlyoffice-community-server'\'';'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'REPLACE INTO greylisting_whitelist (Source, Comment, Disabled) VALUES ("SenderIP:172.18.0.6", '\''onlyoffice-community-server'\'', 0);'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ '[' -z ']'
+ mysql_scalar_exec
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e ''
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo
++ mysql_scalar_exec 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''imap'\'', '\'''\'', 143, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''imap'\'', '\'''\'', 143, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=1033
++ echo 1033
+ id1=1033
+ '[' ']'
++ mysql_scalar_exec 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''smtp'\'', '\'''\'', 587, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
++ local queryResult=
++ '[' '' == opt_ignore_db_name ']'
+++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'INSERT INTO mail_mailbox_server (id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) VALUES (-1, '\''smtp'\'', '\'''\'', 587, '\''STARTTLS'\'', '\''%EMAILADDRESS%'\'', '\'''\'', 0);SELECT LAST_INSERT_ID();'
mysql: [Warning] Using a password on the command line interface can be insecure.
++ queryResult=1034
++ echo 1034
+ id2=1034
+ '[' ']'
+ interval=10
+ '[' 10 -lt 120 ']'
+ interval=20
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server --port=3306 -u root --password=my-secret-pw -D onlyoffice_mailserver -e 'select access_token from api_keys where id=1;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ MYSQL_MAIL_SERVER_ACCESS_TOKEN=b470b1b07a7abfd32ed7d00e852c01e4
+ [[ 0 -eq 0 ]]
+ [[ -n b470b1b07a7abfd32ed7d00e852c01e4 ]]
+ break
+ '[' ']'
+ MAIL_SERVER_API_HOST_ADDRESS=172.18.0.5
+ [[ onlyoffice-mysql-server == \o\n\l\y\o\f\f\i\c\e\-\m\a\i\l\-\s\e\r\v\e\r ]]
+ mysql_scalar_exec 'DELETE FROM mail_server_server;'
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'DELETE FROM mail_server_server;'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo
+ mysql_scalar_exec 'INSERT INTO mail_server_server (mx_record, connection_string, server_type, smtp_settings_id, imap_settings_id) VALUES ('\'''\'', '\''{"DbConnection" : "Server=onlyoffice-mysql-server;Database=onlyoffice_mailserver;User ID=root;Password=my-secret-pw;Pooling=True;Character Set=utf8;AutoEnlist=false;SSL Mode=None;Connection Timeout=30;Maximum Pool Size=300;", "Api":{"Protocol":"http", "Server":"172.18.0.5", "Port":"8081", "Version":"v1","Token":"b470b1b07a7abfd32ed7d00e852c01e4"}}'\'', 2, '\''1034'\'', '\''1033'\'');'
+ local queryResult=
+ '[' '' == opt_ignore_db_name ']'
++ mysql --silent --skip-column-names -h onlyoffice-mysql-server -P 3306 -u onlyoffice_user --password=onlyoffice_pass -D onlyoffice -e 'INSERT INTO mail_server_server (mx_record, connection_string, server_type, smtp_settings_id, imap_settings_id) VALUES ('\'''\'', '\''{"DbConnection" : "Server=onlyoffice-mysql-server;Database=onlyoffice_mailserver;User ID=root;Password=my-secret-pw;Pooling=True;Character Set=utf8;AutoEnlist=false;SSL Mode=None;Connection Timeout=30;Maximum Pool Size=300;", "Api":{"Protocol":"http", "Server":"172.18.0.5", "Port":"8081", "Version":"v1","Token":"b470b1b07a7abfd32ed7d00e852c01e4"}}'\'', 2, '\''1034'\'', '\''1033'\'');'
mysql: [Warning] Using a password on the command line interface can be insecure.
+ queryResult=
+ echo
+ '[' true == true ']'
+ cp /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf.template /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf
+ sed 's,{{CONTROL_PANEL_HOST_ADDR}},onlyoffice-control-panel,' -i /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf
+ sed 's,{{SERVICE_SSO_AUTH_HOST_ADDR}},onlyoffice-control-panel,' -i /etc/nginx/includes/onlyoffice-communityserver-proxy-to-controlpanel.conf
+ sed '/web\.controlpanel\.url/s/\(value\s*=\s*\"\)[^\"]*\"/\1\/controlpanel\/\"/' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/web\.controlpanel\.url/s/\(value\s*=\s*\"\)[^\"]*\"/\1\/controlpanel\/\"/' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ '[' 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="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/WebStudio/web.appsettings.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/ApiSystem/Web.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config
+ sed '/core\.machinekey/s!"core\.machinekey".*!"core\.machinekey":"MoPVfsJlwyzt",!' -i /var/www/onlyoffice/Services/ASC.Socket.IO/config/config.json
+ sed 's!machine_key\s*=.*!machine_key = MoPVfsJlwyzt!g' -i /var/www/onlyoffice/Services/TeamLabSvc/radicale.config
+ sed 's!"core\.machinekey":.*,!"core\.machinekey":"MoPVfsJlwyzt",!g' -i /var/www/onlyoffice/Services/ASC.UrlShortener/config/config.json
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.EmlDownloader.exe.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config
+ sed '/core.machinekey/s!value=".*"!value="MoPVfsJlwyzt"!g' -i /var/www/onlyoffice/Services/MailCleaner/ASC.Mail.StorageCleaner.exe.config
+ 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
+ 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
++ awk '{ print $3 }'
++ ls -alhd /var/www/onlyoffice/Data
+ '[' onlyoffice '!=' onlyoffice ']'
+ '[' '!' -d /var/www/onlyoffice/Data/Index/v7.9.0 ']'
+ mkdir -p /var/log/onlyoffice//Index
+ mkdir -p /var/www/onlyoffice/Data/Index/v7.9.0
++ awk '{ print $3 }'
++ ls -alhd /var/www/onlyoffice/Data/Index/v7.9.0
+ '[' 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 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 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 onlyofficeNotify.service
+ systemctl enable onlyofficeBackup.service
+ systemctl enable onlyofficeStorageMigrate.service
+ systemctl enable onlyofficeStorageEncryption.service
+ systemctl enable onlyofficeUrlShortener.service
+ systemctl enable onlyofficeThumbnailBuilder.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
+ '[' -n '' ']'
+ rm -dfr /tmp/onlyofficeBackup /tmp/onlyofficeFeed /tmp/onlyofficeIndex /tmp/onlyofficeJabber /tmp/onlyofficeMailAggregator /tmp/onlyofficeMailWatchdog /tmp/onlyofficeNotify /tmp/onlyofficeRadicale /tmp/onlyofficeSocketIO /tmp/onlyofficeSsoAuth /tmp/onlyofficeStorageEncryption /tmp/onlyofficeStorageMigrate /tmp/onlyofficeTelegram /tmp/onlyoffice-temp-aspnet-0 /tmp/onlyofficeThumb /tmp/onlyofficeThumbnailBuilder /tmp/onlyofficeUrlShortener
+ rm -dfr '/var/run/onlyoffice/*'
+ rm -dfr '/var/cache/nginx/onlyoffice/*'
+ '[' true == true ']'
+ exec /lib/systemd/systemd
Seems that your host machine not support systemd. What type of host OS are you using? It's running in WSL?
Seems that your host machine not support systemd. What type of host OS are you using? It's running in WSL?
Hi dear i used centos but i run your script and machine crated via docker
My Main Machine
[root@portal ~]# uname -a
Linux xxxx 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Container Machine
root@294f2ad8c4f1:/# uname -a
Linux 294f2ad8c4f1 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Please describe more details about your machine, where it hosted? It's physical server or virtual? And cat /etc/centos-release
.
cat /etc/centos-release
its work on this server fine before i updated
This is virtual machine via esxi
[root@portal ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
but the container is debian not centos
in container machine :
root@294f2ad8c4f1:/# /lib/systemd/systemd
Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
Thanks
i run manually root@294f2ad8c4f1:/app# ./run-community-server.sh
+ 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
+ '[' -n '' ']'
+ rm -dfr /tmp/onlyofficeFeed /tmp/onlyofficeJabber /tmp/onlyofficeMailWatchdog /tmp/onlyofficeSsoAuth /tmp/onlyofficeTelegram /tmp/onlyoffice-temp-aspnet-0
+ rm -dfr '/var/run/onlyoffice/*'
+ rm -dfr '/var/cache/nginx/onlyoffice/*'
+ '[' true == true ']'
+ exec /lib/systemd/systemd
Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
The problem is that your host machine does not support systemd, so the docker container does not have it either. In one of the recent versions, we completely switched to the systemctl instead of the services. Try it on the host machine systemctl --version
and if you don't have it installed, try to install it according to this instruction.
systemctl --version
i have systemd in main machine
[root@portal ~]# systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
[root@portal ~]# uname -a
Linux xxxx 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@portal ~]#
and even in docker container is
root@294f2ad8c4f1:/# systemctl --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid
Try in docker container systemctl start monoserve
and systemctl status monoserve
.
systemctl status monoserve
root@294f2ad8c4f1:/# systemctl start monoserve root@294f2ad8c4f1:/# systemctl status monoserve ● monoserve.service - FastCGI Mono server Loaded: loaded (/lib/systemd/system/monoserve.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-07-30 16:47:14 UTC; 8min ago Process: 857 ExecStartPre=/bin/bash -c test -e /var/run/onlyoffice || install -m 755 -o onlyoffice -g nginx -d /var/run/onlyoffice; rm -f /var/run/onlyoffice/onlyoffi ce.socket /var/www/onlyoffice/WebStudio/mono_crash /var/www/onlyoffice/WebStudio/core.; (code=exited, status=0/SUCCESS) Main PID: 864 (mono) Tasks: 49 (limit: 614) CGroup: /system.slice/docker-294f2ad8c4f1194dab64a9cbe0574b1f059dc072b027f24362544ad4a75a605f.scope/system.slice/monoserve.service └─864 /usr/bin/mono /usr/lib/hyperfastcgi/4.0/HyperFastCgi.exe /config=/etc/hyperfastcgi/onlyoffice /logfile=/var/log/onlyoffice/onlyoffice.log /loglevels=Er ror
Jul 30 16:50:54 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:50:54 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:50:54 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:52:44 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:52:44 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:52:44 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:54:34 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 15. Jul 30 16:54:34 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 5. Jul 30 16:54:34 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 5. Jul 30 16:54:34 294f2ad8c4f1 hyperfastcgi4[864]: libev.c:319: cmd_error(): Remote host disconnected from fd 5.
when i remove all container and created again why happen this problem ?
I think the problem is in your host machine, so it repeats after re-creating the containers. Try this one more systemctl status nginx
and systemctl start nginx
.
I think the problem is in your host machine, so it repeats after re-creating the containers. Try this one more
systemctl status nginx
andsystemctl start nginx
.
systemctl status nginx
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-07-30 17:23:32 UTC; 43s ago
Docs: https://nginx.org/en/docs/
Process: 598 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 634 (nginx)
Tasks: 9 (limit: 614)
CGroup: /system.slice/docker-294f2ad8c4f1194dab64a9cbe0574b1f059dc072b027f24362544ad4a75a605f.scope/system.slice/nginx.service
├─634 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
├─636 nginx: worker process
├─637 nginx: worker process
├─638 nginx: worker process
├─639 nginx: worker process
├─640 nginx: worker process
├─641 nginx: worker process
├─642 nginx: cache manager process
└─643 nginx: cache loader process
Jul 30 17:23:32 294f2ad8c4f1 systemd[1]: Starting nginx - high performance web server...
Jul 30 17:23:32 294f2ad8c4f1 systemd[1]: Started nginx - high performance web server.
dear this machine worked a day ago when update have this problem occurred and i remove container and created again why must happened with docker
i run again
docker stop 294f2ad8c4f1 b763882b3c49 e4d6d8297c83 75533de300fd
docker rm 294f2ad8c4f1 b763882b3c49 e4d6d8297c83 75533de300fd
docker ps
cd /root/
rm workspace-install.sh
wget https://download.onlyoffice.com/install/workspace-install.sh
chmod 777 workspace-install.sh
./workspace-install.sh
docker ps
docker logs aacc1c3feebc
again have same problem can one one help me
Seems nginx is started, and you cannot connect on the web? What browser is showing in this case?
dear this machine worked a day ago when update have this problem occurred and i remove container and created again why must happened with docker
Because in one of the latest version we moved from services to systemctl, which is why everything broke after the update.I think so. Maybe try to install previous version of community server with -cv
parameter for script. Versions you can find in https://hub.docker.com/repository/docker/onlyoffice/communityserver.
And you don't need to give our script 777 permissions :)
Seems nginx is started, and you cannot connect on the web? What browser is showing in this case?
dear this machine worked a day ago when update have this problem occurred and i remove container and created again why must happened with docker
Because in one of the latest version we moved from services to systemctl, which is why everything broke after the update.I think so. Maybe try to install previous version of community server with
-cv
parameter for script. Versions you can find in https://hub.docker.com/repository/docker/onlyoffice/communityserver.And you don't need to give our script 777 permissions :)
hi i remove and run again container now with this command
docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server-new -p 80:80 -p 443:443 -p 5222:5222 \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
-e MYSQL_SERVER_USER=onlyoffice_user \
-e MYSQL_SERVER_PASS=onlyoffice_pass \
-e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
-e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
-e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
-e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
-e MAIL_SERVER_DB_PORT=3306 \
-e MAIL_SERVER_DB_USER=root \
-e MAIL_SERVER_DB_PASS=my-secret-pw \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
onlyoffice/communityserver
but now have this error show
+ exec /lib/systemd/systemd
Failed to mount tmpfs at /run: Operation not permitted
Failed to mount tmpfs at /run/lock: Operation not permitted
[!!!!!!] Failed to mount API filesystems, freezing.
Freezing execution.
but now have this error show
+ exec /lib/systemd/systemd Failed to mount tmpfs at /run: Operation not permitted Failed to mount tmpfs at /run/lock: Operation not permitted [!!!!!!] Failed to mount API filesystems, freezing. Freezing execution.
You need to add flag --privileged
to docker run command, see instructions on this repo.
Hello @Carazyda
i have exactly the same problem like the other guys before. I have fresh pulled/deployed onlyoffice docker containers, but the "onlyoffice-community-server" crash after a few seconds after (re)starting.
I run a current debian 11.1 with systemd - a lot of containers from other distributors works very well.
If you need more information for debugging, let me know.
Hello @mhensel-dev yes, we have a problem on the Debian 11 bullseye (Bug 53124 in our private bugtracker). And this bug is not related to this issue.
Carazyda, I personally know several of the folks posting here and let me tell you THEY ARE following YOUR instructions. We (4 very experienced IT guys) have tried every one of your methods (Windows Server, Ubuntu, Docker, you name it) and they all have something broken in them.
I have basically attempted most the of installation guides and they all fail. The script is broken, otherwise the installation should complete successfully on a clean Ubuntu Server. The Win installation fails half-way on Win Server 2016 and 2022. The docker installation fails in mounting the volume (API filesystems freezing)
Hello @gamernetworks I am very sorry that you are facing such problems. We are constantly working on our mistakes and trying to keep all installation methods in working order. Let's deal with each of your problems separately - create new issues. I can say for sure that debian11 and Windows server 2022 are not yet supported, we will fix this in the next releases.
Hi we are running debian 11 and having this restarting issue any update when this will be fixed? Thanks
Hey @vwidmer, we'll fix this in the next release this spring.
Installation on Debian 11 is already fixed.
Installation on Windows Server 2022 will be fixed with release 12.0.
Close this issue.
Please reopen, as it has not been fixed yet. The "fixes" I find, are making a less secure environment where the docker can take over the host with ease.
For the correct operation of our application, in particular systemd, we need just such fixes. Do you have any other suggestions?
Yes. I found a solution, but it is some work. Can be done in 1 or 2 days I guess.
/usr/sbin/nginx -g "daemon off;"
. So Jabber gets its own docker. As there are so many "convenience scripts" around, it is quite difficult to simplify it.
Yes you are right. These are good and correct suggestions. All of them are considered in our new product. For the community server, no such changes are planned in the near future.
I'm not really following. Will community-server be left as-is?
Currently our server is completely offline due to this problem (we went back to NextCloud). :( This does not give the right impression to convince the team at my company to ever go for the ee-version...
I'm happy to contribute, but since I need to overhaul quite some configs+scripts, I do need help with insights on why certain things are done in a certain way. If you want to help, I can be finished within 2 weeks. I've just forked to https://github.com/VincentSC/Docker-CommunityServer
No, community server development will continue. In the new version, which will be released very soon, some changes will be made. For example, in the docker image, we raised the version of ubuntu to 22.04. I suggest you wait for the new version, and then create a pull request with your changes, or open new issues with specific questions-suggestions.
If you want me to beta-test - the system is offline anyway
I saw the other branch and tested it. I had to add apt install dotnet-sdk-6.0
to make it start. Last lines of community-server log:
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
So I put in the sysctl+docker hotfix:
RUN git clone https://github.com/gdraheim/docker-systemctl-replacement /opt/systemctl-github && \
rm -f /usr/bin/systemctl && \
rm -f /bin/systemctl && \
chmod +x /opt/systemctl-github/files/docker/systemctl3.py && \
ln -s /opt/systemctl-github/files/docker/systemctl3.py /usr/bin/systemctl
(and apt install python3 git
)
... but that needs more work:
...
+ systemctl daemon-reload
ERROR:systemctl: getty-static.service: Service Executable path is not absolute.
ERROR:systemctl: initrd-cleanup.service: Service Executable path is not absolute.
ERROR:systemctl: initrd-parse-etc.service: Service Executable path is not absolute.
ERROR:systemctl: initrd-switch-root.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-ask-password-console.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-ask-password-wall.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-boot-system-token.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-exit.service: a .service file without [Service] section
ERROR:systemctl: systemd-halt.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-journal-flush.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-journal-flush.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-kexec.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-machine-id-commit.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-networkd.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-poweroff.service: a .service file without [Service] section
ERROR:systemctl: systemd-reboot.service: a .service file without [Service] section
ERROR:systemctl: systemd-sysext.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-sysext.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-sysusers.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-tmpfiles-clean.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-tmpfiles-setup-dev.service: Service Executable path is not absolute.
ERROR:systemctl: systemd-tmpfiles-setup.service: Service Executable path is not absolute.
+ systemctl enable elasticsearch.service
+ '[' -n '' ']'
+ rm -dfr '/tmp/onlyoffice*'
+ rm -dfr '/var/run/onlyoffice/*'
+ rm -dfr '/var/cache/nginx/onlyoffice/*'
+ '[' true == true ']'
+ exec /usr/bin/systemctl
god[1008]: Syslog enabled.
god[1009]: Loading /etc/god/god.conf
god[1009]: Using pid file directory: /var/run/god
This looks like what is discussed in https://github.com/gdraheim/docker-systemctl-replacement/issues/155 - but the suggestions don't help.
IMO, if that docker-systemctl-replacement can be used, then most problems can be solved.
again in ubuntu, start by the docker-compose.workspace.yml
docker ps
docker ps -a
docker logs onlyoffice-community-server
Hi when i update manually in control panel onlyoffice/communityserver to new verision have this problem and docker pending in restart please help me
Thanks