То есть висят исходящие письма в очереди вечно.
При этом в логах daemon жалуется на отсутствие возможности подключиться к БД через сокет (ERROR: OTRS-otrs.Daemon.pl Can't connect to local MySQL server through socket).
Это при том, что возможность-то у него такая точно есть.
Подскажите, что за беда и как побороть её?
В логах демона вот такая вот фигня:
Код: Выделить всё
////////////////////////////////////////
// SchedulerTaskWorkerERR-1540298716.log
////////////////////////////////////////
[Tue Oct 23 15:45:06 2018] otrs.Daemon.pl: DBI connect('database=otrs_production;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock','otrs',...) failed: Can't connect to local My$
ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker-33 Perl: 5.16.3 OS: linux Time: Tue Oct 23 15:45:06 2018
Message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Traceback (3185):
Module: Kernel::System::DB::Ping Line: 1782
Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::PreRun Line: 122
Module: (eval) Line: 314
Module: main::Start Line: 314
Module: /opt/otrs//bin/otrs.Daemon.pl Line: 135
Код: Выделить всё
////////////////////////////////////////////////////
//SchedulerGenericAgentTaskManagerERR-1540298712.log
////////////////////////////////////////////////////
[Tue Oct 23 15:45:01 2018] otrs.Daemon.pl: DBI connect('database=otrs_production;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock','otrs',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /opt/otrs/Kernel/System/DB.pm line 204.
ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerGenericAgentTaskManager-33 Perl: 5.16.3 OS: linux Time: Tue Oct 23 15:45:01 2018
Message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Traceback (2902):
Module: Kernel::System::DB::Ping Line: 1782
Module: Kernel::System::Daemon::DaemonModules::SchedulerGenericAgentTaskManager::PreRun Line: 90
Module: (eval) Line: 314
Module: main::Start Line: 314
Module: /opt/otrs//bin/otrs.Daemon.pl Line: 135
Код: Выделить всё
[otrs@otrs otrs]$ bin/otrs.Console.pl Maint::Database::Check
Trying to connect to database 'DBI:mysql:database=otrs_production;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock' with user 'otrs'...
Connection successful.
Пароль от БД в конфиге правильный: веб-фронт работает и руками из командной строки тоже нормально все коннектится посредством mysql -u otrs -p.
mariadb при этом запущена. Вот такие наши доказательства:
Код: Выделить всё
[root@otrs my.cnf.d]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2018-10-23 15:45:09 MSK; 1h 9min ago
Process: 2941 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 2910 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 2940 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─2940 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─3138 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mar...
Oct 23 15:45:02 otrs.exprem.dom systemd[1]: Starting MariaDB database server...
Oct 23 15:45:02 otrs.exprem.dom mariadb-prepare-db-dir[2910]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Oct 23 15:45:02 otrs.exprem.dom mariadb-prepare-db-dir[2910]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Oct 23 15:45:02 otrs.exprem.dom mysqld_safe[2940]: 181023 15:45:02 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Oct 23 15:45:02 otrs.exprem.dom mysqld_safe[2940]: 181023 15:45:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Oct 23 15:45:09 otrs.exprem.dom systemd[1]: Started MariaDB database server.
Код: Выделить всё
[root@otrs my.cnf.d]# ps -ax | grep 'mysql'
2940 ? Ss 0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
3138 ? Sl 0:13 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
7344 pts/0 S+ 0:00 grep --color=auto mysql
Код: Выделить всё
[root@otrs my.cnf.d]# cat /etc/my.cnf.d/zotrs.cnf
[mysqld]
max_allowed_packet = 64M
query_cache_size = 64M
innodb_log_file_size = 128M
Код: Выделить всё
[root@otrs my.cnf.d]# uname -a
Linux otrs.exprem.dom 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@otrs my.cnf.d]# httpd -version
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 20 2018 18:10:38
[root@otrs my.cnf.d]# mysql --version
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
[root@otrs my.cnf.d]# perl --version
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 33 registered patches, see perl -V for more detail)
машина - виртуальный хост на vmware vsphere