Started to experience this issue today -- similar to #1779626: MariaDB 5.5.27 breaks install and upgrade because of its mytop related bug

We did not do anything prior -- server was running just fine -- 24 hours ago the machine that hosts our site was rebooted by linode as a result of software issues they reported.

Steps we have taken with no luck yet.

  1. Killed the hanging boa_wait.pid
  2. Removed mytop with apt-get remove mytop, apt-get purge mytop and rm -f /usr/bin/mytop
  3. Ran dpkg --configure -a
  4. Ran run barracuda up again
  5. Scripts run but stops with MariaDB server not running!
  6. Checking of /var/backups/barracuda-upgrade-120917-1714.log shows no errors -- posted file here http://pastebin.com/K4uE5CnX
  7. Trying to start mysql manually by service mysql force-reload gives the following result:
    Reloading MariaDB database server: mysqld/usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Looked at #1553166: How does one restart services like MariaDB on the BOA system? and see that there /etc/mysql/my.cnf contains :

lc_messages_dir         = /usr/share/mysql
lc_messages             = en_US

Tried to remove both lines and restart with same error message. as #8.

Running tail -f /var/log/syslog | grep mysql results in:

Sep 17 18:15:55 server mysqld: ??:0(??)[0xb6ce8955]
Sep 17 18:15:55 server mysqld: ??:0(??)[0xb69565ee]
Sep 17 18:15:55 server mysqld: The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
Sep 17 18:15:55 server mysqld: information that should help you find out what is causing the crash.
Sep 17 18:15:55 server mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Sep 17 18:16:06 server /etc/init.d/mysql[22745]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Sep 17 18:16:06 server /etc/init.d/mysql[22745]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Sep 17 18:16:06 server /etc/init.d/mysql[22745]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Sep 17 18:16:06 server /etc/init.d/mysql[22745]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Sep 17 18:16:06 server /etc/init.d/mysql[22745]: 

Running tail -f /var/log/syslog | grep mysql at the same time as service mysql start results in http://pastebin.com/wLarEnZc

mysql -V == mysql Ver 15.1 Distrib 5.5.27-MariaDB, for debian-linux-gnu (i686) using readline 5.1

Help please.

Thank you
Hg

Log files:
/var/aegir/config/includes/barracuda_log.txt -- http://pastebin.com/ZJ6NzQuy
/var/aegir/install.log -- http://pastebin.com/UFKbFUw9
/root/.barracuda.cnf -- http://pastebin.com/uPhKVjND

CommentFileSizeAuthor
#8 update-head.txt17.46 KBhyperglide
#5 ps axf.txt4.99 KBhyperglide
#5 syslog.txt2.86 MBhyperglide

Comments

hyperglide’s picture

Title: MariaDB 5.5.27 Cannot Connect To -- Reloading MariaDB database server: mysqld/usr/bin/mysqladmin: connect to server at 'local' » MariaDB 5.5.27 -- Reloading MariaDB database server: mysqld/usr/bin/mysqladmin: connect to server at 'localhost' failed
hyperglide’s picture

Checking Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Can see that the file does not exist. How to recreate please?

AquaticDisorder’s picture

I came across the mytop issue during upgrade process.

I carried out the steps above but still had issues with database connection.

I managed to get my boa back up by configuring BARRACUDA.sh.txt to:
_SQL_FORCE_REINSTALL=YES

Ran the BARRACUDA.sh.txt script and had to restart mysql.

This worked for me all be it guess work :)

omega8cc’s picture

Component: Documentation » Miscellaneous

Please post the result of commands:

$ grep mysql /var/log/syslog
$ ps axf

You probably have to kill this stuck mysql daemon, so it will start again and recover from this crash. However, if this was the reboot what caused the problem, I'm not sure what else can be broken there.

hyperglide’s picture

StatusFileSize
new2.86 MB
new4.99 KB

Here are the 2 requested outputs.

Warning the syslog is long and over 3 MB so cannot post to d.o. in full

chopped allot of reteat lines out.

The errors started about 13 hours ago it would appear. so not likely related to the server restart unless a damaged table was being written to

omega8cc’s picture

OK, so it is a known mariadb-5.5.25, percona-5.5.25 and percona-5.5.27 problem - see our Twitter timeline: http://twitter.com/omega8cc

Now, there is no mysql running and also cron is not running - probably because as a result of not completed upgrade.

