• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Plesk Repair Installation command fails

EmilioO

Basic Pleskian
Plesk reapair installation command fails. Output shows unable to connect to mysql through socket.
Enviroment:
Ubuntu 18.04
Plesk Obsidian 18.0.37 MU2
psa.conf: MYSQL_SOCKET /var/run/mysqld/mysqld.sock
my.cnf : socket = /var/run/mysqld/mysqld.sock

Commands as Plesk db , o Plesk repair mysql works perfect, without errors.

PLESK REPAIR VERBOSE :
Code:
Reconfiguring the Plesk installation
 

**** Product repair started.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

 Trying to start service mysql... done
 Trying to establish test connection... connected
done
 Trying to find psa database... version is 018000000
 Trying to backup MySQL database... done
 MySQL databases are dumped to /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131117.dump.gz
 Finishing up upgrade procedures and rerunning previously failed upgrade actions...
 Trying to add supplementary group 'lock-manager' for user 'psaadm'...  already there
 Trying to set up APS controller database...
ERROR while trying to create database for APS controller

Check the error reason (see log file: /var/log/plesk/install/plesk_18.0.37_repair.log), fix and try again

===> Restoring database from backup /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131117.dump.gz


gzip: stdout: Broken pipe

    [ERROR] Database restoring failed
    Try to restore database from /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131117.dump.gz manually


**** Product repair failed.

*****  problem report *****
ERROR while trying to create database for APS controller

exit status 1

PLESK REPAIR WITOUTH VERBOSSE OPTION

Code:
Reconfiguring the Plesk installation
 
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

 Finishing up upgrade procedures and rerunning previously failed upgrade actions...

**** Product repair started.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

 Trying to start service mysql... active
done
 Trying to establish test connection... connected
