Eu instalei o servidor headless do Ubuntu 14.04 ontem. A única coisa, nesse ponto, que instalei foi ssh. Atualizei o servidor e instalei o Plesk com seu script de instalação automatizado.
Este é um servidor virtual em execução no hyper-v. Eu tenho 12 núcleos, ram de 16GB e um hd de 500GB de largura.
Eu acessei o site sem problemas. Eu ainda não tenho um certificado SSL válido, pois não cheguei tão longe. Eu então instalei a licença para o Plesk. Fiz uma pequena espionagem para ver como funciona e depois fui para a cama. Comecei esta manhã e o site não surgiu. Eu continuei recebendo conexão recusada quando tentei acessar o site. Eu li ao redor e ele disse para tentar isso para corrigir :
cd /var
sudo mkdir mysql
sudo chmod 755 mysql
cd mysql
sudo ln -s /tmp/mysql.sock mysql.sock
Isso me permitiu acessar o site. Quando tento fazer alguma coisa no site, recebo isso:
ERRO: PleskDBException: não é possível conectar-se ao banco de dados:
mysql_connect (): Nenhum arquivo ou diretório /var/run/mysqld/mysqld.sock
(Código de erro: 2002). Por favor, verifique se o servidor de banco de dados foi iniciado e
acessível. (Abstract.php: 69)
Eu verifiquei os logs em /var/log/mysql/error.log, o mysql.error foi zero bytes:
151126 10:59:24 mysqld_safe Number of processes running now: 0
151126 10:59:24 mysqld_safe mysqld restarted
151126 10:59:24 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
151126 10:59:24 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 3082 ...
151126 10:59:24 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
151126 10:59:24 [Note] Plugin 'FEDERATED' is disabled.
151126 10:59:24 InnoDB: The InnoDB memory heap is disabled
151126 10:59:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151126 10:59:24 InnoDB: Compressed tables use zlib 1.2.8
151126 10:59:24 InnoDB: Using Linux native AIO
151126 10:59:24 InnoDB: Initializing buffer pool, size = 128.0M
151126 10:59:24 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
151126 10:59:24 InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
Eu não fiz nenhuma alteração além do que afirmei acima. Alguém tem alguma sugestão de onde procurar ou o que fazer?
Informações adicionais:
[24-Nov-2015 20:23:38 America/Chicago] PHP Warning: chgrp(): Operation not permitted; File: /opt/psa/admin/plib/Plesk/Log.php, Line: 66
[2015-11-24 20:23:38] ERR [1] PHP Warning: chgrp(): Operation not permitted; File: /opt/psa/admin/plib/Plesk/Log.php, Line: 66
[2015-11-24 20:24:19] ERR [1] Module configs is not installed.
[2015-11-24 21:18:21] ERR [panel] [Action Log] Failed login attempt with login 'techguyalabama' from IP 50.2.213.12
[2015-11-24 21:18:28] ERR [panel] [Action Log] Failed login attempt with login 'admin' from IP 50.2.213.12
[2015-11-25 09:30:45] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/spammng' '--status'] with exit code [1]
[2015-11-25 09:30:45] ERR [1] '/opt/psa/admin/bin/spammng' '--status' failed with code 1.
stdout:
stderr:
ERROR:spammng:[Errno 2] No such file or directory: '/etc/default/spamassassin'
[2015-11-25 12:49:51] ERR [panel] [Action Log] Failed login attempt with login '<invalid>' from IP 104.238.110.138
[2015-11-26 06:25:03] ERR [panel] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 10:27:18] ERR [panel] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/Session/Helper.php:150
Plesk\Session\Helper::initStorage()
2: /opt/psa/admin/plib/auth.php:325
AutoPrepend->initUserSession()
3: /opt/psa/admin/plib/auth.php:230
AutoPrepend->run()
4: /opt/psa/admin/plib/auth.php:759
[2015-11-26 10:27:18] ERR [1] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 10:51:37] ERR [panel] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/Session/Helper.php:150
Plesk\Session\Helper::initStorage()
2: /opt/psa/admin/plib/auth.php:325
AutoPrepend->initUserSession()
3: /opt/psa/admin/plib/auth.php:230
AutoPrepend->run()
4: /opt/psa/admin/plib/auth.php:759
[2015-11-26 10:51:37] ERR [1] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 10:59:31] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 10:59:32] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 10:59:32] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 10:59:32] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:08:57] ERR [panel] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/api-common/AbstractCu.php:1640
AbstractCu::initDb()
2: /opt/psa/admin/plib/api-common/AbstractCu.php:1666
AbstractCu::initCLI()
3: /opt/psa/admin/plib/scripts/setup-health-monitor.php:5
[2015-11-26 11:08:57] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:09:08] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:13:47] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:13:47] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:22:41] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:22:41] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:22:41] ERR [1] Unable to connect to database: /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:23:32] ERR [panel] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/Session/Helper.php:150
Plesk\Session\Helper::initStorage()
2: /opt/psa/admin/plib/auth.php:325
AutoPrepend->initUserSession()
3: /opt/psa/admin/plib/auth.php:230
AutoPrepend->run()
4: /opt/psa/admin/plib/auth.php:759
[2015-11-26 11:23:32] ERR [1] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:23:52] ERR [panel] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/Session/Helper.php:150
Plesk\Session\Helper::initStorage()
2: /opt/psa/admin/plib/auth.php:325
AutoPrepend->initUserSession()
3: /opt/psa/admin/plib/auth.php:230
AutoPrepend->run()
4: /opt/psa/admin/plib/auth.php:759
[2015-11-26 11:23:52] ERR [1] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:23:56] ERR [panel] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/Session/Helper.php:150
Plesk\Session\Helper::initStorage()
2: /opt/psa/admin/plib/auth.php:325
AutoPrepend->initUserSession()
3: /opt/psa/admin/plib/auth.php:230
AutoPrepend->run()
4: /opt/psa/admin/plib/auth.php:759
[2015-11-26 11:23:56] ERR [1] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
[2015-11-26 11:24:00] ERR [panel] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.:
0: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:69
CommonPanel_Application_Abstract::initDbAdapter()
1: /opt/psa/admin/plib/Session/Helper.php:150
Plesk\Session\Helper::initStorage()
2: /opt/psa/admin/plib/auth.php:325
AutoPrepend->initUserSession()
3: /opt/psa/admin/plib/auth.php:230
AutoPrepend->run()
4: /opt/psa/admin/plib/auth.php:759
[2015-11-26 11:24:00] ERR [1] Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible.
Um pouco mais de informação:
Pesquisado pelo mysqld.sock e mysql.sock:
> sudo find . -name mysqld.sock
> sudo find . -name mysql.sock
./var/mysql/mysql.sock
> sudo find . -name my.cnf
./etc/mysql/my.cnf
Verificou o my.cnf e tinha isto:
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
Este diretório está vazio: / var / run / mysqld
Não estou familiarizado com a configuração do MySql, mas imaginei que compartilharia isso ...