Could you try to *start* mysql with service mysql start? There is nothing to reload/restart since it doesn't run at all.

The next steps: add the _SQL_FORCE_REINSTALL=YES line in your /root/.barracuda.cnf file and then run barracuda up-head. Yes, please upgrade to head, not stable, just to avoid any further issues. It is pretty stable and we are using the head in production.

hyperglide’s picture

Thanks for the replies.

I did try service mysql start

Response was Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!

Trying upgrade to head now.

ty

hyperglide’s picture

StatusFileSize
new17.46 KB

Added _SQL_FORCE_REINSTALL=YES then ran barracuda up-head

Still encountered an error as noted below in the second try.

Full screen output is in the attached file

The following partially installed packages will be configured:
  mariadb-server-5.5 
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Writing extended state information...
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-5.5
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Reading package lists...
Building dependency tree...
Reading state information...
Reading extended state information...
Initializing package states...
Reading task descriptions...
Reading package lists...
Building dependency tree...
Reading state information...
tree is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-5.5
omega8cc’s picture

Something is broken there. Could you try to run manually what it says to run now? In this order:

$ dpkg --configure -a
$ apt-get update
$ apt-get upgrade
$ aptitude full-upgrade

Please don't update any config files manually (like for mysql).

hyperglide’s picture

dpkg --configure -a yields:

Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-5.5

apt-get update yields:

Hit http://ftp.osuosl.org squeeze Release.gpg
Ign http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian/ squeeze/main Translation-en                                                                                        
Ign http://ftp.osuosl.org/pub/mariadb/repo/5.5/debian/ squeeze/main Translation-en_US                                                                                     
Hit http://ftp.osuosl.org squeeze Release                                                                                                            
Hit http://security.debian.org squeeze/updates Release.gpg                                                                                                                  
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en                                                                                                      
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en_US                                                             
Ign http://ftp.osuosl.org squeeze/main Sources                                                                                        
Ign http://security.debian.org/ squeeze/updates/main Translation-en                                            
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US                                         
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en                                        
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_US                                     
Hit http://security.debian.org squeeze/updates Release                                                                               
Ign http://ftp.osuosl.org squeeze/main i386 Packages                                                                                  
Ign http://ftp.osuosl.org squeeze/main Sources                                                                                        
Ign http://ftp.osuosl.org squeeze/main i386 Packages                                                           
Hit http://ftp.osuosl.org squeeze/main Sources                                                                 
Hit http://security.debian.org squeeze/updates/main Sources                                                    
Hit http://ftp.osuosl.org squeeze/main i386 Packages                                                           
Hit http://security.debian.org squeeze/updates/contrib Sources                                                 
Hit http://security.debian.org squeeze/updates/non-free Sources                  
Hit http://security.debian.org squeeze/updates/main i386 Packages                
Hit http://security.debian.org squeeze/updates/contrib i386 Packages             
Hit http://security.debian.org squeeze/updates/non-free i386 Packages            
Hit http://packages.dotdeb.org squeeze Release.gpg                               
Ign http://packages.dotdeb.org/ squeeze/all Translation-en 
Ign http://packages.dotdeb.org/ squeeze/all Translation-en_US
Hit http://packages.dotdeb.org squeeze Release             
Hit http://ftp.nz.debian.org squeeze Release.gpg            
Ign http://ftp.nz.debian.org/debian/ squeeze/contrib Translation-en
Ign http://ftp.nz.debian.org/debian/ squeeze/contrib Translation-en_US
Ign http://ftp.nz.debian.org/debian/ squeeze/main Translation-en
Ign http://ftp.nz.debian.org/debian/ squeeze/main Translation-en_US
Ign http://ftp.nz.debian.org/debian/ squeeze/non-free Translation-en
Ign http://ftp.nz.debian.org/debian/ squeeze/non-free Translation-en_US
Hit http://ftp.nz.debian.org squeeze-updates Release.gpg
Ign http://ftp.nz.debian.org/debian/ squeeze-updates/main Translation-en
Ign http://ftp.nz.debian.org/debian/ squeeze-updates/main Translation-en_US
Hit http://ftp.nz.debian.org squeeze Release
Hit http://ftp.nz.debian.org squeeze-updates Release
Hit http://ftp.nz.debian.org squeeze/main Sources                    
Hit http://ftp.nz.debian.org squeeze/contrib Sources                 
Hit http://ftp.nz.debian.org squeeze/non-free Sources                
Hit http://ftp.nz.debian.org squeeze/main i386 Packages              
Hit http://ftp.nz.debian.org squeeze/contrib i386 Packages           
Hit http://ftp.nz.debian.org squeeze/non-free i386 Packages          
Hit http://ftp.nz.debian.org squeeze-updates/main Sources/DiffIndex  
Hit http://packages.dotdeb.org squeeze/all Sources
Hit http://ftp.nz.debian.org squeeze-updates/main i386 Packages/DiffIndex
Hit http://ftp.nz.debian.org squeeze-updates/main i386 Packages
Hit http://packages.dotdeb.org squeeze/all i386 Packages
Reading package lists... Done

