• 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 Can't add a database server from a Docker container

campsjos

New Pleskian
Some time ago I've added a MariaDb 10 docker database server following this tutorial: How to run MariaDB 10.3 on Plesk Onyx with Docker - VirtuBox
All worked fine until some days ago (maybe a week) that the DB server stopped suddenly and when I try to run it again throws this error:
Code:
The test connection to the database server has failed because of network problems:

SQLSTATE[HY000] [2006] MySQL server has gone away
Googling around everyone says that I must increase the max_allowed_packet conf option but I setted it to 10G and still no luck. I tried fiddling with other options I found that can throw this error but the error persists. Here's my custom my.cnf:
Code:
[mysqld]
max_allowed_packet=10G
wait_timeout=90
net_read_timeout=90
net_write_timeout=90
interactive_timeout=300
connect_timeout=90
innodb_buffer_pool_size=16G
innodb_log_files_in_group=2
innodb_log_file_size=2G
max_connections=250

I can connect to my docker container and enter to the mysql console without problems, execute commands as well as dump my databases, so the container and it's MySQL service are running as expected. I can't find a single log file neither on the host nor the container with more information about why I can't add it to Plesk databse servers.

I tried creating more containers from the same image and also from other Docker MariaDB images with the same result: MySQL server has gone away.

It doesn't seem to be an issue with Docker containers, but with the Database Servers manager.

I ran out of ideas, any clue on what is happening here?

Thank you.

1582549553508.png
1582549578347.png
1582549669737.png
 
Have you something more in your database logs to help? I am not sure that the "G" is an correct option :
Minimum Value1024
Maximum Value1073741824



You must increase this value if you are using large BLOB columns or long strings. It should be as big as the largest BLOB you want to use. The protocol limit for max_allowed_packet is 1GB. The value should be a multiple of 1024; nonmultiples are rounded down to the nearest multiple.

Try to put it to 10240M so...
 
Thanks for your reply.
MySQL seems to get the options properly:
Code:
MariaDB [(none)]> SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+------------+
| Variable_name      | Value      |
+--------------------+------------+
| max_allowed_packet | 1073741824 |
+--------------------+------------+
1 row in set (0.032 sec)

I tried with 1024M and got the same result in the query above and also the same error.

Having tried with fresh new containers and getting the same result is what makes me think that the issue is not on the mysql configuration itself.
 
Last edited:
I created a new server with a fresh Plesk install for testing, did the exact same process and worked like a charm so the problem is somewhere in my installation or configuration.
There has to be a log file or something somewhere that points me in which direction to look, :(
 
Finally, I found the solution
I removed the Docker extension from Plesk and install it again, and it is working now
 
Hi and sorry for the late response,
I did not resolved it at all, I had to create a new server with a fresh install of Plesk Obsidian and it worked as expected...
Someone on my PM told me that uninstalling and installing again the Docker extension solved it but I didn't try it so I can't tell.
My issue was that I needed Maria DB 10 for a specific site. Few months ago I had the same issue again for another site but this time I managed to get it following this tutorial:  How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.x on Linux?
So now I have 2 servers running Maria 10, one through Docker and the other natively :rolleyes:
 
Back
Top