• 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 "tac: write error: Broken pipe" during daily plesk upgrade

floriancourgey

New Pleskian
Hi everyone,

We are using Plesk since mid 2016 to manage 10 websites on our VPS Cloud (OVH as hosting)

It works really good, thank you for providing such product

However, we are experiencing an issue since a few weeks

Everyday we have an alert on a red background which says "Failed to update Plesk. To solve this problem, you can send the update log to Plesk support"

By reading the log, I can tell it's a MySQL update issue

Here's the full output : Plesk 'tac: write error: Broken pipe' issue · GitHub

The interesting part is
'''
Starting xinetd service... already started
tac: write error: Broken pipe
***** problem report *****
===> Plesk database scheme was not upgraded completely. [...]
'''

Do you have any idea ?

Feel free if you need anymore info

Thanks
Florian

-- edit 1 --
$ plesk -v
Product version: Plesk Onyx 17.5.3
Build date: 2017/03/17 16:00
OS version: Ubuntu 16.04
Revision: 55d1b49a272f44666e1920eca8b6e4da449a38cd
Architecture: 64-bit
Wrapper version: 1.2

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

$ uname -a
Linux vpsXXXX.ovh.net 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since lun. 2017-11-27 06:26:39 CET; 13h ago
Process: 8785 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
Process: 8774 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 8784 (mysqld)
CGroup: /system.slice/mysql.service
└─8784 /usr/sbin/mysqld
 
Last edited:
Do you have any customizations of your /etc/my.cnf file? Especially lines like:

bind-address = 127.0.0.1

skip_name_resolve

symbolic-links=0

Please comment it if they are exists. Also I'd recommend you try to use official Plesk repositories instead of OVH mirror. Jut move out file /root/.autoinstallerrc and run installer again.
 
Something wrong with database upgrade:

Code:
===> Plesk database scheme upgrade has been started.
Applying migrations from: /opt/psa/bootstrapper/pp17.5.3-bootstrapper/migrations/
Migration failed: 17.5.0/2016-12-26-09-56-48_change_dates_default_value.php
Query failed: UPDATE `APSCatalogUpdates` SET `received` = '1970-01-01 00:00:00' WHERE `received` = '0000-00-00 00:00:00'
Incorrect datetime value: '0000-00-00 00:00:00' for column 'received' at row 1

Try to run

# plesk repair db

before upgrade.
On my test Plesk 17.5.3 server I see:

Code:
MariaDB [psa]> select * from APSCatalogUpdates;
Empty set (0.00 sec)

MariaDB [psa]> desc APSCatalogUpdates;
+-----------------+-------------------------+------+-----+---------------------+----------------+
| Field           | Type                    | Null | Key | Default             | Extra          |
+-----------------+-------------------------+------+-----+---------------------+----------------+
| id              | int(10) unsigned        | NO   | PRI | NULL                | auto_increment |
| package_name    | varchar(255)            | YES  |     | NULL                |                |
| package_version | varchar(30)             | YES  |     | NULL                |                |
| package_release | varchar(30)             | YES  |     | NULL                |                |
| update_name     | varchar(255)            | YES  |     | NULL                |                |
| update_version  | varchar(30)             | YES  |     | NULL                |                |
| update_release  | varchar(30)             | YES  |     | NULL                |                |
| update_vendor   | varchar(255)            | YES  |     | NULL                |                |
| update_packager | varchar(255)            | YES  |     | NULL                |                |
| received        | datetime                | YES  |     | 1970-01-01 00:00:00 |                |
| update_type     | enum('patch','upgrade') | NO   |     | patch               |                |
| recommended     | enum('false','true')    | NO   |     | false               |                |
+-----------------+-------------------------+------+-----+---------------------+----------------+
12 rows in set (0.00 sec)
 
Ok, I have 0000-00-00 as default for column 'received' :

Code:
mysql> use psa;

mysql> select * from APSCatalogUpdates;
Empty set (0,01 sec)

