LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2012, 09:49 AM   #1
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Rep: Reputation: Disabled
Question CentOS/linux rt4 and httpd help!!


I recently installed rt-4.0.6 on my CentOS 5 distribution. I created /etc/httpd/conf.d/rt4.conf but when I restart my webserver (apache) I get the following error:

[root@localhost conf.d]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 11 of /etc/httpd/conf.d/rt4.conf:
Can't locate Log/Dispatch.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/sbin/../lib /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt4/sbin/../lib/RT.pm line 181.\nBEGIN failed--compilation aborted at /opt/rt4/sbin/../lib/RT.pm line 181.\nCompilation failed in require at /opt/rt4/sbin/rt-server line 92.\n\t(in cleanup) Error while loading /opt/rt4/sbin/rt-server: Can't locate Log/Dispatch.pm in @INC (@INC contains: /opt/rt4/sbin/../local/lib /opt/rt4/sbin/../lib /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt4/sbin/../lib/RT.pm line 181.\nBEGIN failed--compilation aborted at /opt/rt4/sbin/../lib/RT.pm line 181.\nCompilation failed in require at /opt/rt4/sbin/rt-server line 92.\n
[FAILED]
[root@localhost conf.d]#


this is what the rt4.conf file looks like:
# RequestTracker
<Location /rt>
Order allow,deny
Allow from all

SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server
</Location>
<Perl>
use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
</Perl>

# force rt over https always
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} rt
RewriteRule ^(.*)$ https://www.axxentis.com/$1 [R,L]
 
Old 09-15-2012, 12:32 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
Can't locate Log/Dispatch.pm (...)
Most likely you miss the perl-Log-Dispatch package

Cheers
 
Old 09-19-2012, 02:53 AM   #3
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
I installed log-dispatch and when i restarted the server i get this error:

[root@localhost ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/rt4.conf: /etc/httpd/conf.d/rt4.conf:1: <VirtualHost> was not closed.


and this is what the rt4.conf file looks like:
<VirtualHost www.axxentis.com>
### Optional apache logs for RT
# ErrorLog /opt/rt4/var/log/apache2.error
# TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug

AddDefaultCharset UTF-8

DocumentRoot "/opt/rt4/share/html"
<Location /rt>
Order allow,deny
Allow from all

SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server
</Location>
<Perl>
use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
</Perl>
# force rt over https always
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} rt
RewriteRule ^(.*)$ https://www.axxentis.com/$1 [R,L]
 
