Forums

Resolved
0 votes
Hi,

I have been trying to add the Calendar plugin to Roundcube webmail and seem to have cocked things up big time.
Part of the process was to install the community edition of MySQL as I was under the impression that this was what was required to get the plugin to work.
Net result I could not get the plugin to install and worse When accessing Roundcube webmail now gives a message saying:


DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

I therefore decided to undo the steps I had done to get to this point by removing the plugin files and then remove MySQL using

yum erase mysql


This proceeded OK and I then uninstalled and then re-installed Roundcube and I am still getting the Connection Failed error.

I did some research here and found that a fix for the Connection Failed error was to run this command:

/usr/clearos/apps/roundcubemail/deploy/initialize-roundcubemail


I ran this command and get this result:

Job for system-mariadb.service failed because the control process exited with error code. See "systemctl status system-mariadb.service" and "journalctl -xe" for details.
Creating base tables
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/system-mysql/mysql.sock' (2)


Needless to say I wish I had left well alone and am now completely lost. I suspect that I need to get back to the default database configuration but do not know what to do?
Any help appreciated.

Siv
Tuesday, September 25 2018, 09:49 PM
Share this post:

Accepted Answer

Thursday, September 27 2018, 10:10 AM - #Permalink
Resolved
0 votes
I am not familiar with the journalctl command either It is quite a powerful command. If you do:
systemctl start system-mariadb.service
systemctl status system-mariadb.service -l
journalctl -xe
Note from your status command the timestamp of the output. Then make sure the output from the journalctl command starts before this time and ends after it.