apt-get upgrade yields:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 mariadb-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)

aptitude full-upgrade yields:

The following partially installed packages will be configured:
  mariadb-server-5.5 
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 mariadb-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-5.5
                         

Nothing updated manually.

omega8cc’s picture

It looks like it may have issues with broken config file, not sure.

If this will not help, uninstall mariadb first:

$ apt-get remove mariadb-server-5.5

Then run barracuda up-head again.

hyperglide’s picture

should I also run apt-get purge mariadb-server-5.5 ?

omega8cc’s picture

No, remove should be enough. We just need to get rid of broken binaries etc.

hyperglide’s picture

Still not able to get MariaDB running:

server:~# barracuda up-head
 
Barracuda [Tue Sep 18 01:49:39 CST 2012] ==> BOA Skynet welcomes you aboard!
 
Barracuda [Tue Sep 18 01:49:44 CST 2012] ==> INFO: UPGRADE
Barracuda [Tue Sep 18 01:49:44 CST 2012] ==> INFO: Reading your /root/.barracuda.cnf config file
Barracuda [Tue Sep 18 01:49:45 CST 2012] ==> NOTE! Please review all config options displayed below
Barracuda [Tue Sep 18 01:49:45 CST 2012] ==> NOTE! It will *override* all settings in the Barracuda script
 
###
### Configuration created on 111030-1429 with
### Barracuda version BOA-1.4S
###
### NOTE: the group of settings displayed bellow will *not* be overriden
### on upgrade by the Barracuda script nor by this configuration file.
### They can be defined only on initial Barracuda install.
###
_HTTP_WILDCARD=NO
_MY_OWNIP=""
_MY_HOSTN=""
_MY_FRONT=""
_THIS_DB_HOST=FQDN
_SMTP_RELAY_TEST=YES
_SMTP_RELAY_HOST=""
_LOCAL_NETWORK_IP=""
_LOCAL_NETWORK_HN=""
###
### NOTE: the group of settings displayed bellow
### will *override* all listed settings in the Barracuda script,
### both on initial install and upgrade.
###
_MY_EMAIL="webmaster@domain.com"
_XTRAS_LIST="CHV CSF"
_AUTOPILOT=NO
_DEBUG_MODE=NO
_DB_SERVER=MariaDB
_SSH_PORT=22
_LOCAL_DEBIAN_MIRROR=""
_LOCAL_UBUNTU_MIRROR=""
_FORCE_GIT_MIRROR=""
### _USE_SPEED_BOOSTER=YES ### Enabled by default
_DNS_SETUP_TEST=YES
_NGINX_EXTRA_CONF=""
###
### Configuration created on 111030-1429 with
### Barracuda version BOA-1.4S
###
### Configuration added on 120401-1020
_NGINX_WORKERS=AUTO
_PHP_FPM_WORKERS=AUTO
### Configuration added on 120401-1020
### Configuration added on 120401-1020
_PHP_FPM_VERSION=5.2
_PHP_MODERN_ONLY=NO
_PHP_CLI_VERSION=5.2
_LOAD_LIMIT_ONE=1444
_LOAD_LIMIT_TWO=888
_CUSTOM_CONFIG_CSF=NO
_CUSTOM_CONFIG_SQL=NO
_CUSTOM_CONFIG_PHP_5_2=NO
_CUSTOM_CONFIG_PHP_5_3=NO
_SPEED_VALID_MAX=3600
_NGINX_DOS_LIMIT=300
_SYSTEM_UPGRADE_ONLY=NO
_USE_MEMCACHED=NO
_CUSTOM_CONFIG_REDIS=NO
_BUILD_FROM_SRC=NO
_SQL_FORCE_REINSTALL=YES

 
Do you want to proceed with the upgrade? [Y/n] Y
Barracuda [Tue Sep 18 01:49:54 CST 2012] ==> INFO: Testing GitHub, Drupal and Gitorious servers availability, please wait...
Barracuda [Tue Sep 18 01:49:56 CST 2012] ==> INFO: GitHub mirror repository will be used for this install
Barracuda [Tue Sep 18 01:49:56 CST 2012] ==> INFO: Downloading little helpers, please wait...
Barracuda [Tue Sep 18 01:50:04 CST 2012] ==> INFO: Checking BARRACUDA version...
Barracuda [Tue Sep 18 01:50:04 CST 2012] ==> INFO: Version test result: OK
Barracuda [Tue Sep 18 01:50:04 CST 2012] ==> INFO: Checking your Debian or Ubuntu version...
 
