Sogo sql Error after install

,

can u install another web application…like wordpress and see if the issue is reproducible ?

So, try it right away

1 Like

Humm,UPS I’m a newbie, where do I find wordpress

You can find instructions on the wiki
https://wiki.nethserver.org/doku.php?id=wordpress

:blush:

It is install

Ok, Wordpress is now install. And i have Reboot the system.
But i stil get the error from sogo.
https://gist.github.com/anonymous/066140d455f26ba3efa26a8857b72df7

an observation I have made is that:
if I restart sogo services, there is no error or warnings in the sogo log.

Ok so relative to sogo…when you restart the service you can connect to sogo. What is the status of sogod after the boot time ?

Reboot then

systemctl status sogod

1 Like

OK. before reboot: https://gist.github.com/anonymous/d91bced83583a5083821f933795c0971

And after Reboot: https://gist.github.com/anonymous/517f10f648ef73ef0085acb935afe2e5

And also a printout from the SOGo log :https://gist.github.com/anonymous/933fbb18309d5a6baf1792fdb39455e4

you should try to get your output well formatted, the first and the second are unreadable :’(

I’m very sorry. I hope that the new one is to read:https://gist.github.com/anonymous/59aac2a2eb76ffefbed8b3c8c263fe63

I can use sogo web interface, but I get these errors in the log sogo:https://gist.github.com/anonymous/0903e63eb05f58f1fecd3d4eca0aed85

i can also use an android phone (EAS), but again errors in the log:https://gist.github.com/anonymous/7f3de9d1c92f5f33bc68d5982db22f49

And outlook2016 seems to work, but there are some errors in the log:https://gist.github.com/anonymous/c70b970f2e164d6ea78597fed4544d75

I hope that it’s fairly ok this time:innocent:

Gist output is OK now :wink:

Unsure if it makes sense @stephdl, but is it possible that sogo is trying to use the mysql socket before it has been created, and thus showing those errors?

If it make sense you could crosscheck the timing between the mysqld ready for connections (/var/log/mariadb/mariadb.log) and the sogo errors (/var/log/sogo/sogo.log)?

since I’m not on completely safe ground. therefore said I do not quite know what to do.
then you attach these two log files. So I hope that can help me.

I hope that it ok:-)

Excerpts from both logs show this sequence of events:

170330 11:17:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2017-03-30 11:17:23.468 sogod[1390:1390] ERROR: could not open MySQL4 connection to database 'sogo': Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
170330 11:17:24 [Note] Server socket created on IP: '0.0.0.0'.
170330 11:17:25 [Note] /usr/libexec/mysqld: ready for connections.
1 Like

ok,and how to fix it?

I’ve been looking into this:

ERROR: could not open MySQL4 connection to database ‘sogo’: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

[WARN] <0x0x7fc797db4e40[GCSChannelManager]> will prevent opening of this channel 5 seconds after…

[ERROR] <0x0x7fc797db4e40[GCSChannelManager]> could not open channel for mysql://localhost/sogo/sogo_user_profile

In this particular case, my theory regarding these errors at startup (or when mariadb/mysqld service is restarted) is that SOGo tries to connect to the database before the mysql socket is ready for connections (hence the errors), and warns the user it will retry the database connection after a few seconds.

This behaviour can be tracked looking at the status of services and at mariadb, sogo and boot logs.


If it works after retrying the connection I think you shouldn’t worry about it.

There are some methods that could be used to get rid of the errors and keep the log a bit “cleaner”, but don’t think they worth it. Here is one of them:

Method 1: drop-in systemd unit conf file

Create and edit a drop-in systemd conf for sogo service:

mkdir -p /etc/systemd/system/sogod.service.d/
vi /etc/systemd/system/sogod.service.d/mariadb.conf

with the following content:

[Unit]
# Wait for mariadb/mysqld to be fully loaded (mysql.sock included).
# see http://community.nethserver.org/t/sogo-sql-error-after-install/6407
Requires=mariadb.service

Apply the changes:

systemctl daemon-reload

Reboot the server.

Note SOGo can use other than mariadb database server; the example applies to NethServer but may not apply to custom installations or other distros.
Other than “Requires” systemd’s statement might fit better and achieve the same result in a more elegant way. Sorry, systemd illiterate here :blush:.

2 Likes

I now test your recipe, and can report that it seems that it works:joy::smiley:
I would like to say many thanks for your support.

1 Like

Please mark the thread as solved.

The previous tweak has an undesired side-effect. This correction might fix it:

Create and edit a drop-in systemd conf for sogo service:

mkdir -p /etc/systemd/system/sogod.service.d/
vi /etc/systemd/system/sogod.service.d/mariadb.conf

with the following content:

[Unit]
# Wait for mariadb/mysqld service
# see http://community.nethserver.org/t/sogo-sql-error-after-install/6407
After=mariadb.service mysqld.service

Apply the changes:

systemctl daemon-reload

Reboot the server to evaluate the whole starting process.

1 Like