You may also want to have a look at "man journalctl" or research the command online and see if there are any better forms of the command and perhaps post back with your findings. I know I was shown something different on the Raspberry Pi forums when I was investigating an issue with my Pi.
The reply is currently minimized Show
Responses (28)
  • Accepted Answer

    Wednesday, September 26 2018, 07:48 AM - #Permalink
    Resolved
    0 votes
    As you may have noticed, in the paid version, Roundcubemail uses system-mysql and not mysql, so erasing mysql should have done nothing. It may also be why you are getting issues installing the calendar. It should have been safe to remove mysql but generally try to avoid using yum to remove anything or check very carefully the dependencies it will try to remove. You can bring your system to its knees. Have you reinstalled mysql (or really, app-mariadb)?

    What may be happening is the calendar addin is pointing to mysql and the main Roundcubemail to system-mysql. I know nothing about the calendar plugin. Have you tried removing it?

    You may be able to unpick the /usr/clearos/apps/roundcubemail/deploy/initialize-roundcubemail script to pick out the commands to inspect system-mysql and just see if things are there as expected. What does surprise me is that the script got as far as the "Creating base tables" but as they should have already existed. Are you using the paid app or did you do a manual installation?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 11:27 AM - #Permalink
    Resolved
    0 votes
    Nick,
    I do have the paid for version and I have removed the Calendar Add-In by doing

    yum remove git php-sabre-*


    Then I removed the two folders it created in /usr/share/roundcubemail/plugins which were:

    calendar
    libcalendaring

    It did ask you to change the libcalendering/libvcalendar.php file but that will have been deleted when I removed the folder "libcalendaring".
    So I think everything other than the mySQL stuff is back as it was.

    I will have a look at the script and see if I can fathom what it was trying to do?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 12:04 PM - #Permalink
    Resolved
    0 votes
    Nick,
    I double-checked that all the things the add-in had added to the system had been removed and found a couple of things that I missed. I removed those and then decided I would run the script again, the following is the output:

    [root@bigblue deploy]# ./initialize-roundcubemail
    Job for system-mariadb.service failed because the control process exited with error code. See "systemctl status system-mariadb.service" and "journalctl -xe" for details.
    Creating base tables
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/system-mysql/mysql.sock' (2)

    So I then ran systemctl status system-mariadb.service

    [root@bigblue deploy]# systemctl status system-mariadb.service
    ● system-mariadb.service - System MariaDB database server
    Loaded: loaded (/usr/lib/systemd/system/system-mariadb.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Wed 2018-09-26 12:39:41 BST; 48s ago
    Process: 30226 ExecStartPost=/usr/clearos/sandbox/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
    Process: 30225 ExecStart=/usr/clearos/sandbox/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
    Process: 30193 ExecStartPre=/usr/clearos/sandbox/usr/libexec/mariadb-prepare-db-dir (code=exited, status=0/SUCCESS)
    Main PID: 30225 (code=exited, status=0/SUCCESS)

    Sep 26 12:39:40 bigblue.sivill.local systemd[1]: Starting System MariaDB database server...
    Sep 26 12:39:40 bigblue.sivill.local mariadb-prepare-db-dir[30193]: Database MariaDB is probably initialized in /var/lib/system-mysql already, nothing is done.
    Sep 26 12:39:40 bigblue.sivill.local mariadb-prepare-db-dir[30193]: If this is not the case, make sure the /var/lib/system-mysql is empty before running mariadb-prepare-db-dir.
    Sep 26 12:39:40 bigblue.sivill.local mysqld_safe[30225]: 180926 12:39:40 mysqld_safe Logging to '/var/log/system-mariadb/mariadb.log'.
    Sep 26 12:39:40 bigblue.sivill.local mysqld_safe[30225]: 180926 12:39:40 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    Sep 26 12:39:41 bigblue.sivill.local systemd[1]: system-mariadb.service: control process exited, code=exited status=1
    Sep 26 12:39:41 bigblue.sivill.local systemd[1]: Failed to start System MariaDB database server.
    Sep 26 12:39:41 bigblue.sivill.local systemd[1]: Unit system-mariadb.service entered failed state.
    Sep 26 12:39:41 bigblue.sivill.local systemd[1]: system-mariadb.service failed.


    I did try installing MariaDB from the Marketplace at some stage before I raised the question here and that failed with:

    Exception: [u'ERROR with transaction check vs depsolve:', 'mariadb-server >= 5.5.40 is needed by app-mariadb-core-1:2.3.3-1.v7.noarch']


    So I assume something that MySQL installed has upset the MariaDB instance?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 12:31 PM - #Permalink
    Resolved
    0 votes
    Nick,

    I was interested in this line:
    Sep 26 12:39:40 bigblue.sivill.local mariadb-prepare-db-dir[30193]: If this is not the case, make sure the /var/lib/system-mysql is empty before running mariadb-prepare-db-dir.


    Does that mean I should remove all the contents of that folder and then run the script again?
    There is a load of files and folders in that directory:

    aria_log_control ibdata1 ib_logfile0 ib_logfile1 mysql mysql_upgrade_info performance_schema reports roundcubemail


    The emboldened items being folders.

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 01:08 PM - #Permalink
    Resolved
    0 votes
    The first thing I'd do is check the status of the system DB.


    /usr/clearos/sandbox/usr/bin/mysql -uroot -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/root) -e "show databases"


    That will tell you if it's functioning as a service AND whether you have a rouncube database in there.

    Next, check to see if you can login as the roundcube user:


    /usr/clearos/sandbox/usr/bin/mysql -uroundcubemail -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/roundcubemail) roundcubemail -e "show tables"


    Note the changes above...we're using the roundcube user and database roundcubemail

    If you can login to the MySQL console for the RC database, check your RC config file:


    /usr/share/roundcubemail/config/config.inc.php


    There you'll find an entry like this:


    $config['db_dsnw'] = 'mysql://roundcube:xxxxx9@127.0.0.1:3308/roundcubemail';


    Make sure the password is the same as the one that you confirmed worked from the command line.

    B.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 01:55 PM - #Permalink
    Resolved
    0 votes
    Ben,
    I ran your first command and got:

    /usr/clearos/sandbox/usr/bin/mysql -uroot -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/root) -e "show databases"
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/system-mysql/mysql.sock' (2)


    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 03:17 PM - #Permalink
    Resolved
    0 votes
    Is system-mariadb running:
    service system-mariadb status
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 04:17 PM - #Permalink
    Resolved
    0 votes
    Nick,

    No it's not started and when I try and start it from the dashboard it fails!

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 05:40 PM - #Permalink
    Resolved
    0 votes
    Can you try from the command line and see the error messages or look in the logs?

    [edit]
    I don't think you can start system-mariadb from the dashoard, only the non-sandboxed mariadb. That will be a separate issue to sort out, possibly.
    [/edit]
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 06:21 PM - #Permalink
    Resolved
    0 votes
    I don't think you can start system-mariadb from the dashoard,


    Nick's right. Run:

    service system-mariadb restart


    From the command line and try connecting again. If that fails, do you have anything in that database that you need to keep around? owncloud, roundcube, mail archive, reports, kopano...these are the apps I can think of off the top of my head that use it. If you don't have anything that needs saving, we can certainly uninstall and re-install it and start over.

    B.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 07:06 PM - #Permalink
    Resolved
    0 votes
    Nick, Ben,

    I ran it and get this:
    [root@bigblue ~]# service system-mariadb restart
    Redirecting to /bin/systemctl restart system-mariadb.service
    Job for system-mariadb.service failed because the control process exited with error code. See "systemctl status system-mariadb.service" and "journalctl -xe" for details.
    [root@bigblue ~]#

    As per the error message I ran:
    systemctl status system-mariadb.service

    And get this:
    Will try and get it again:
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 07:25 PM - #Permalink
    Resolved
    0 votes
    You did not go far enough back in your "journalctl -xe". Really it needs to be run straight after the job fails to start. Can you snip most of your output and try again?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 08:26 PM - #Permalink
    Resolved
    0 votes
    Nick,

    OK this was the second attempt. I ran the two commands immediately one after the other and got this:

    [root@bigblue ~]# systemctl status system-mariadb.service
    ● system-mariadb.service - System MariaDB database server
    Loaded: loaded (/usr/lib/systemd/system/system-mariadb.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Wed 2018-09-26 20:01:02 BST; 1h 16min ago
    Process: 27510 ExecStartPost=/usr/clearos/sandbox/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
    Process: 27509 ExecStart=/usr/clearos/sandbox/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
    Process: 27477 ExecStartPre=/usr/clearos/sandbox/usr/libexec/mariadb-prepare-db-dir (code=exited, status=0/SUCCESS)
    Main PID: 27509 (code=exited, status=0/SUCCESS)

    Sep 26 20:01:01 bigblue.sivill.local systemd[1]: Starting System MariaDB database server...
    Sep 26 20:01:01 bigblue.sivill.local mariadb-prepare-db-dir[27477]: Database MariaDB is probably initialized in /var/lib/system-mysql already, nothing is done.
    Sep 26 20:01:01 bigblue.sivill.local mariadb-prepare-db-dir[27477]: If this is not the case, make sure the /var/lib/system-mysql is empty before running mariadb-prepare-db-dir.
    Sep 26 20:01:01 bigblue.sivill.local mysqld_safe[27509]: 180926 20:01:01 mysqld_safe Logging to '/var/log/system-mariadb/mariadb.log'.
    Sep 26 20:01:01 bigblue.sivill.local mysqld_safe[27509]: 180926 20:01:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    Sep 26 20:01:02 bigblue.sivill.local systemd[1]: system-mariadb.service: control process exited, code=exited status=1
    Sep 26 20:01:02 bigblue.sivill.local systemd[1]: Failed to start System MariaDB database server.
    Sep 26 20:01:02 bigblue.sivill.local systemd[1]: Unit system-mariadb.service entered failed state.
    Sep 26 20:01:02 bigblue.sivill.local systemd[1]: system-mariadb.service failed.
    [root@bigblue ~]# journalctl -xe
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=3 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=3 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 fd=41 ACCEPT from IP=127.0.0.1:39224 (IP=127.0.0.1:389)
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=0 BIND dn="cn=manager,ou=Internal,dc=system,dc=lan" method=128
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=0 BIND dn="cn=manager,ou=Internal,dc=system,dc=lan" mech=SIMPLE ssf=0
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=0 RESULT tag=97 err=0 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=1 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=shadowAccount)(uid=shell))"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=1 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local saslauthd[719]: pam_unix(imap:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=shell
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=2 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=shell))"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=2 SRCH attr=uid uidNumber
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=2 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 fd=47 ACCEPT from IP=127.0.0.1:39226 (IP=127.0.0.1:389)
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=0 BIND dn="cn=Shelly Sivill,ou=Users,ou=Accounts,dc=system,dc=lan" method=128
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=0 BIND dn="cn=Shelly Sivill,ou=Users,ou=Accounts,dc=system,dc=lan" mech=SIMPLE ssf=0
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=0 RESULT tag=97 err=0 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=1 SRCH base="cn=Shelly Sivill,ou=Users,ou=Accounts,dc=system,dc=lan" scope=0 deref=0 filter="(objectClass=*)"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=1 SRCH attr=dn
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=2 ABANDON msg=2
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 op=3 UNBIND
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2820 fd=47 closed
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=3 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=shadowAccount)(uid=shell))"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=3 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=3 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=4 ABANDON msg=4
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=5 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=shadowAccount)(uid=shell))"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=5 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2819 op=5 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=4 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=shell))"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=4 SRCH attr=uid uidNumber
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=4 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=5 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=shadowAccount)(uid=shell))"
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=5 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=5 SEARCH RESULT tag=101 err=0 nentries=1 text=
    Sep 26 21:17:21 bigblue.sivill.local slapd[1632]: conn=2816 op=6 ABANDON msg=6
    Sep 26 21:17:21 bigblue.sivill.local imaps[3113]: login: c-71-193-93-72.hsd1.mn.comcast.net [71.193.93.72] shell plaintext+TLS User logged in SESSIONID=<bigblue.sivill.local-3113-1537993040-1>
    Sep 26 21:17:21 bigblue.sivill.local imaps[3113]: client id: "name" "iPhone Mail" "version" "15G77" "os" "iOS" "os-version" "11.4.1 (15G77)"
    Sep 26 21:17:22 bigblue.sivill.local imaps[3113]: USAGE shell user: 0.031903 sys: 0.006284
    Sep 26 21:17:27 bigblue.sivill.local slapd[1632]: conn=1001 op=280 SRCH base="sambaDomainName=SIVILL,dc=system,dc=lan" scope=2 deref=0 filter="(objectClass=sambaTrustedDomainPassword)"
    Sep 26 21:17:27 bigblue.sivill.local slapd[1632]: conn=1001 op=280 SRCH attr=sambaDomainName sambaSID
    Sep 26 21:17:27 bigblue.sivill.local slapd[1632]: conn=1001 op=280 SEARCH RESULT tag=101 err=0 nentries=0 text=
    Sep 26 21:17:37 bigblue.sivill.local postfix/smtpd[3548]: connect from unknown[178.159.36.58]
    Sep 26 21:17:37 bigblue.sivill.local slapd[1632]: conn=2817 op=10 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=kiosk))"
    Sep 26 21:17:37 bigblue.sivill.local slapd[1632]: conn=2817 op=10 SRCH attr=loginShell cn gidNumber uidNumber objectClass homeDirectory gecos uid
    Sep 26 21:17:37 bigblue.sivill.local slapd[1632]: conn=2817 op=10 SEARCH RESULT tag=101 err=0 nentries=0 text=
    Sep 26 21:17:37 bigblue.sivill.local slapd[1632]: conn=2817 op=11 SRCH base="ou=Computers,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=kiosk))"
    Sep 26 21:17:37 bigblue.sivill.local slapd[1632]: conn=2817 op=11 SRCH attr=loginShell cn gidNumber uidNumber objectClass homeDirectory gecos uid
    Sep 26 21:17:37 bigblue.sivill.local slapd[1632]: conn=2817 op=11 SEARCH RESULT tag=101 err=0 nentries=0 text=
    Sep 26 21:17:37 bigblue.sivill.local saslauthd[717]: pam_unix(smtp:auth): check pass; user unknown
    Sep 26 21:17:37 bigblue.sivill.local saslauthd[717]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
    Sep 26 21:17:39 bigblue.sivill.local saslauthd[717]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
    Sep 26 21:17:39 bigblue.sivill.local saslauthd[717]: do_auth : auth failure: [user=kiosk] [service=smtp] [realm=sivill.com] [mech=pam] [reason=PAM auth error]
    Sep 26 21:17:39 bigblue.sivill.local postfix/smtpd[3548]: warning: unknown[178.159.36.58]: SASL LOGIN authentication failed: authentication failure
    Sep 26 21:17:39 bigblue.sivill.local postfix/smtpd[3548]: lost connection after AUTH from unknown[178.159.36.58]
    Sep 26 21:17:39 bigblue.sivill.local postfix/smtpd[3548]: disconnect from unknown[178.159.36.58]
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 08:28 PM - #Permalink
    Resolved
    0 votes
    Nick,

    When I run the second command the output stops and I have to press CTRL + C to get it to return to the command prompt, it the command pausing waiting for more output or something, I am not sure what is going on when it does this?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 08:55 PM - #Permalink
    Resolved
    0 votes
    q to quit. You can page up and page down through the data, but it initially starts at the most recent.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 26 2018, 10:08 PM - #Permalink
    Resolved
    0 votes
    Nick,

    Ah with it!
    Does this list give you what you were looking for?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 07:21 AM - #Permalink
    Resolved
    0 votes
    Which list ........ and it will mean more to Ben than me.

    Can I suggest you grab one of your backups from /var/clearos/configuration_backup from before the issue in case you need to do a config restore?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 08:11 AM - #Permalink
    Resolved
    0 votes
    Nick,
    The list I was referring to was the one showing the output from the command:

    systemctl status system-mariadb.service

    Here: https://www.clearos.com/clearfoundation/social/community/how-to-get-mysql-back-to-correct-version-for-clearos-7-5#reply-234251

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 08:22 AM - #Permalink
    Resolved
    0 votes
    Nick,

    My oldest backup was from the 19th September, I restored it, but the issue must have existed before that date as I got this line during the restore:

    "Command execution failed - System-maria-db"

    I should have done the restore much sooner before the older backups rolled off the system.

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 08:45 AM - #Permalink
    Resolved
    0 votes
    The timestamps of the two outputs don't cover the same period. Can you start system-mariadb from the command line, then perhaps do a "systemctl status system-mariadb.service" straight after, then "journalctl -xe" and make sure that the output from the journalctl command brackets the other two commands.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 09:45 AM - #Permalink
    Resolved
    0 votes
    Nick,

    Can you explain how I make sure the journalctl command brackets the other two commands as I am not familiar with this command yet?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 04:11 PM - #Permalink
    Resolved
    0 votes
    Nick,

    Sorry for my late reply, had to go out most of the afternoon.
    I will research the command and see if I can find out how to specify a time range if that's possible.

    On another tack, is there a script that I could run that's effectively the part of the install script for ClearOS that sets up the System MariaDB or whatever it's proper name is, so that I can effectively just re-install that part of the system and return it back to where it would have been after a clean install. I could then re-install Roundcube and hopefully get back to a working system?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 04:58 PM - #Permalink
    Resolved
    0 votes
    You can get the time range just by scrolling with the Page Up/Down keys.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 05:48 PM - #Permalink
    Resolved
    0 votes
    Nick,
    OK I think this is what you want. I ran the three commands in quick succession and noted the time when I kicked off teh process (Sep 27 18:34:26). These are the results:
    [root@bigblue ~]# systemctl start system-mariadb.service
    Job for system-mariadb.service failed because the control process exited with error code. See "systemctl status system-mariadb.service" and "journalctl -xe" for details.

    [root@bigblue ~]# systemctl status system-mariadb.service -l
    ● system-mariadb.service - System MariaDB database server
    Loaded: loaded (/usr/lib/systemd/system/system-mariadb.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Thu 2018-09-27 18:34:27 BST; 8ms ago
    Process: 30608 ExecStartPost=/usr/clearos/sandbox/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
    Process: 30607 ExecStart=/usr/clearos/sandbox/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
    Process: 30574 ExecStartPre=/usr/clearos/sandbox/usr/libexec/mariadb-prepare-db-dir (code=exited, status=0/SUCCESS)
    Main PID: 30607 (code=exited, status=0/SUCCESS)

    Sep 27 18:34:26 bigblue.sivill.local systemd[1]: Starting System MariaDB database server...
    Sep 27 18:34:26 bigblue.sivill.local mariadb-prepare-db-dir[30574]: Database MariaDB is probably initialized in /var/lib/system-mysql already, nothing is done.
    Sep 27 18:34:26 bigblue.sivill.local mariadb-prepare-db-dir[30574]: If this is not the case, make sure the /var/lib/system-mysql is empty before running mariadb-prepare-db-dir.
    Sep 27 18:34:26 bigblue.sivill.local mysqld_safe[30607]: 180927 18:34:26 mysqld_safe Logging to '/var/log/system-mariadb/mariadb.log'.
    Sep 27 18:34:26 bigblue.sivill.local mysqld_safe[30607]: 180927 18:34:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: system-mariadb.service: control process exited, code=exited status=1
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: Failed to start System MariaDB database server.
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: Unit system-mariadb.service entered failed state.
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: system-mariadb.service failed.

    [root@bigblue ~]# journalctl -xe
    -- Logs begin at Tue 2018-09-25 22:07:01 BST, end at Thu 2018-09-27 18:34:27 BST. --
    ****** Removed entries before the key point in time - Siv ************************************************
    Sep 27 18:34:26 bigblue.sivill.local systemd[1]: Starting System MariaDB database server...
    -- Subject: Unit system-mariadb.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit system-mariadb.service has begun starting up.
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=58 SRCH base="ou=Users,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=system-mysql))"
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=58 SRCH attr=uid uidNumber
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=58 SEARCH RESULT tag=101 err=0 nentries=0 text=
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=59 SRCH base="ou=Computers,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=system-mysql))"
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=59 SRCH attr=uid uidNumber
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=59 SEARCH RESULT tag=101 err=0 nentries=0 text=
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=60 SRCH base="ou=Groups,ou=Accounts,dc=system,dc=lan" scope=2 deref=0 filter="(&(objectClass=posixGroup)(memberUid=system-mysql))"
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=60 SRCH attr=memberUid cn gidNumber member
    Sep 27 18:34:26 bigblue.sivill.local slapd[23442]: conn=2068 op=60 SEARCH RESULT tag=101 err=0 nentries=0 text=
    Sep 27 18:34:26 bigblue.sivill.local mariadb-prepare-db-dir[30574]: Database MariaDB is probably initialized in /var/lib/system-mysql already, nothing is done.
    Sep 27 18:34:26 bigblue.sivill.local mariadb-prepare-db-dir[30574]: If this is not the case, make sure the /var/lib/system-mysql is empty before running mariadb-prepare-db-dir.
    Sep 27 18:34:26 bigblue.sivill.local mysqld_safe[30607]: 180927 18:34:26 mysqld_safe Logging to '/var/log/system-mariadb/mariadb.log'.
    Sep 27 18:34:26 bigblue.sivill.local mysqld_safe[30607]: 180927 18:34:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: system-mariadb.service: control process exited, code=exited status=1
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: Failed to start System MariaDB database server.
    -- Subject: Unit system-mariadb.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit system-mariadb.service has failed.
    --
    -- The result is failed.
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: Unit system-mariadb.service entered failed state.
    Sep 27 18:34:27 bigblue.sivill.local systemd[1]: system-mariadb.service failed.
    Sep 27 18:34:27 bigblue.sivill.local polkitd[725]: Unregistered Authentication Agent for unix-process:30568:16004671 (system bus name :1.5399, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8) (disconnected
    [root@bigblue ~]# ^C


    Hopefully this will point you as to what the problem is?

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 27 2018, 10:31 PM - #Permalink
    Resolved
    0 votes
    Nick, Ben,
    Had a poke around in /var/log/system-mariadb/mariadb.log and see this:

    180927 09:16:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    180927 9:16:18 [Note] /usr/clearos/sandbox/usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 24278 ...
    180927 9:16:18 [ERROR] Incompatible header in messagefile '/usr/share/mysql/english/errmsg.sys'. Probably from another version of MariaDB
    180927 9:16:18 [ERROR] Aborting

    180927 9:16:18 [Note]
    180927 09:16:18 mysqld_safe mysqld from pid file /var/run/system-mariadb/mariadb.pid ended
    180927 09:17:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    180927 9:17:10 [Note] /usr/clearos/sandbox/usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 29743 ...
    180927 9:17:10 [ERROR] Incompatible header in messagefile '/usr/share/mysql/english/errmsg.sys'. Probably from another version of MariaDB
    180927 9:17:10 [ERROR] Aborting

    180927 9:17:10 [Note]
    180927 09:17:10 mysqld_safe mysqld from pid file /var/run/system-mariadb/mariadb.pid ended
    180927 10:38:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    180927 10:38:29 [Note] /usr/clearos/sandbox/usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 7613 ...
    180927 10:38:29 [ERROR] Incompatible header in messagefile '/usr/share/mysql/english/errmsg.sys'. Probably from another version of MariaDB
    180927 10:38:29 [ERROR] Aborting

    180927 10:38:29 [Note]
    180927 10:38:29 mysqld_safe mysqld from pid file /var/run/system-mariadb/mariadb.pid ended
    180927 18:34:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/system-mysql
    180927 18:34:26 [Note] /usr/clearos/sandbox/usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 30938 ...
    180927 18:34:26 [ERROR] Incompatible header in messagefile '/usr/share/mysql/english/errmsg.sys'. Probably from another version of MariaDB
    180927 18:34:26 [ERROR] Aborting

    180927 18:34:26 [Note]
    180927 18:34:26 mysqld_safe mysqld from pid file /var/run/system-mariadb/mariadb.pid ended
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 28 2018, 12:05 AM - #Permalink
    Resolved
    0 votes
    Nick, Ben,

    It looks like I have found out what was causing the issue. The previous post where I had identified that the MariaDB start up error was due to an:

    "incompatible header in messagefile '/usr/share/mysql/english/errmsg.sys'

    Led me to thinking, if that's the issue then all I need to do is replace the file with a standard one and as I have another ClearOS server I could just copy the one from that server and replace the one that presumably has been corrupted by me previously installing MySQL. I did this and Bingo MariaDB started up no problem.

    I checked Roundcube webmail and sure enough it's back working again!

    So I can relax again and have learnt not to try updating ClearOS manually.

    So if the Devs are looking in, any chance you could add some of the plugins to roundcube as part of the Roundcube Marketplace add on for ClearOS?

    Thanks again for your help figuring out how to sort this issue.

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 28 2018, 12:41 AM - #Permalink
    Resolved
    0 votes
    Nick, Ben,

    One thing, I think you can start/stop system-mariadb from the Dashboard, if you select System >> Settings >> Services you will see this:

    https://sivill.com/Downloads/ClearOS Services.png

    Here you can stop and start the service.

    When I visited that page before I fixed the issue, it was showing as not started and showed an error when I attempted to start it.

    Siv
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 28 2018, 01:18 AM - #Permalink
    Resolved
    0 votes
    Nick,

    It looks like the ability to screw up the ClearOS version of MariaDB has been reported as a bug:

    https://tracker.clearos.com/view.php?id=20071

    After my little escapade I think the idea suggested in that bug report is a very good idea as an end user installing MySQL or MariaDB shouldn't be able to mess up the ClearOS system version. Like I Did!

    Siv
    The reply is currently minimized Show
Your Reply