mysql> desc APSCatalogUpdates;
+-----------------+-------------------------+------+-----+---------------------+----------------+
| Field           | Type                    | Null | Key | Default             | Extra          |
+-----------------+-------------------------+------+-----+---------------------+----------------+
| id              | int(10) unsigned        | NO   | PRI | NULL                | auto_increment |
| package_name    | varchar(255)            | YES  |     | NULL                |                |
| package_version | varchar(30)             | YES  |     | NULL                |                |
| package_release | varchar(30)             | YES  |     | NULL                |                |
| update_name     | varchar(255)            | YES  |     | NULL                |                |
| update_version  | varchar(30)             | YES  |     | NULL                |                |
| update_release  | varchar(30)             | YES  |     | NULL                |                |
| update_vendor   | varchar(255)            | YES  |     | NULL                |                |
| update_packager | varchar(255)            | YES  |     | NULL                |                |
| received        | datetime                | YES  |     | 0000-00-00 00:00:00 |                |
| update_type     | enum('patch','upgrade') | NO   |     | patch               |                |
| recommended     | enum('true','false')    | NO   |     | false               |                |
+-----------------+-------------------------+------+-----+---------------------+----------------+
12 rows in set (0,00 sec)


I'll make the change tonight and let you know
Thanks
 
I did a plesk repair db, it updated 13 tables with datetime 0000-00... to 1970-... without any problem

But when I rerun plesk installer, it hangs at
Code:
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.20, use --force if you still need to run mysql_upgrade

same if I do
Code:
apt update
or
Code:
dpkg --configure -a

I wanted to do a full backup + full purge + clean install + restore backup of mysql (Upgrading to MySQL 5.7.15 crashes on Ubuntu 16.04) but I am unable to do so because plesk requires mysql server (
Code:
apt remove
fails).

Do you have any idea ?

Thanks
 
Do you have any errors/problems when you run command

# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`

?
 
Hi,

here's the ouptput :

Code:
# mysql_upgrade
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.20, use --force if you still need to run mysql_upgrade

Code:
# mysql_upgrade --force
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv                                 OK
[... every tables is OK ...]
Upgrade process completed successfully.
Checking if update is needed.

[it shuts down my mysql server so I run it again]

Code:
# service mysql restart
[OK]

Code:
# plesk installer
[forward forward forward..]

Preparing Your System for Product Installation
===============================================================================

There are 0 packages required for the product to function properly which
were not found in your system.

There are 57 packages that need to be upgraded
in order to install the product.


Available actions:
(F) Go forward
(B) Go back
(Q) Cancel installation
(S) Show the list of packages

Select an action [F/b/q/s]:
Installing packages
is running
Stopping sw_engine service... done
===> Cumulative APS controller database (apsc) upgrade has been started.
===> Cumulative upgrade of APS controller database has been completed.
===> Cumulative Plesk database upgrade (revertable stage) has been started.
===> Preparing Plesk database upgrade (revertable stage).
===> Cumulative upgrade of Plesk database (revertable stage) has been completed.
===> Plesk database scheme upgrade has been started.
Applying migrations from: /opt/psa/bootstrapper/pp17.5.3-bootstrapper/migrations/
===> Plesk database scheme upgrade has been completed.
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
Plesk is down, performing full restart.
Starting sw_engine service... done
Starting sw_cp_server service... already started
Starting mysql service... already started
Starting named service... already started
Starting mailer service... done
Starting spamfilter service... not installed
Starting drweb service... not installed
Starting tomcat service... not installed
Starting apache service... already started
Starting xinetd service... already started

ERROR: An error occurred on attempt to install packages.
Attention! Your software might be inoperable.
Please contact product technical support.
exit status 1

Code:
# dpkg --configure -a
Paramétrage de mysql-server-5.7 (5.7.20-0ubuntu0.16.04.1) ...
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.20, use --force if you still need to run mysql_upgrade

and then it hangs for more than 10 min so I do Ctrl-C

Code:
^C dpkg: erreur de traitement du paquet mysql-server-5.7 (--configure) :
 interruption du sous-processus script post-installation installé
Des erreurs ont été rencontrées pendant l'exécution :
 mysql-server-5.7

which translates into
Code:
^C dpkg: error while processing package mysql-server..
interruption of sub-process script post-install installed
Errors have been found during execution:
mysql-server

Do you have any idea ?
Thank you
 
I can only recommend creating a request to support team to do the in-depth investigation to find the reason and to fix it. Please create a ticket to support at Plesk Help Center
 
Back
Top