Koozali.org: home of the SME Server

DATABASE ERROR: CONNECTION FAILED! - Roundcube - Solved

Offline david000

  • *****
  • 203
  • +0/-0
DATABASE ERROR: CONNECTION FAILED! - Roundcube - Solved
« on: February 01, 2016, 10:37:35 PM »
Hi,

My Roundcube webmail login has just started throwing the above error for no apparent reason. I can log in via Horde and I can access the server-manager.

I've rebooted a couple of times but no avail. We did have a power cut this morning but everything came back up ok, and the system was working all afternoon.

However at 9pm the following Cron message dropped in:
Cron <root@sme-server> /sbin/e-smith/do_backupwk
"Backup terminated: pre-backup failed - status: 256"

The workstation back-up is scheduled to start at that time.

Can anyone give me a guide to ID'ing and resolving the issue ?

Thanks in advance

 
David
« Last Edit: February 02, 2016, 02:29:01 PM by david000 »

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #1 on: February 01, 2016, 10:41:25 PM »
--
qui scribit bis legit

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #2 on: February 01, 2016, 11:15:18 PM »
well, you'd take a look at /var/log/messages and see the exact error message

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #3 on: February 02, 2016, 07:00:45 AM »
Take a look to the error message of roundcubemail in its log... My concern is that I see several different issues in the same post. Maybe each issue deserve its post.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline david000

  • *****
  • 203
  • +0/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #4 on: February 02, 2016, 11:10:48 AM »
I'm struggling a little to find the round cube specific logs (Linux newby!).

However from the /var/log/messages I see:
Code: [Select]
Feb  1 21:43:06 sme-server mysql.init: Looking for 'mysql' as: /usr/bin/mysql
Feb  1 21:43:06 sme-server mysql.init: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Feb  1 21:43:07 sme-server mysql.init: This installation of MySQL is already upgraded to 5.1.73, use --force if you still need to run mysql_upgrade
Feb  1 21:43:07 sme-server mysql.init: waiting for mysqld to restart
Feb  1 21:43:07 sme-server smbd[2349]: [2016/02/01 21:43:07.401725,  0] smbd/server.c:1110(main)
Feb  1 21:43:07 sme-server smbd[2349]:   standard input is not a socket, assuming -D option
Feb  1 21:43:11 sme-server kernel: i2c i2c-1: sendbytes: NAK bailFeb  1 21:43:07 sme-server mysql.init: This installation of MySQL is already upgraded to 5$
Feb  1 21:43:07 sme-server mysql.init: waiting for mysqld to restart
Feb  1 21:43:07 sme-server smbd[2349]: [2016/02/01 21:43:07.401725,  0] smbd/server.c:1110(main)
Feb  1 21:43:07 sme-server smbd[2349]:   standard input is not a socket, assuming -D option
Feb  1 21:43:11 sme-server kernel: i2c i2c-1: sendbytes: NAK bailout.

with the NAK bailout message repeated multiple times.

I wonder if it's a mysql problem.  In that log there is nothing roundcube specific with a 'running' tag.

Can you point me towards the roundcube log ?  I've looked on the web but not found it yet...

EDIT - I've just realised that all the log files can be viewed from the server manager login in SME v9 (!)

 

« Last Edit: February 02, 2016, 02:37:32 PM by david000 »

Offline david000

  • *****
  • 203
  • +0/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #5 on: February 02, 2016, 11:40:25 AM »
I found the roundcube logs in

/var/log/roundcubemail/  and used nano to have a look at the most recent, 20160202

There are assorted db errors through the day until about 8pm when I see the following repeated:

Code: [Select]
[01-Feb-2016 21:08:28 +0000]: <0a0265dd> DB Error: [145] Table './roundcube/session' is marked as crashed and should be repaired   

(I'm struggling to copy and paste the full line from putty).

Any suggestion on the repair ?






Offline david000

  • *****
  • 203
  • +0/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #6 on: February 02, 2016, 12:57:33 PM »
So was pushed for time so elected the 'Nuclear' option, removing Roundcube and reinstalling as per the wiki directions.

We're back up and running with roundcube now, but it raises the question if there is a way of backing up the roundcube settings ?


We'll see how the backup looks later today.
 


Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube
« Reply #7 on: February 02, 2016, 01:05:39 PM »
I would suggest that you use smeserver-automysqlbackup...in case of corrupted database you will be able to restore it directly.

May i suggest that you add solved in the topic of your post
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline david000

  • *****
  • 203
  • +0/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube - Solved
« Reply #8 on: February 02, 2016, 02:32:32 PM »
Thank you.

I've just had a read of the db backup and it looks good. Will the db back ups it produces get rolled into the main sme-server backup as per the manager interface ?


Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube - Solved
« Reply #9 on: February 02, 2016, 07:52:58 PM »
smeserver-automysqlbackup is a contrib, the backups is included in the official backup of sme because  you will find them in /root/backup
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline david000

  • *****
  • 203
  • +0/-0
Re: DATABASE ERROR: CONNECTION FAILED! - Roundcube - Solved
« Reply #10 on: February 03, 2016, 09:59:23 AM »
Thanks :)