[chef] mysql-server fails on first restart within install


Chronological Thread 
  • From: Matthew Todd < >
  • To:
  • Subject: [chef] mysql-server fails on first restart within install
  • Date: Fri, 7 Aug 2009 20:08:46 +0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-transfer-encoding:message-id:content-type:to :from:subject:date:x-mailer; b=FevKHxwbUqc13TvwbTNPVAVLjE4tiXWX9unxDbmGTR30Oz804lqAIRs5KamgUDQk/m WdycYdqdAeD1zJv50ro6PJlpWwYxAdS3/FQT0gcOsETOmG/DRoseKbZ/gWB9ICbu73tU kVHsiWk2URBcAxqxHWqanybTN2xnoS2wSjsqY=

Hi, again, all --

I'm having trouble installing mysql-server with chef -- though if I `apt-get install mysql-server` manually, everything works fine.

Below, I've included the relevant output from the chef-client run, followed by some particularly telling bits from /var/log/daemon.log.

I first suspected (because of the pthread_create error in daemon.log) resource limits imposed by "chpst" in the runit run script, although:

* Running "exec chpst /bin/sh -c 'ulimit -a'" with chpst via runit shows 4096 allowed open processes, which seems like a lot.
* I've disabled apparmor and rebooted.
* I've adjusted the mysql[:tuning] attributes back down to the mysql- provided defaults.

And the problem remains.

Since then, I've also suspected the mysql recipe's preseeding, since earlier messages in daemon.log seem to indicate the mysql root password hasn't yet been set.

But overriding the mysql recipe's preseed file with a more trimmed- down one doesn't seem to make any difference.

Any thoughts?

We've got to stop meeting like this, :-)

Cheers,  -- Matthew



