Error Messages "DBD::mysql::db::_login" mysql.pm and redmine.pm - Possible MySql Connection aborts
Added by Terence Mill almost 14 years ago
Hello,
we recognized some strange error messages in our logs, that look like perl's mysql connection library problems, maybe version conflicts or multi threading problems, but we are using debian lenny stable packages. I read that using perl in multi threading isn't advised for production, but the perl package "...linux-gnu-thread-multi" (look like the multi threading package) came with the debian standard packaging. All packages are apt-get uptodate to lenny repositories, we did an dist upgrade and installed vmwatetool (driving on exi) some days ago.
Following the error messages and files snipets with the code pointed in the error messages.
Would be great if some can give some hints, what could be the cause.
Using:
- Linux sid-repo 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64 GNU/Linux
- Redmine 1.0.2
- mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64)
- This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
- libapache-dbi-perl 1.07-1+lenny2 Connect apache server to database via perl's
- libapache2-mod-jk 1:1.2.26-2+lenny1 Apache 2 connector for the Tomcat Java servl
- libapache2-mod-perl2 2.0.4-5+lenny1 Integration of perl with the Apache2 web ser
- libapache2-reload-perl 0.10-2 Reload Perl modules when changed on disk
Usage: DynaLoader::dl_load_file(filename, flags=0), <DATA> line 343. [Thu Dec 16 13:05:36 2010] [notice] child pid 3748 exit signal Segmentation fault (11) Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv), <DATA> line 343. Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv), <DATA> line 343. DBI connect('database=redmine;host=localhost','redmine',...) failed: Can't connect to MySQL server on 'localhost' (111) at /usr/lib/perl5/Apache/Redmine.pm line 387 Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv), <DATA> line 343. Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv), <DATA> line 343. Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv), <DATA> line 343. [Thu Dec 16 13:09:37 2010] [notice] child pid 4046 exit signal Segmentation fault (11) DBI connect('database=redmine;host=localhost','redmine',...) failed: Can't connect to MySQL server on 'localhost' (111) at /usr/lib/perl5/Apache/Redmine.pm line 387 Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv), <DATA> line 343.
[Thu Dec 16 12:34:37 2010] [error] [client 172.16.107.171] install_driver(mysql) failed: Can't locate DBI/Const/GetInfo/ODBC.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at /usr/lib/perl5/DBI/Const/GetInfoType.pm line 46, <DATA> line 343.\nBEGIN failed--compilation aborted at /usr/lib/perl5/DBI/Const/GetInfoType.pm line 46, <DATA> line 343.\nCompilation failed in require at /usr/lib/perl5/DBD/mysql.pm line 101, <DATA> line 343.\nBEGIN failed--compilation aborted at /usr/lib/perl5/DBD/mysql.pm line 101, <DATA> line 343.\nCompilation failed in require at (eval 15) line 3, <DATA> line 343.\nPerhaps a module that DBD::mysql requires hasn't been fully installed\n at /usr/lib/perl5/Apache/Redmine.pm line 387\n [Thu Dec 16 12:34:37 2010] [error] [client 172.16.107.171] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.\nCompilation failed in require at (eval 16) line 3, <DATA> line 343.\n\n at /usr/lib/perl5/Apache/Redmine.pm line 387\n [Thu Dec 16 12:35:37 2010] [error] [client 172.16.107.171] DBD::mysql::db STORE failed: handle 2 is owned by thread 2f1d940 not current thread 237db90 (handles can't be shared between threads and your driver may need a CLONE method added) at /usr/lib/perl5/DBD/mysql.pm line 142, <DATA> line 343.\n [Thu Dec 16 13:08:36 2010] [error] [client 172.16.107.171] Can't call method "prepare" on an undefined value at /usr/lib/perl5/Apache/Redmine.pm line 235, <DATA> line 343.\n [Thu Dec 16 13:09:37 2010] [error] [client 172.16.107.171] Can't call method "prepare" on an undefined value at /usr/lib/perl5/Apache/Redmine.pm line 235, <DATA> line 343.\n
Line 387 from Redmine.pm
return DBI->connect($cfg->{RedmineDSN}, $cfg->{RedmineDbUser}, $cfg->{RedmineDbPass});
Line 142 and following from /sur/lib/perl5/DBD/mysql.pm
DBD::mysql::db::_login($this, $dsn, $username, $password) or $this = undef; if ($this && ($ENV{MOD_PERL} || $ENV{GATEWAY_INTERFACE})) { $this->{mysql_auto_reconnect} = 1; } $this;
Tx for your support!
Replies (2)
RE: Error Messages "DBD::mysql::db::_login" mysql.pm and redmine.pm - Possible MySql Connection aborts - Added by Ioan Damian over 12 years ago
For the record...
I had the same problem and solved it by switching from apache2-mpm-worker to apache2-mpm-prefork.
RE: Error Messages "DBD::mysql::db::_login" mysql.pm and redmine.pm - Possible MySql Connection aborts - Added by Vladimir Skubriev almost 11 years ago
To me this is solved problem too:
apt-get install apache2-mpm-prefork
!!!
Thank you very much.
Modification of Redmine.pm with path from
[[http://www.redmine.org/boards/1/topics/9610?r=9742#message-9742]]
And do my app more unstable with using patched Redmine.pm.
Now I use apache-mpm-prefork with passenger 4.0.35 and Redmine.pm from 2.3.4 version.
And all is fine. Redmine began to work more stable without applications crushes on apache2-mpm-prefork.
refs #9610