juanluisbaptiste / docker-otrs

The unofficial Znuny/OTRS Ticketing System docker image
https://www.juanbaptiste.tech/category/otrs
GNU Lesser General Public License v3.0
172 stars 101 forks source link

Services not starting after Backup #94

Closed Patrick-L closed 4 years ago

Patrick-L commented 4 years ago

Hi! :-)

Reporting a bug The docker image is running great by now, but unfortunately I have the following problem, which I assume is due to the backup process because of the timing.

Image and OTRS versions The version is 6.0.28 and a relatively fresh installation.

Describe the issue At 6am precisely, all processes are shut down, but don't come back after that, so that OTRS is no longer available.

No messages available for sending.
Done.

No indexing needed! Skipping...
Done.
Jun 13 06:00:01 c3ee61f595e6 CROND[5840]: (root) CMD (. /.backup.env; /otrs_backup.sh)
Jun 13 06:00:01 c3ee61f595e6 CROND[5841]: (otrs) CMD ($HOME/bin/otrs.Daemon.pl start >> /dev/null)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mOTRS_DB_NAME#033[0m not set, setting value to #033[31motrs#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mOTRS_DB_USER#033[0m not set, setting value to #033[31motrs#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mDOTRS_DB_HOST#033[0m not set, setting value to #033[31mmariadb#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mOTRS_DB_PORT#033[0m not set, setting value to #033[31m3306#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mMYSQL_ROOT_PASSWORD#033[0m not set, setting password to #033[31mchangeme#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mMYSQL_ROOT_USER#033[0m not set, setting user to #033[31mroot#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mSetting OTRS_CRON_BACKUP_SCRIPT#033[0m to #033[31m/etc/cron.d/otrs_backup#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m #033[38;5;31mSetting OTRS_ARTICLE_STORAGE_TYPE#033[0m to #033[31mArticleStorageDB#033[0m)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT ([2020-06-13_06-00] Starting OTRS backup for host aufgaben.fl-team.info...)
Jun 13 06:00:01 c3ee61f595e6 CROND[5838]: (root) CMDOUT (#033[46m[INFO]#033[0m Stopping all OTRS services...)
2020-06-13 06:00:01,786 INFO waiting for httpd to stop
2020-06-13 06:00:01,787 INFO waiting for crond to stop
2020-06-13 06:00:01,787 INFO waiting for rsyslog to stop
2020-06-13 06:00:01,798 INFO stopped: rsyslog (exit status 0)
2020-06-13 06:00:01,800 INFO stopped: crond (exit status 0)
[Sat Jun 13 06:00:02.157511 2020] [mpm_prefork:notice] [pid 87] AH00169: caught SIGTERM, shutting down
2020-06-13 06:00:02,269 INFO stopped: httpd (exit status 0)

Expected behavior The backup should be performed and the services should be restarted afterwards.

Docker-Compose

version: '3'

services:
  otrs:
    build: ./build/.
    ports:
    - "8087:80"
    links:
    - mariadb:mariadb
    - postfix:postfix
    env_file: .env
    volumes:
      - './volumes/config:/opt/otrs/Kernel'
      - './volumes/skins:/opt/otrs/var/httpd/htdocs/skins/'
      - './volumes/backup:/var/otrs/backups'
      - './volumes/addons:/opt/otrs/addons'
      - './volumes/db_upgrade:/opt/otrs/db_upgrade'
      - '/etc/localtime:/etc/localtime:ro'
  mariadb:
    image: juanluisbaptiste/otrs-mariadb:latest
    expose:
    - "3306"
    env_file: .env
    volumes:
      - './volumes/mysql:/var/lib/mysql'
      - '/etc/localtime:/etc/localtime:ro'
  postfix:
     image: juanluisbaptiste/postfix:latest
     expose:
     - "25"
     env_file: .env

Dockerfile

FROM juanluisbaptiste/otrs:6.0.28
LABEL maintainer='XX'
juanluisbaptiste commented 4 years ago

Hi,

When running the backup process all services are stopped before running the backup process and then restarted. I just tested the latest image and they are working fine:

otrs_1     | Jun 13 13:32:01 3c4d1c6156e1 CROND[139]: (root) CMDOUT ([2020-06-13_13-32] Starting OTRS backup for host support.apukay.com...)
otrs_1     | Jun 13 13:32:01 3c4d1c6156e1 CROND[139]: (root) CMDOUT (#033[46m[INFO]#033[0m Stopping all OTRS services...)
otrs_1     | 2020-06-13 13:32:02,015 INFO waiting for httpd to stop
otrs_1     | 2020-06-13 13:32:02,015 INFO waiting for crond to stop
otrs_1     | 2020-06-13 13:32:02,015 INFO waiting for rsyslog to stop
otrs_1     | 2020-06-13 13:32:02,019 INFO stopped: crond (exit status 0)
otrs_1     | 2020-06-13 13:32:02,026 INFO stopped: rsyslog (exit status 0)
otrs_1     | [Sat Jun 13 13:32:02.032104 2020] [mpm_prefork:notice] [pid 113] AH00169: caught SIGTERM, shutting down
otrs_1     | 2020-06-13 13:32:02,084 INFO stopped: httpd (exit status 0)
otrs_1     | 2020-06-13 13:32:10,546 INFO spawned: 'httpd' with pid 172
otrs_1     | 2020-06-13 13:32:10,548 INFO spawned: 'crond' with pid 173
otrs_1     | 2020-06-13 13:32:10,551 INFO spawned: 'rsyslog' with pid 174
otrs_1     | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
otrs_1     | [Sat Jun 13 13:32:10.783100 2020] [suexec:notice] [pid 172] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
otrs_1     | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
otrs_1     | [Sat Jun 13 13:32:11.071801 2020] [lbmethod_heartbeat:notice] [pid 172] AH02282: No slotmem from mod_heartmonitor
otrs_1     | [Sat Jun 13 13:32:11.077185 2020] [mpm_prefork:notice] [pid 172] AH00163: Apache/2.4.6 (CentOS) mod_perl/2.0.11 Perl/v5.16.3 configured -- resuming normal operations
otrs_1     | [Sat Jun 13 13:32:11.077211 2020] [core:notice] [pid 172] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
otrs_1     | 2020-06-13 13:32:12,078 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1     | 2020-06-13 13:32:12,078 INFO success: crond entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1     | 2020-06-13 13:32:12,078 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1     | Jun 13 13:32:12 3c4d1c6156e1 CROND[139]: (root) CMDOUT (httpd: started)
otrs_1     | Jun 13 13:32:12 3c4d1c6156e1 CROND[139]: (root) CMDOUT (crond: started)
otrs_1     | Jun 13 13:32:12 3c4d1c6156e1 CROND[139]: (root) CMDOUT (rsyslog: started)
Patrick-L commented 4 years ago

Okay good to hear. But can you maybe guide me what I am missing? Besides some test tickets there is not much in the system (so no special config or something regarding the backup). If you need anything as information please let me know. Thanks!

juanluisbaptiste commented 4 years ago

I don't know, your .env file and docker-compose files looks ok. Try removing all of your volumes to start with a clean setup and try again.

juanluisbaptiste commented 4 years ago

@Patrick-L Did you find out the issue ?

drbogar commented 4 months ago

I have the same problem. It just started, even though I didn't change anything in the settings.