========================================
From /etc/sv/chef-client/log/main/current
========================================
2009-08-07_15:09:49.69629 INFO: Installing package[mysql-devel] version 5.1.30really5.0.75-0ubuntu10
2009-08-07_15:09:53.45174 INFO: Installing gem_package[mysql] version 2.7
2009-08-07_15:09:57.02316 INFO: Installing package[mysql-client] version 5.1.30really5.0.75-0ubuntu10
2009-08-07_15:10:01.01779 INFO: Creating directory[/var/cache/local/ preseeding] at /var/cache/local/preseeding
2009-08-07_15:10:01.01782 INFO: Setting owner to 0 for directory[/var/ cache/local/preseeding]
2009-08-07_15:10:01.01783 INFO: Setting group to 0 for directory[/var/ cache/local/preseeding]
2009-08-07_15:10:01.01784 INFO: Setting mode to 755 for directory[/ var/cache/local/preseeding]
2009-08-07_15:10:01.01784 INFO: Creating template[/var/cache/local/ preseeding/mysql-server.seed] at /var/cache/local/preseeding/mysql- server.seed
2009-08-07_15:10:01.01785 INFO: Setting owner to 0 for template[/var/ cache/local/preseeding/mysql-server.seed]
2009-08-07_15:10:01.01786 INFO: Setting group to 0 for template[/var/ cache/local/preseeding/mysql-server.seed]
2009-08-07_15:10:01.01787 INFO: Setting mode to 600 for template[/var/ cache/local/preseeding/mysql-server.seed]
2009-08-07_15:10:01.01787 INFO: template[/var/cache/local/preseeding/ mysql-server.seed] sending run action to execute[preseed mysql- server] (immediate)
2009-08-07_15:10:01.30847 INFO: Ran execute[preseed mysql-server] successfully
2009-08-07_15:10:01.33990 INFO: Installing package[mysql-server] version 5.1.30really5.0.75-0ubuntu10
2009-08-07_15:10:24.88320 ERROR: package[mysql-server] (/srv/chef/ cache/cookbooks/mysql/recipes/server.rb line 46) had an error:
2009-08-07_15:10:24.88323 apt-get -q -y install mysql- server=5.1.30really5.0.75-0ubuntu10 returned 100, expected 0
2009-08-07_15:10:24.88324 ---- Begin output of apt-get -q -y install mysql-server=5.1.30really5.0.75-0ubuntu10 ----
2009-08-07_15:10:24.88325 STDOUT: Reading package lists...
2009-08-07_15:10:24.88326 Building dependency tree...
2009-08-07_15:10:24.88327 Reading state information...
2009-08-07_15:10:24.88330 The following extra packages will be installed:
2009-08-07_15:10:24.88331 libhtml-template-perl mysql-server mysql- server-5.0 mysql-server-core-5.0
2009-08-07_15:10:24.88332 Suggested packages:
2009-08-07_15:10:24.88333   libipc-sharedcache-perl tinyca mailx
2009-08-07_15:10:24.88334 The following NEW packages will be installed:
2009-08-07_15:10:24.88334 libhtml-template-perl mysql-server mysql- server-5.0 mysql-server-core-5.0
2009-08-07_15:10:24.88335 Preconfiguring packages ...
2009-08-07_15:10:24.88336 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
2009-08-07_15:10:24.88337 Need to get 0B/27.0MB of archives.
2009-08-07_15:10:24.88338 After this operation, 88.3MB of additional disk space will be used.
2009-08-07_15:10:24.88338 Selecting previously deselected package mysql-server-core-5.0.
2009-08-07_15:10:24.88339 (Reading database ... 35807 files and directories currently installed.)
2009-08-07_15:10:24.88340 Unpacking mysql-server-core-5.0 (from .../ mysql-server-core-5.0_5.1.30really5.0.75-0ubuntu10_i386.deb) ...
2009-08-07_15:10:24.88344 Selecting previously deselected package mysql-server-5.0.
2009-08-07_15:10:24.88345 Unpacking mysql-server-5.0 (from .../mysql- server-5.0_5.1.30really5.0.75-0ubuntu10_i386.deb) ...
2009-08-07_15:10:24.88345 Selecting previously deselected package libhtml-template-perl.
2009-08-07_15:10:24.88346 Unpacking libhtml-template-perl (from .../ libhtml-template-perl_2.9-1_all.deb) ...
2009-08-07_15:10:24.88347 Selecting previously deselected package mysql-server.
2009-08-07_15:10:24.88348 Unpacking mysql-server (from .../mysql- server_5.1.30really5.0.75-0ubuntu10_all.deb) ...
2009-08-07_15:10:24.88349 Processing triggers for man-db ...
2009-08-07_15:10:24.88349 Setting up mysql-server-core-5.0 (5.1.30really5.0.75-0ubuntu10) ...
2009-08-07_15:10:24.88350 Setting up mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10) ...
2009-08-07_15:10:24.88351  * Stopping MySQL database server mysqld
2009-08-07_15:10:24.88352    ...done.
2009-08-07_15:10:24.88353 * Mounting securityfs on /sys/kernel/ security...
2009-08-07_15:10:24.88353    ...done.
2009-08-07_15:10:24.88354  * Reloading AppArmor profiles ...
2009-08-07_15:10:24.88355    ...done.
2009-08-07_15:10:24.88356  * Starting MySQL database server mysqld
2009-08-07_15:10:24.88356    ...fail!
2009-08-07_15:10:24.88357 invoke-rc.d: initscript mysql, action "start" failed.
2009-08-07_15:10:24.88358 dpkg: error processing mysql-server-5.0 (-- configure):
2009-08-07_15:10:24.88359 subprocess post-installation script returned error exit status 1
2009-08-07_15:10:24.88361 Setting up libhtml-template-perl (2.9-1) ...
2009-08-07_15:10:24.88362 dpkg: dependency problems prevent configuration of mysql-server:
2009-08-07_15:10:24.88362 mysql-server depends on mysql-server-5.0; however:
2009-08-07_15:10:24.88363 Package mysql-server-5.0 is not configured yet.
2009-08-07_15:10:24.88364 dpkg: error processing mysql-server (-- configure):
2009-08-07_15:10:24.88365  dependency problems - leaving unconfigured
2009-08-07_15:10:24.88365 Errors were encountered while processing:
2009-08-07_15:10:24.88366  mysql-server-5.0
2009-08-07_15:10:24.88367 mysql-serverSTDERR: No apport report written because the error message indicates its a followup error from a previous failure.
2009-08-07_15:10:24.88368 E: Sub-process /usr/bin/dpkg returned an error code (1)---- End output of apt-get -q -y install mysql- server=5.1.30really5.0.75-0ubuntu10 ----



