TechZIP

Wednesday, February 08, 2006

Now my favourite part....(Bugzilla 2.20 with RSS)

Before Bugzilla, I wasn't too sure about RSS and doubted it's functionality.
To my surprise it worked perfectly fine.

After searching the bugs, make sure you copy the correct URL and paste in the RSS aggregator.
Also note that the RSS aggregator should support Secure Socket Layer(https), else it won't simply work. To find this I took two days....

But it's always worth fixing these errors, after I saw the original outputs....

Problem with Perl::GD module while using Bugzilla

This module is really important for Charts and Graphs, So I decided to fix it ASAP, but still it tooks it's toll.

Bugzilla 2.20 charts were not displaying and infact I couldn't find any errors in the webserver log. When I dig deep inside, I found many GD modules installed by my Unix admin. Also identified libgd library version not matching with my GD module version.

$ ls -lt libgd*
lrwxrwxrwx 1 root other 14 Jan 17 14:49 libgd.so -> libgd.so.2.0.0
lrwxrwxrwx 1 root other 14 Jan 17 14:49 libgd.so.2 -> libgd.so.2.0.0
-rw-r--r-- 1 root other 679956 Mar 15 2005 libgd.a
-rwxr-xr-x 1 root other 700 Mar 15 2005 libgd.la
-rwxr-xr-x 1 root other 659888 Mar 15 2005 libgd.so.2.0.0

Checking for GD (v1.20) ok: found v2.22


$./test.cgi
Content-Type: Image/jpeg

ld.so.1: test.cgi: fatal: relocation error: file /opt/****perl/libn/site_perl/1.5.6.1/sun4-solaris/auto/GD/GD.so: symbol gdImageJpegPtr: refrenced symbol not found
Killed

$./sample.cgi Content-Type: Image/jpeg ld.so.1: sample.cgi: fatal: relocation error: file /opt/****perl/libn/site_perl/1.5.6.1/sun4-solaris/auto/GD/GD.so: symbol gdImagePngPtr: refrenced symbol not found Killed

Asked my Unix admin to remove all GDmodules and libgd and re-install again. You know what to my surprise it worked......

I was so happy to see the charts working ...... may be I shouldn't take these errors to my heart.

Now the "Server Error" - Bugzilla

I should say this is really a vague error, which doesn't give you any clue. I spent almost 10 researching on this error.

Finally I found that, this is something to do with permissions. The webserver should have the permissions to execute these cgi and pl codes.
Altered the obj.config file in netscape webserver (to include LD_LIBRARY_PATH)

Use
chown -R netscape:netscape bugzilla-2.20
get inside the *2.20 directory
chmod 777 * ( Note this is only for testing, make sure you block the localconfig and other pl files, this can cause sever security issues)

Bugzilla checksetup.pl

Finally the code was able to connect and compile and produce templates with out any issues.
But it took more than an hour to alter my database.

Forgot to mention while altering the database I got this strange error....

Adding full-text index for short_desc column in bugs table...
Adding new index 'bugs_short_desc_idx' to the bugs table ...
DBD::mysql::db do failed: The used table type doesn't support FULLTEXT indexes at Bugzilla/DB.pm line 468

Obtaining help from DBA, I resolved this error....

mysql> use bugs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> alter table bugs engine=MyISAM;
Query OK, 16940 rows affected (4.16 sec)
Records: 16940 Duplicates: 0 Warnings: 0

mysql> alter table longdescs engine=MyISAM;
Query OK, 77114 rows affected (2.29 sec)
Records: 77114 Duplicates: 0 Warnings: 0

mysql>

Basically it was some thing to do with the d/b engines setup default with specific tables.Altered it and it worked fine.



Now the code not able to connect(really funny)

Unix admin says, it's something to do with my 64 bit client version, but the DBA denies it.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)xxxxxxxxx#

The above error can be resolved by setting the LD_LIBRARY_PATH
xxxxxxxxxx# LD_LIBRARY_PATH=/usr/local/lib
xxxxxxxxxx# export LD_LIBRARY_PATH

I ran the Bugzilla's checksetup.pl, here is what happened


xxxxxxxxxxx# /opt/DKBbugzla/bugzilla-2.20/checksetup.pl

Checking perl modules ...Checking for AppConfig (v1.52) ok: found v1.52Checking for CGI (v2.93) ok: found v3.04Checking for Data::Dumper (any) ok: found v2.102Checking for Date::Format (v2.21) ok: found v2.22Checking for DBI (v1.38) ok: found v1.48Checking for File::Spec (v0.84) ok: found v3.13Checking for File::Temp (any) ok: found v0.12Checking for Template (v2.08) ok: found v2.08Checking for Text::Wrap (v2001.0131) ok: found v2001.0131Checking for Mail::Mailer (v1.65) ok: found v1.67Checking for Storable (any) ok: found v2.15

The following Perl modules are optional:Checking for GD (v1.20) ok: found v2.22Checking for Chart::Base (v1.0) ok: found v2.3Checking for XML::Parser (any) ok: found v2.31Checking for GD::Graph (any) ok: found v1.43Checking for GD::Text::Align (any) ok: found v1.18Checking for PatchReader (v0.9.4) ok: found v0.9.4

Checking user setup ...Removing existing compiled templates ...Precompiling templates ...

Can't connect to the database.Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Is your database installed and up and running? Do you havethe correct username and password selected in localconfig?

Now I made sure the PATH variable is exactly pointing to my mysql client and the error is resolved

Issue with the database.

I have never worked in mysql before, looks like a light weight to me when I compare it Oracle, Sybase. Anyways let me get in to the problem I faced and how I resolved it...

After ugrading my Solaris machine, I found that Iam not able to connect to a remote database. Then I identified that mysql client version is very old. Upgraded to latest mysql client

$ mysql -ubugs -pbugs -h xxxxxxxx -P 3382Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 4026 to server version: 4.1.14-max-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

Iam able to connect now.

Wednesday, February 01, 2006

Bugzilla 2.20 Installation

Bugzilla 2.20 Installation completed successfully after verifying all the modules..
Now getting along with the code.