Can't call method "ping"

Hi, this morning, I started getting this message in /var/log/messages:

[Thu Aug 21 08:36:08 2003] [error] Can’t call method “ping” on an
undefined value at /opt/rt3/lib/RT.pm line 122.

This seems to coincide with sporadic ‘Internal Server Error 500’ messages
in the Web GUI.

The specific portion of the file is:

sub Init {
require RT::Handle;
#Get a database connection
unless ($Handle && $Handle->dbh->ping) {
$Handle = RT::Handle->new();
}
$Handle->Connect();

mysqld is running and seems to be ok. I can add, comment, and resolve
tickets, but periodically, I get the Error 500 message.

Any idea what the cause of this is?

Thanks.

Fixed in RT 3.0.5pre3 or so. We had to do extra checking for the mysql
“morning bug” even though DBD::Mysql and Apache::DBI both purport to
magically fix it.On Thu, Aug 21, 2003 at 11:16:16AM -0700, amelton@gservices-us.com wrote:

Hi, this morning, I started getting this message in /var/log/messages:

[Thu Aug 21 08:36:08 2003] [error] Can’t call method “ping” on an
undefined value at /opt/rt3/lib/RT.pm line 122.

This seems to coincide with sporadic ‘Internal Server Error 500’ messages
in the Web GUI.

The specific portion of the file is:

sub Init {
require RT::Handle;
#Get a database connection
unless ($Handle && $Handle->dbh->ping) {
$Handle = RT::Handle->new();
}
$Handle->Connect();

mysqld is running and seems to be ok. I can add, comment, and resolve
tickets, but periodically, I get the Error 500 message.

Any idea what the cause of this is?

Thanks.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.

[Thu Aug 21 08:36:08 2003] [error] Can’t call method “ping” on an
undefined value at /opt/rt3/lib/RT.pm line 122.

Same thing has happened here recently with MySQL 4.1.

sub Init {
require RT::Handle;
#Get a database connection
unless ($Handle && $Handle->dbh->ping) {

Changing this line to

      unless ($Handle && $Handle->dbh && $Handle->dbh->ping) {

seemed to fix the problem with no apparent drawbacks.

Thanks,
/Autrijus/

Jesse Vincent <jesse@bestpractical.com> wrote:

> Fixed in RT 3.0.5pre3 or so.

I just encountered this bug in that RT 3.0.5pre3 with MySQL 4.0.14. It was oddly manifesting as the style sheet only generating the error. Autrijus's fix did the trick.

Michael

--

Michael S. Liebman

Viacom Networks N.O.C. ENGINEERING

Email: michael.liebman@mtvstaff.com

Phone: 631-435-4900 x3304

Fax: 631-231-8051