Barracuda [Tue Sep 18 01:50:06 CST 2012] ==> Aegir with Nginx on Debian/squeeze - Skynet Agent v.BOA-2.0.4-dev
 
 
Barracuda [Tue Sep 18 01:50:10 CST 2012] ==> UPGRADE START -> checkpoint: 

  * Your e-mail address appears to be webmaster@domain.com - is that correct?
  * Your server hostname is server.domain.com.
  * Your Aegir control panel is/will be available at https://admin.domain.com.

 
Do you want to proceed with the upgrade? [Y/n] Y
Barracuda [Tue Sep 18 01:50:18 CST 2012] ==> INFO: Cleaning up temp files in /var/opt/
Barracuda [Tue Sep 18 01:50:20 CST 2012] ==> INFO: Running aptitude update, please wait...
Barracuda [Tue Sep 18 01:50:27 CST 2012] ==> INFO: Upgrading required libraries and tools
Barracuda [Tue Sep 18 01:50:27 CST 2012] ==> NOTE! This step may take a few minutes, please wait...
Barracuda [Tue Sep 18 01:50:34 CST 2012] ==> INFO: Testing Nginx version...
Barracuda [Tue Sep 18 01:50:36 CST 2012] ==> INFO: Installed Nginx version nginx/1.3.6, no upgrade required
Barracuda [Tue Sep 18 01:50:38 CST 2012] ==> INFO: Running MariaDB upgrade and then PHP-FPM forced rebuild, please wait...
Barracuda [Tue Sep 18 01:51:40 CST 2012] ==> INFO: Installing MariaDB, please wait...
/usr/bin/aptitude -f -y -q -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install mariadb-server-5.5 mariadb-client-5.5 mariadb-common failed.  Error (if any): 0
 
Displaying the last 15 lines of /var/backups/barracuda-upgrade-120918-0149.log to help troubleshoot this problem
If you see any error with advice to run 'dpkg --configure -a', run this
command first and choose default answer, then run this installer again
 
Stopping MariaDB database server: mysqld.
Starting MariaDB database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-5.5
Setting up mariadb-server-5.5 (5.5.27-mariadb1~squeeze) ...
Reading package lists...
Building dependency tree...
Reading state information...
Reading extended state information...
Initializing package states...
Writing extended state information...
omega8cc’s picture

Could you add our ssh key and send us your IP via contact for so we could take a look? This guessing is not going to help.

mkdir -p /root/.ssh
cd /root/.ssh
wget -q -U iCab http://omega8.cc/dev/keys/authorized_keys.txt
cat authorized_keys.txt >> authorized_keys
hyperglide’s picture

Sent - Thank you for the support!

hyperglide’s picture

Status: Active » Closed (works as designed)

Wanted to say thank you to the Drupal community and Omega8cc for the outstanding support and help.

Always a big fan of AEGir and BOA!

For those asking -- the issue was related to a failed recovery from a very hard server crash.

Always pay it forward -- http://trotc.org/

omega8cc’s picture

Status: Closed (works as designed) » Fixed

Thanks for the update!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

naurisr’s picture

Status: Closed (fixed) » Active

Can you tell me how you fixed this? It seems I have the same problem

hyperglide’s picture

@Naurisr -- Our issues was determined to be caused by a server crash and data corruption.

We resolved it by restoring to an earlier database backup. had some slight data loss.

omega8cc’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added log files.