TurnKey Linux Virtual Appliance Library

Joomla 2009.07 broken due to MySQL database connection error (solved)

Liraz Siri's picture

A very serious bug slipped through in the latest release of Joomla 2009.07. One of the installation scripts had broken authentication to the MySQL database which results in this error on installation:

Database Error: Unable to connect to the database:Could not connect to MySQL

Many thanks to Janadmin who first reported this.There are absolutely no excuses for such a serious bug slipping into a release. We'll be changing our testing process to make sure something like this never happens again.

Meanwhile I've unreleased Joomla 2009.07 until we fix it.  We're working on that right now.

Apologies to anyone who has been effected by this.

Alon Swartz's picture

Temporary fix

For those who have already downloaded the 2009.07 release, the issue can be remedied by running the following command:

/usr/lib/live-installer.d/40regen-joomla-secrets

We are still in the early stages of looking into what caused this issue and if there are any other issues that slipped through. Once all issues are fixed, we will release a new version.

Again, apologies to anyone who has been effected by this.

I guess I should have posted

I guess I should have posted the fact that this was happening to me sooner. I spent hours on the Joomla forum trying to resolve why this was happening! Running your command gets me up and running, so thanks for posting a temp work around. - One request though (and this might be better posted elsewhere) is that whenever I run a command from Webmin, be it from the command shell or say using the server interface to start/stop MySQL, the Turnkey Linux Configuration Console gets cluttered with the linux command line text and I need to hit some keys to get the Turnkey Console to display again. I'm running my Appliances in VMWare (not sure if that matters). It would be nice to see either the Console not change or the output be more streamlined.

But live is running

Hello alon, the live version of 2009.7 is running without a problem. I tested this on both servers today, the same servers where the install version is not running. I hope this helps a bit to solve it.

best regards janadmin.

best regards from a Joomla user.
Alon Swartz's picture

Diagnosis

We tracked down the cause of this issue to a sanity check raising an exception in one of the installer hooks, let me explain.

The installer hook 40regen-joomla-secrets job is to regenerate a random Joomla secret key as well as set a random password for the Joomla MySQL account.

Joomla's configuration files were updated with the new password, and the call was made to the di-live component 72mysql-conf to update the database accordingly. An exception was raised and the password was never set, so Joomla could not connect to MySQL post installation:

Database error: Unable to connect to the database

Q: But then why was the MySQL root password set correctly?
A: Because the live-installer hooks and di-live components are run in different contexts (ie. one in the chroot, other not).

Q: But its always been like this, why was an exception raised now?
A: 70mysql-conf has been thoroughly updated for our upcoming release to support new and exciting use-cases (more to come on this). One of which requires that there is only one unique instance of MySQL started when not running within a chroot. One of the sanity checks raised an exception when it received an unexpected exitcode due to the pre-initialization state of MySQL in the new installation.

The fix was simple, but the consequences were severe. This issue should never had made its way into a release, and for that we apologize. We have updated our testing protocol to make sure history doesn't repeat itself.

I am currently uploading a new version to be released.

Alon Swartz's picture

2009.07.1 released

To those following this thread, a new version has been released which solves this issue, get it here.

Solved

It's solved, I am up and running with 1.5.12. Thx and best regards for a Joomla user.

best regards from a Joomla user.
Christian Peper's picture

Applicability to 2009.6 mediawiki?

Alon,

is this applicable to the 200.6 mediawiki as well?
I receive the same "out of memory" errors as janadmin on my mediawiki installations. Only after the upgrade did things break. My guess is there is also a secret key issue, but I'm not sure how to fix it.

I tried running 40regen-mediawiki-secret and 40regen-mysql-secret but I think I have to do something else... Any ideas?

Chris.


Alon Swartz's picture

Not related

The bug this thread discusses was only applicable to the specific Joomla release, and was fixed the same day.

You mentioned "out of memory", I saw your other post - I'll comment there.

Thanks

I love it when bugs are this easy to fix- thanks for posting the solution.

Rune Skretteberg's picture

Out of Memory - Serious Apache problems!

Running Joomla - turnkey linux.distro, on vmware esx.

 

dmesg:
[24274.131693] Free swap  = 336852kB
[24274.131693] Total swap = 706820kB
[24274.131694] Free swap:       336852kB
[24274.132443] 131072 pages of RAM
[24274.132444] 0 pages of HIGHMEM
[24274.132445] 2243 reserved pages
[24274.132445] 67 pages shared
[24274.132446] 350 pages swap cached
[24274.132447] 0 pages dirty
[24274.132447] 352 pages writeback
[24274.132448] 5 pages mapped
[24274.132448] 1587 pages slab
[24274.132449] 592 pages pagetables
[24274.132450] Out of memory: kill process 9714 (mysqld) score 31822 or a child
[24274.132595] Killed process 9714 (mysqld)
 
Stituation..
site.domain/administrator  - is working..  Pretty strange..
site.domain - is not working and this error goes to console..
 
[24274.132450] Out of memory: kill process 9714 (mysqld) score 31822 or a child
[24274.132595] Killed process 9714 (mysqld)
 
Rune Skretteberg's picture

Out of Memory...

Database Error: "Unable to connect to the database:Could not connect to MySQL"

Liraz Siri's picture

Your database just died due to memory starvation

So it's not surprising you couldn't contact it.
Liraz Siri's picture

New thread for a new problem + we need more information

It seems this is a new problem. You'll probably have better results posting details to a new thread. Also, there are many reasons you could have run out of memory. If there's any chance of the community helping you, you're going to have to provide much more information. How much memory does the machine have, how it was installed what modifications (e.g., Joomla modules) have you made.

With Joomla third party modules are sometimes to blame for excessive memory consumption.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)