This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

SMTP error after mariaDB upgrade
#1
SMTP error after mariaDB upgrade
Hi,


I updated my server from mysql 5.5 mariadb to mariaDB 10.2 following these steps.
https://www.tecmint.com/upgrade-mariadb-...an-ubuntu/

Soon after I finished the installation and rebooted my server I tried logging in roundcube but I got
Quote:"Connection to storage server failed"
I checked the logs and I figured that dovecot needs the mysql module
so I did
Code:
yum install dovecot-mysql
Now I can login to roundcube to view old mails, but when I try to send  I get
Quote:SMTP Error (-1): Connection to server failed.
.
I can't receive neither. Also the issue happens on my phone too, when sending I get "connecting to outgoing server failed" and I can't receive.

tail /var/log/dovecot.log gives the following:

Quote:2019-02-03 12:24:20master: Error: service(auth): command startup failed, throttling for 60 secs
2019-02-03 12:24:40imap-login: Warning: Auth process not responding, delayed sending initial response (greeting): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<X9A/n/uAfNZ/AAAB>
2019-02-03 12:25:00imap-login: Error: Timeout waiting for handshake from auth server. my pid=9996, input bytes=0
2019-02-03 12:25:20master: Error: service(auth): command startup failed, throttling for 60 secs
2019-02-03 12:25:20auth: Fatal: Unknown database driver 'mysql'
2019-02-03 12:29:48auth: Fatal: Unknown database driver 'mysql'
2019-02-03 12:29:48master: Error: service(auth): command startup failed, throttling for 2 secs
2019-02-03 12:33:39auth: Fatal: Unknown database driver 'mysql'
2019-02-03 12:33:39master: Error: service(auth): command startup failed, throttling for 4 secs
2019-02-03 12:54:09master: Warning: Killed with signal 15 (by pid=13322 uid=0 code=kill)


Does anyone know what the issue is? I don't want to try random solutions from the internet since this is a production server.
Reply
Thanks given by:
#2
RE: SMTP error after mariaDB upgrade
(02-03-2019, 10:42 PM)mohamedh Wrote: Hi,


I updated my server from mysql 5.5 mariadb to mariaDB 10.2 following these steps.
https://www.tecmint.com/upgrade-mariadb-...an-ubuntu/

Soon after I finished the installation and rebooted my server I tried logging in roundcube but I got
I checked the logs and I figured that dovecot needs the mysql module
so I did
Code:
yum install dovecot-mysql
Now I can login to roundcube to view old mails, but when I try to send  I get
.
I can't receive neither. Also the issue happens on my phone too, when sending I get "connecting to outgoing server failed" and I can't receive.

tail /var/log/dovecot.log gives the following:



Does anyone know what the issue is? I don't want to try random solutions from the internet since this is a production server.