done
 Trying to find psa database... version is 018000000
 Trying to backup MySQL database... done
 MySQL databases are dumped to /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131216.dump.gz
 Finishing up upgrade procedures and rerunning previously failed upgrade actions...
 Trying to add supplementary group 'lock-manager' for user 'psaadm'...  already there
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 Trying to set up APS controller database... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
...(THIS ERROR SHOWS MORE TIMES BUT TRIMMED THE OUTPUT BECAUSE FORUM LIMITATIONS CHARS.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

ERROR while trying to create database for APS controller

Check the error reason (see log file: /var/log/plesk/install/plesk_18.0.37_repair.log), fix and try again

gzip: stdout: Broken pipe
*****  problem report *****
ERROR while trying to create database for APS controller

exit status 1
 
"Check the error reason (see log file: /var/log/plesk/install/plesk_18.0.37_repair.log)"

What is the error reason according to the log file mentioned?
 
same.
Code:
**** Product repair started.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

 Trying to start service mysql... active
done
 Trying to establish test connection... connected
done
 Trying to find psa database... version is 018000000
 Trying to backup MySQL database... done
 MySQL databases are dumped to /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131216.dump.gz
 Finishing up upgrade procedures and rerunning previously failed upgrade actions...
 Trying to add supplementary group 'lock-manager' for user 'psaadm'...  already there
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 Trying to set up APS controller database... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
....
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

ERROR while trying to create database for APS controller


===> Restoring database from backup /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131216.dump.gz

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    [ERROR] Database restoring failed
    Try to restore database from /media/2TB/backups/dumps/mysql.preupgrade.18.0.37-18.0.37.20210822-131216.dump.gz manually


**** Product repair failed.

*****  problem report *****
ERROR while trying to create database for APS controller
STOP Bootstrapper 18.0.37 repair AT Sun Aug 22 13:12:23 CEST 2021
 
Please check
# grep mysql /var/log/messages
for MySQL or MariaDB error messages. There should be more than just that a service cannot connect.

In addition, do you see any messages regarding max open file limits?
 
there is no entry of mysql on /var/log/messages or /var/log/syslog.
I've an /var/log/mysql/error.log enabled.
I've empty it rerun Plesk repair installation , this is the output:
Code:
2021-08-22T20:01:18.481561Z 219153 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2021-08-22T20:01:18.487907Z 219154 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2021-08-22T20:01:18.496197Z 219155 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2021-08-22T20:01:18.500898Z 219156 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2021-08-22T20:01:18.521509Z 0 [Note] Giving 22 client threads a chance to die gracefully
2021-08-22T20:01:18.521562Z 0 [Note] Shutting down slave threads
2021-08-22T20:01:20.521640Z 0 [Note] Forcefully disconnecting 20 remaining clients
2021-08-22T20:01:20.521701Z 0 [Warning] /usr/sbin/mysqld: Forcing close of thread 187248  user: 'XXX'
...

2021-08-22T20:01:20.522591Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2021-08-22T20:01:20.524649Z 0 [Note] Binlog end
2021-08-22T20:01:20.670603Z 0 [Note] Shutting down plugin 'ngram'
2021-08-22T20:01:20.670621Z 0 [Note] Shutting down plugin 'partition'
2021-08-22T20:01:20.670625Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2021-08-22T20:01:20.670629Z 0 [Note] Shutting down plugin 'ARCHIVE'
2021-08-22T20:01:20.670632Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2021-08-22T20:01:20.670654Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2021-08-22T20:01:20.670657Z 0 [Note] Shutting down plugin 'MyISAM'
2021-08-22T20:01:20.670663Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2021-08-22T20:01:20.670666Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2021-08-22T20:01:20.670669Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2021-08-22T20:01:20.670671Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2021-08-22T20:01:20.670674Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2021-08-22T20:01:20.670676Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2021-08-22T20:01:20.670679Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2021-08-22T20:01:20.670682Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2021-08-22T20:01:20.670684Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2021-08-22T20:01:20.670701Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2021-08-22T20:01:20.670704Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2021-08-22T20:01:20.670707Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2021-08-22T20:01:20.670710Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2021-08-22T20:01:20.670712Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2021-08-22T20:01:20.670715Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2021-08-22T20:01:20.670717Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2021-08-22T20:01:20.670720Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2021-08-22T20:01:20.670723Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2021-08-22T20:01:20.670725Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2021-08-22T20:01:20.670728Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2021-08-22T20:01:20.670730Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2021-08-22T20:01:20.670733Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2021-08-22T20:01:20.670735Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2021-08-22T20:01:20.670738Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2021-08-22T20:01:20.670741Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2021-08-22T20:01:20.670743Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2021-08-22T20:01:20.670746Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2021-08-22T20:01:20.670748Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2021-08-22T20:01:20.670751Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2021-08-22T20:01:20.670753Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2021-08-22T20:01:20.670756Z 0 [Note] Shutting down plugin 'InnoDB'
2021-08-22T20:01:20.673002Z 0 [Note] InnoDB: FTS optimize thread exiting.
2021-08-22T20:01:20.673078Z 0 [Note] InnoDB: Starting shutdown...
2021-08-22T20:01:20.773281Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2021-08-22T20:01:20.779489Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 210822 22:01:20
2021-08-22T20:01:23.958848Z 0 [Note] InnoDB: Shutdown completed; log sequence number 7574832169
2021-08-22T20:01:23.960574Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-08-22T20:01:23.960585Z 0 [Note] Shutting down plugin 'MEMORY'
2021-08-22T20:01:23.960616Z 0 [Note] Shutting down plugin 'CSV'
2021-08-22T20:01:23.960621Z 0 [Note] Shutting down plugin 'sha256_password'
2021-08-22T20:01:23.960624Z 0 [Note] Shutting down plugin 'mysql_native_password'
2021-08-22T20:01:23.960730Z 0 [Note] Shutting down plugin 'binlog'
2021-08-22T20:01:23.963919Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2021-08-22T20:01:24.447626Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-08-22T20:01:24.449089Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.35-0ubuntu0.18.04.1) starting as process 29113 ...
2021-08-22T20:01:24.452437Z 0 [Note] InnoDB: PUNCH HOLE support available
2021-08-22T20:01:24.452456Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-08-22T20:01:24.452460Z 0 [Note] InnoDB: Uses event mutexes
2021-08-22T20:01:24.452464Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-08-22T20:01:24.452468Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-22T20:01:24.452473Z 0 [Note] InnoDB: Using Linux native AIO
2021-08-22T20:01:24.453248Z 0 [Note] InnoDB: Number of pools: 1
2021-08-22T20:01:24.453338Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-08-22T20:01:24.454689Z 0 [Note] InnoDB: Initializing buffer pool, total size = 8G, instances = 8, chunk size = 128M
2021-08-22T20:01:24.877235Z 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-22T20:01:24.956168Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-08-22T20:01:24.968078Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2021-08-22T20:01:25.448744Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-22T20:01:25.448840Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-22T20:01:25.508724Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-08-22T20:01:25.509973Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2021-08-22T20:01:25.509988Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2021-08-22T20:01:25.510312Z 0 [Note] InnoDB: Waiting for purge to start
2021-08-22T20:01:25.560508Z 0 [Note] InnoDB: 5.7.35 started; log sequence number 7574832169
2021-08-22T20:01:25.560832Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-08-22T20:01:25.561092Z 0 [Note] Plugin 'FEDERATED' is disabled.
2021-08-22T20:01:25.568050Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2021-08-22T20:01:25.568076Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2021-08-22T20:01:25.568082Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2021-08-22T20:01:25.568087Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2021-08-22T20:01:25.568769Z 0 [Warning] CA certificate ca.pem is self signed.
2021-08-22T20:01:25.568809Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2021-08-22T20:01:25.568915Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2021-08-22T20:01:25.568966Z 0 [Note] IPv6 is available.
2021-08-22T20:01:25.568976Z 0 [Note]   - '::' resolves to '::';
2021-08-22T20:01:25.568993Z 0 [Note] Server socket created on IP: '::'.
2021-08-22T20:01:25.578463Z 0 [Note] Event Scheduler: Loaded 0 events
2021-08-22T20:01:25.578655Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.35-0ubuntu0.18.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
2021-08-22T20:01:29.765194Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210822 22:01:29