========================================
From /var/log/daemon/log
========================================
Aug 7 15:10:09 guinea mysqld_safe[2529]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
Aug 7 15:10:09 guinea mysqld_safe[2529]: To do so, start the server, then issue the following commands:
Aug 7 15:10:09 guinea mysqld_safe[2529]: /usr/bin/mysqladmin -u root password 'new-password'
Aug 7 15:10:09 guinea mysqld_safe[2529]: /usr/bin/mysqladmin -u root -h guinea password 'new-password'
Aug  7 15:10:09 guinea mysqld_safe[2529]:
Aug  7 15:10:09 guinea mysqld_safe[2529]: Alternatively you can run:
Aug 7 15:10:09 guinea mysqld_safe[2529]: /usr/bin/ mysql_secure_installation
Aug  7 15:10:09 guinea mysqld_safe[2529]:
Aug 7 15:10:09 guinea mysqld_safe[2529]: which will also give you the option of removing the test
Aug 7 15:10:09 guinea mysqld_safe[2529]: databases and anonymous user created by default. This is
Aug 7 15:10:09 guinea mysqld_safe[2529]: strongly recommended for production servers.
Aug  7 15:10:09 guinea mysqld_safe[2529]:
Aug 7 15:10:09 guinea mysqld_safe[2529]: See the manual for more instructions.
Aug  7 15:10:09 guinea mysqld_safe[2529]:
Aug 7 15:10:09 guinea mysqld_safe[2529]: Please report any problems with the /usr/bin/mysqlbug script!
Aug  7 15:10:09 guinea mysqld_safe[2529]:
Aug 7 15:10:09 guinea mysqld_safe[2529]: The latest information about MySQL is available on the web at
Aug  7 15:10:09 guinea mysqld_safe[2529]: http://www.mysql.com
Aug 7 15:10:09 guinea mysqld_safe[2529]: Support MySQL by buying support/licenses at http://shop.mysql.com
Aug 7 15:10:09 guinea mysqld_safe[2593]: ERROR: 1046 No database selected
Aug 7 15:10:09 guinea mysqld_safe[2593]: 090807 15:10:09 [ERROR] Aborting
Aug  7 15:10:09 guinea mysqld_safe[2593]:
Aug 7 15:10:09 guinea mysqld_safe[2593]: 090807 15:10:09 [Note] /usr/ sbin/mysqld: Shutdown complete
Aug  7 15:10:09 guinea mysqld_safe[2593]:
Aug  7 15:10:09 guinea mysqld_safe[2747]: started
Aug 7 15:10:09 guinea mysqld[2750]: InnoDB: Error: pthread_create returned 11
Aug  7 15:10:09 guinea mysqld_safe[2752]: ended
Aug 7 15:10:24 guinea /etc/init.d/mysql[2887]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Aug 7 15:10:24 guinea /etc/init.d/mysql[2887]: ^G/usr/bin/ mysqladmin: connect to server at 'localhost' failed
Aug 7 15:10:24 guinea /etc/init.d/mysql[2887]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Aug 7 15:10:24 guinea /etc/init.d/mysql[2887]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Aug  7 15:10:24 guinea /etc/init.d/mysql[2887]:




Archive powered by MHonArc 2.6.16.

§