After playing around on some test server VMs for a few hours, the only seemingly reliable way to use MariaDB version 10 with Sentora is to apply it to your repo settings BEFORE you even install Sentora. I cannot find an "easy" upgrade path once Sentora is installed, without lots and lots of messing around to reconfigure pretty much everything. Following any upgrade guides online (and they're all pretty similar) yields an upset Sentora, where webmail won't log in, the server logo in the panel information is missing, and probably lots of other issues. So what seems to work is this:

Starting with a brand new CentOS server, set up the repo settings first:

Code:
vi /etc/yum.repos.d/MariaDB.repo


Add into this file:

Code:
# MariaDB 10.3 CentOS repository list - created 2019-02-03 19:26 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


and save. You don't have to use version 10.3, and you can find the appropriate text for different versions here: https://downloads.mariadb.org/mariadb/re...r=exascale

Now, run the Sentora installer in the usual way.

This is not an upgrade... this is a new install. BTW, note that it's completely untested by me and should not be attempted for a production server!

I'm sure it's possible to rescue your installation... if it is it would require a lot of time and attention.

Keith
Reply
Thanks given by:
#3
RE: SMTP error after mariaDB upgrade
(02-04-2019, 07:19 AM)fearworks Wrote: After playing around on some test server VMs for a few hours, the only seemingly reliable way to use MariaDB version 10 with Sentora is to apply it to your repo settings BEFORE you even install Sentora. I cannot find an "easy" upgrade path once Sentora is installed, without lots and lots of messing around to reconfigure pretty much everything. Following any upgrade guides online (and they're all pretty similar) yields an upset Sentora, where webmail won't log in, the server logo in the panel information is missing, and probably lots of other issues. So what seems to work is this:

Starting with a brand new CentOS server, set up the repo settings first:

Code:
vi /etc/yum.repos.d/MariaDB.repo


Add into this file:

Code:
# MariaDB 10.3 CentOS repository list - created 2019-02-03 19:26 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


and save. You don't have to use version 10.3, and you can find the appropriate text for different versions here: https://downloads.mariadb.org/mariadb/re...r=exascale

Now, run the Sentora installer in the usual way.

This is not an upgrade... this is a new install. BTW, note that it's completely untested by me and should not be attempted for a production server!

I'm sure it's possible to rescue your installation... if it is it would require a lot of time and attention.

Keith

I should add that changing the version of MariaDB to a later version (10+ I think) looks like it will introduce a number of other issues. For example, the daemon does not appear to run correctly, due to issues with the datetime format being changed in MariaDB. I am seeing an error message when the daemon runs:


Code:
SQL Error: Incorrect datetime value: '1549233750' for column `sentora_core`.`x_logs`.`lg_when_ts` at row 1


Looking here:

https://stackoverflow.com/questions/2280...umber-1292

it is probable that this is because there are null entries or invalid timedate entries within the Sentora database entries, which would need sorting out.

So, I would say that upgrading MariaDB is not a wise move, and is also going to be a pain to undo. You are probably looking at a full reinstall Wink

Keith

After some more poking around, this error was actually a bug in the Sentora code. This file:


Code:
/etc/sentora/panel/dryden/debug/logger.class.php


has a line that tries to write a timestamp to a field in the database that is autofilled with a timestamp. MariaDB 5.5 must just ignore this and say "oh well", while the newer versions (10+) don't like it and actually throw it up as an error. So the line:


Code:
$statement = "INSERT INTO x_logs (lg_user_fk, lg_code_vc, lg_module_vc, lg_detail_tx, lg_stack_tx, lg_when_ts) VALUES (0, '" . $this->logcode . "', 'NA', '" . $this->detail . "', '" . $this->mextra . "','" . time() . "')";


needs changing to:


Code:
$statement = "INSERT INTO x_logs (lg_user_fk, lg_code_vc, lg_module_vc, lg_detail_tx, lg_stack_tx) VALUES (0, '" . $this->logcode . "', 'NA', '" . $this->detail . "', '" . $this->mextra . "')";


There's a similar line a few lines above it, which is correct, so make sure you correct the right section.

In theory, if you combine my suggestion to set up the repo and THEN install Sentora, and also make this change as soon as Sentora is installed, you should have some success.

I ran a few benchmark tests and, being completely honest, version 10.3 seemed slower than version 5.5, but I might play about with it some more.

Keith
Reply
Thanks given by:
#4
RE: SMTP error after mariaDB upgrade
The best results I have got are using:

Server OS:
CentOS

Apache Version:
2.4.6

PHP Version:
7.3.1

MySQL Version:
10.1.37-MariaDB


Anything later than MariaDB 10.1 was causing an issue with the ModuleAdmin module.

Please remember that I am using test VMs to try out aspects of PHP and MariaDB upgrading, not production servers. None of the tests I am doing are officially supported by the Sentora Team and there is currently no support for trying these steps out. If you do so, you are doing so entirely at your own risk. I am trialling a Suhosin replacement which is designed for PHP 7.

Also, keep in mind that there are a number of code issues which I have dealt with as I've gone - too many and too trivial to mention them all here... but you'll only be attempting any of this if you know what you're doing, right? Big Grin

Keith.
Reply
Thanks given by:
#5
RE: SMTP error after mariaDB upgrade
@fearworks, Thanks for all your hard work and your efforts!

I really appreciate your great help to find a working solution for mariaDB 10 Smile
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
How to upgrade RoundCube rajeevrrs 0 2 ,103 11-01-2022, 10:19 PM
Last Post: rajeevrrs
user: 'postfix' host: 'localhost' (Got an error reading communication packets) cezars 0 2 ,778 02-01-2022, 08:58 PM
Last Post: cezars
suhosin.session.encrypt error With Https MET4LG0D 7 30 ,478 04-05-2020, 09:38 PM
Last Post: iraqiboy90

Forum Jump:


Users browsing this thread: 2 Guest(s)