0

i have debian lenny, which is behind a firewall that redirects ports from one server/ipAdress to my server. I have apache working with request tracker, trac, phpmyadmin, mysql. It sudenly stoped working and im looking at the logs but can´t quiet figure out what is happened, i think i sufered some kind of attack or autmatic actualization disaster. I had my server working on friday, and today monday apache was down. The main error i get when i try to get it up in the apache error logs is:

[Mon May 02 19:06:22 2011] [error] Couldn't load RT config file RT_Config.pm:\n\nRT_Config.pm did not return a true value at /opt/rt3/bin/../lib/RT/Config.pm line 585.\nCompilation failed in require at (eval 2) line 1.\n
[Mon May 02 19:06:22 2011] [error] Can't load Perl file: /opt/rt3/bin/webmux.pl for server rt.bambooscatwizard.com:0, exiting...

I also checked apache's error log at an earlier date (the previus log file) on saturday and trhough the whole day i have errors like this (took out the ip, and replaced it with SOME IP1 and SOME IP2):

[Sat Apr 30 16:20:06 2011] [error] [client SOME IP] File does not exist: /var/www/NoAuth, referer: http://todasana.fondoavila.com:8180/trac/catwizard3/ticket/281
[Sat Apr 30 16:22:59 2011] [error] [client 157.82.156.137] File does not exist: /var/www/NoAuth, referer: http://todasana.fondoavila.com:8180/trac/catwizard3/ticket/244

Where the only difference in the entries are the ticket numbers and the time.

I also have these errors but they look like search engines errors:

[Sat Apr 30 21:11:37 2011] [error] [client SOME IP2] File does not exist: /var/www/NoAuth
[Sat Apr 30 23:09:00 2011] [error] [client SOME IP2] File does not exist: /var/www/robots.txt

Then, the last error on the file, which is for monday is:

[Sun May 01 07:45:44 2011] [notice] Graceful restart requested, doing restart
Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/__init__.py", line 744, in emit
    msg = self.format(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 630, in format
    return fmt.format(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 421, in format
    s = self._fmt % record.__dict__
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 46: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.5/logging/__init__.py", line 744, in emit
    msg = self.format(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 630, in format
    return fmt.format(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 421, in format
    s = self._fmt % record.__dict__
UnicodeEncodeError: 'ascii' codec can't encode characters in position 46-49: ordinal not in range(128)

I think its obvius that the last log file entry was the cause of my apache being disabled.

I checked the acces logs and SOME IP1 and SOME IP2 are from respectivily:

SOME IP1 - - [01/May/2011:07:42:41 -0400] "GET /trac/catwizard3/ticket/208 HTTP/1.1" 200 5358 "http://todasana.fondoavila.com:8180/trac/catwizard3/timeline?from=2011-03-22T04%3A31%3A21Z-0400&precision=second" "Mozilla/5.0 (compatible; Steeler/3.5; http://www.tkl.iis.u-tokyo.ac.jp/~crawler/)"
SOME IP2 - - [01/May/2011:07:42:46 -0400] "GET /trac/catwizard3/browser/catWBackend3/tags/backend_r.3.1/trunk/backend/java-src/catw/out/production/catw/com/bamboo/catW3/DAO/impl/CategoryDAOImpl.class?rev=3 HTTP/1.1" 200 2517 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

So i was wondering if you guys could help me out on restoring the apache fellow and help me think what made him stop serving me, its master. Thank you!!

UPDATE:

If i disable rt apache works fine, if i enable the virtual host for rt the it fails, this is the virtual host for rt:

<VirtualHost *:80>
   ServerName rt.bambooscatwizard.com

   DocumentRoot /opt/rt3/share/html
   PerlRequire "/opt/rt3/bin/webmux.pl"

   <Location />
       AddDefaultCharset UTF-8
       SetHandler perl-script
       PerlResponseHandler RT::Mason
   </Location>
</VirtualHost>
Ernest
  • 239
  • 3
  • 12

1 Answers1

1

Examine /opt/rt3/lib/RT/Config.pm. Does it end with 1;? Has it been corrupted?

That python stack trace isn't informative.

I would disable all the software and re-enable each piece one-by-one to find out what is causing the problem.

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
  • it ends with 1; not sure if that means that it has been corrupted, but i dont think so because its last modified date is from when i installed the syste, – Ernest May 03 '11 at 00:00
  • Well, there is an additional end of line after the 1; – Ernest May 03 '11 at 00:01
  • Sorry, I mentioned the incorrect file. The correct file is `/opt/rt3/etc/RT_Config.pm`. It needs to end with a 1; (or anything that evaluates to true). Try running `perl -wc /opt/rt3/etc/RT_Config.pm` The same holds true for `/opt/rt3/etc/RT_SiteConfig.pm` – Mark Wagner May 03 '11 at 16:13
  • Hello, sorry i couldnt answer sooner, and thankyou very much for helping me out, the same day i realized that the file RT_Config.pm was emtpy!!!!! why and how!??? i dont know because the modified date was and old one. I made a whole copy of the folder, but im still wondering how it happen. Which log should i check ? why would someone enter my system and only empty that file, and how did the modified date wasnt modified? why not making more demage ? this is and agathy christy case then. – Ernest May 06 '11 at 21:05