• 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

Resolved ERR_CONNECTION_REFUSED after update

sistemsb

New Pleskian
Server operating system version
Centos 7
Plesk version and microupdate number
Plesk Obsidian 18.0.53.2
This morning my Plesk has been updated, but now I can't access the panel and it shows me the error "ERR_CONNECTION_REFUSED" on both port 8443 and 8447.

I have checked with "sudo netstat -tuln | grep 8443" that there is nothing listening on the port.

I have looked at /var/log/plesk/install/autoinstaller3.log" and it tells me that:
DATABASE ERROR!!!
Database psa found, but version is not defined

ERROR while trying to find
Plesk
database
psa

I have tried to repair it with "plesk repair db -y" and it tells me that

Unknown Plesk command-line utility: "repair"

I have tried to recover the last backup with "zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin" and it tells me:

ERROR 1265 (01000) at line 3505: Data truncated for column 'event_type' at row 16
In plesk_18.0.53_installation.log:
===> Upgrading database
Trying to start service mariadb... active
done
Trying to establish test connection... connected
done
Trying to find Plesk database psa... not found
ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'
Trying to backup MySQL database... done
MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.18.0.53-18.0.53.20230621-063545.dump.gz
ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'
===> Cumulative Plesk database upgrade (revertable stage) has been started.
ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'
Upgrade or repair for 'core' (stage 'prep') is not required
===> Preparing Plesk database upgrade (revertable stage).
Trying to set psa database version to 018000000... ERROR 1049 (42000): Unknown database 'psa'
ERROR 1049 (42000): Unknown database 'psa'
ERROR while trying to execute SQL query, the query was: replace into misc (param,val) values('version', '018000000')

===> Restoring database from backup /var/lib/psa/dumps/mysql.preupgrade.18.0.53-18.0.53.20230621-063545.dump.gz

**** Product prep-install for BASE failed.
***** problem report *****
ERROR while trying to execute SQL query, the query was: replace into misc (param,val) values('version', '018000000')
STOP Bootstrapper 18.0.53 prep-install for BASE AT Wed Jun 21 06:35:45 CEST 2023
START Bootstrapper 18.0.53 prep-install for BASE AT Wed Jun 21 06:49:02 CEST 2023
The truth is that I have been spending several hours on this and I do not see how to solve it, any ideas?

The sites are being served fine, the only thing that fails is the Plesk Panel, I would try to restart the entire server, but it is a development server and I can't risk that after restarting it doesn't boot the hosting.
 
@Maarten Thank you, the link was obviously shortened. I copy the block from an Outlook note and now wonder why it was modified there.
 
Fixed!

I ran from the command line:

plesk installer install-all-updates

I saw that it was complaining about missing some tables, after checking that they indeed did not exist in the psa db, I recovered them from the last backup like this:

cd /var/lib/psa/dumps
zcat mysql.daily.dump.0.gz | sed -n '/-- Table structure for table `misc`/,/-- Table*/p' | plesk db

After this, I restarted with:

systemctl restart sw-cp-server

Since it still didn't open port 443 (it didn't even appear in nmap) I ran:

plesk installer install-all-updates

It complained about another table, "locales", same process as before, I recovered and relaunched the installer, recovering the missing tables and relaunching the installer until it stopped complaining.

Once the installer executed correctly,

systemctl restart sw-cp-server

And it appeared in nmap and was working!!!

Well, more or less, on screen it was complaining about missing tables like log_"actions", "sessions", etc...
I simply went on recovering them one by one as it complained and restarting the service to see if it was missing any more until it finished.

Then it complained about the configuration files, I asked it to regenerate them and it complained that it was missing /etc/httpd/conf/plesk.conf.d/roundcube.htaccess.inc, since I don't use it, I created a blank file (as it was required in the webmail conf) and it was able to regenerate them well and now everything is working perfectly.

I hope this can help someone else recover their Plesk.
 
Back
Top