Old 09-19-2012, 03:26 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
[root@localhost ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/rt4.conf: /etc/httpd/conf.d/rt4.conf:1: <VirtualHost> was not closed.
This is self explanatory: you miss the closing "</Virtualhost>" tag.

BTW using <VirtualHost www.axxentis.com> is not the correct way to define a vhost.
You have to check the "NameVirtualHost ..." option and use the same argument for <VirtualHost ...>. Ie. if you have "NameVirtualHost *:80", you need to use <VirtualHost *:80>. And you need to add inside the vhost stanza:
Code:
ServerName www.axxentis.com
Regards
 
Old 09-19-2012, 04:10 AM   #5
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
I followed your advice and this is what I get when I restart the server:

Syntax error on line 19 of /etc/httpd/conf.d/rt4.conf:
File::Temp version 0.18 required--this is only version 0.16 at /usr/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233.\nCompilation failed in require at /opt/rt4/sbin/../lib/RT/I18N.pm line 66.\nBEGIN failed--compilation aborted at /opt/rt4/sbin/../lib/RT/I18N.pm line 66.\nCompilation failed in require at /opt/rt4/sbin/../lib/RT.pm line 111.\n\t(in cleanup) Error while loading /opt/rt4/sbin/rt-server: File::Temp version 0.18 required--this is only version 0.16 at /usr/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 233.\nCompilation failed in require at /opt/rt4/sbin/../lib/RT/I18N.pm line 66.\nBEGIN failed--compilation aborted at /opt/rt4/sbin/../lib/RT/I18N.pm line 66.\nCompilation failed in require at /opt/rt4/sbin/../lib/RT.pm line 111.\n
[FAILED]
File::Temp version 0.32 is installed on my system. when I try to install File::Temp version 0.18, it refuses
 
Old 09-19-2012, 04:22 AM   #6
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
I installed the File::Temp module v0.18. here is a summary of the module:
Module id = File::Temp
DESCRIPTION Create temporary files safely
CPAN_USERID TJENNESS (Tim Jenness <t.jenness@jach.hawaii.edu>)
CPAN_VERSION 0.22
CPAN_FILE T/TJ/TJENNESS/File-Temp-0.22.tar.gz
UPLOAD_DATE 2009-06-29
DSLIP_STATUS Rdpfp (released,developer,perl,functions,Standard-Perl)
MANPAGE File::Temp - return name and handle of a temporary file safely
INST_FILE /usr/local/lib/perl5/5.16.1/File/Temp.pm
INST_VERSION 0.18
when i restart my server i get same error mentioned above.
 
Old 09-19-2012, 07:00 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by y_mullah View Post
I installed the File::Temp module v0.18. here is a summary of the module:
Module id = File::Temp
DESCRIPTION Create temporary files safely
CPAN_USERID TJENNESS (Tim Jenness <t.jenness@jach.hawaii.edu>)
CPAN_VERSION 0.22
CPAN_FILE T/TJ/TJENNESS/File-Temp-0.22.tar.gz
UPLOAD_DATE 2009-06-29
DSLIP_STATUS Rdpfp (released,developer,perl,functions,Standard-Perl)
MANPAGE File::Temp - return name and handle of a temporary file safely
INST_FILE /usr/local/lib/perl5/5.16.1/File/Temp.pm
INST_VERSION 0.18
when i restart my server i get same error mentioned above.
You didn't say how you've installed the File::Temp module, but I guess from the INST_FILE, that you didn't use your distro's package manager (yum). That's why you get the same error.
So better run (as root):
Code:
yum update perl-File-Temp
to update the module.
 
Old 09-19-2012, 08:15 AM   #8
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
I've done that and this is what I get when I restart the server:

Syntax error on line 15 of /etc/httpd/conf.d/rt4.conf:
Invalid command 'PerlResponseHandler', perhaps misspelled or defined by a module not included in the server configuration
 
Old 09-19-2012, 09:39 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by y_mullah View Post
I've done that and this is what I get when I restart the server:

Syntax error on line 15 of /etc/httpd/conf.d/rt4.conf:
Invalid command 'PerlResponseHandler', perhaps misspelled or defined by a module not included in the server configuration
That means that the perl module is not loaded.
Did you install mod_perl and how? If you used yum, then there should be no such problem.
If you did it from sources, then you need to add in httpd.conf:
Code:
LoadModule perl_module modules/mod_perl.so
Check the actual path to mod_perl.so and if it's not the default /etc/httpd/modules, use the absolute path to it.
 
Old 09-20-2012, 02:52 AM   #10
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
I have added LoadModule perl_module modules/mod_perl.so in my httpd.conf file and this is what I get now:

Syntax error on line 200 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_perl.so into server: libperl.so: cannot open shared object file: No such file or directory
 
Old 09-20-2012, 03:18 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by y_mullah View Post
I have added LoadModule perl_module modules/mod_perl.so in my httpd.conf file and this is what I get now:

Syntax error on line 200 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_perl.so into server: libperl.so: cannot open shared object file: No such file or directory
If the module doesn't exist, you need to install it:
Code:
yum install mod_perl
 
Old 09-20-2012, 04:16 AM   #12
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
This is what I get when I do yum install mod_perl

[root@localhost CORE]# yum install mod_perl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vit.com.tr
* extras: mirror.vit.com.tr
* updates: mirror.vit.com.tr
Setting up Install Process
Package mod_perl-2.0.4-6.el5.i386 already installed and latest version
Nothing to do
 
Old 09-20-2012, 07:50 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Does the module actually exist? Run
Code:
ls -l /etc/httpd/modules/mod_perl.so
You may uninstall and reinstall the mod_perl package and see if it works
 
Old 09-24-2012, 02:59 AM   #14
y_mullah
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
This is what I get when I do as you say:

[root@localhost ~]# ls -l /etc/httpd/modules/mod_perl.so
-rwxr-xr-x 1 root root 217160 Jan 21 2009 /etc/httpd/modules/mod_perl.so


I uninstalled and reinstalled mod_perl but then still got the same error when I try to restart the server.
 
Old 09-24-2012, 03:46 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by y_mullah View Post
This is what I get when I do as you say:

[root@localhost ~]# ls -l /etc/httpd/modules/mod_perl.so
-rwxr-xr-x 1 root root 217160 Jan 21 2009 /etc/httpd/modules/mod_perl.so


I uninstalled and reinstalled mod_perl but then still got the same error when I try to restart the server.
Maybe you hit this bug and you need to upgrade to mod_perl-2.0.4-7.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS/linux rt4 and httpd help!! y_mullah Linux - Software 1 09-14-2012 11:11 AM
Re-installing httpd on CentOS 6.2 dazdaz Red Hat 9 03-19-2012 12:40 AM
CentOS 5.3 - Too many httpd process sokha Linux - Server 7 03-12-2010 01:31 AM
How to Compile httpd-2.2.13 on CentOS 5.3? k_oudom Linux - Software 18 09-17-2009 02:23 AM
Unable to start apache on CentOS Linux with error Starting httpd: Syntax error on lin pkumar2533 Linux - Newbie 9 08-26-2009 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration