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.

Forum: 
Alon Swartz's picture

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.

janadmin's picture

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

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

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

janadmin's picture

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

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

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.

Rune Skretteberg's picture

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

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

Liraz Siri's picture

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

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.

Add new comment