LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CentOS/linux rt4 and httpd help!! (https://www.linuxquestions.org/questions/linux-newbie-8/centos-linux-rt4-and-httpd-help-4175427249/)

y_mullah 09-14-2012 09:49 AM

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]

bathory 09-15-2012 12:32 PM

Hi,
Quote:

Can't locate Log/Dispatch.pm (...)
Most likely you miss the perl-Log-Dispatch package

Cheers

y_mullah 09-19-2012 02:53 AM

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]

bathory 09-19-2012 03:26 AM

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

y_mullah 09-19-2012 04:10 AM

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

y_mullah 09-19-2012 04:22 AM

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.

bathory 09-19-2012 07:00 AM

Quote:

Originally Posted by y_mullah (Post 4783993)
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.

y_mullah 09-19-2012 08:15 AM

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

bathory 09-19-2012 09:39 AM

Quote:

Originally Posted by y_mullah (Post 4784121)
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.

y_mullah 09-20-2012 02:52 AM

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

bathory 09-20-2012 03:18 AM

Quote:

Originally Posted by y_mullah (Post 4784843)
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

y_mullah 09-20-2012 04:16 AM

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

bathory 09-20-2012 07:50 AM

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

y_mullah 09-24-2012 02:59 AM

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.

bathory 09-24-2012 03:46 AM

Quote:

Originally Posted by y_mullah (Post 4787790)
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.


All times are GMT -5. The time now is 02:54 PM.