It's seems Plesk repair installation restarts mysql for some reason, maybe MySQL is'nt started up when throughts socket error ?
 
I think there can be at least three problems on the server:

a) Not enough disk space. The "gzip: stdout: Broken pipe" is a symptom for that. Have you checked the directory where the mysql data is located that it has enough free space?
--> Free space on the drive.

b) Many break-in attempts to your MySQL service that use up the maximum number of allowed connections to it so that it leaves no room for more connections (for the Plesk installation routine). The "Access denied for user 'root'@'localhost' (using password: NO)" lines in your log are a symptom for this.
--> View the "threads_connected" variable in MySQL, e.g. "SHOW VARIABLES LIKE 'threads_connected';", then adapt the /etc/my.cnf configuration with the variable max_connections to a higher value and restart MySQL.

c) A general lack of resources, e.g. disk access handles. This can normally occur on small virtual servers.
--> Increase the system's resources.
 
--> Free space on the drive.
I've problems of space (I'm rising max size of /var partition) but at the moment of error I've 18G of free space, I think It's enough to run the command.
--> View the "threads_connected
running show status LIKE 'threads_connected' (your query gives me an empty result) multiple times gives me values between 20 and 30.
max_connections var is setup at 2000.
--> Increase the system's resources.
Servers is bare metal hardware with xeon 4c/8t , 64GB RAM and SSD disks on /var partition

I think there something more in this error because command has work in the past, and other repair commands works without error, also Plesk db.
PS: I' will try rebooting system.

thanks for you help.
 
Back
Top