[EP-tech] Apache and PerlSwitches

John Salter J.Salter at leeds.ac.uk
Wed May 13 11:34:58 BST 2020


Are things getting loaded by Apache in the right order?
If you're loading EPrints before mod_perl, that might be the cause?

I think Apache 2.4 has more options of where config files live - e.g. /etc/httpd/conf.modules.d/
I can't remember the order of precedence for that directory, and .load vs .conf is though!

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Matthew Brady via Eprints-tech
Sent: 13 May 2020 11:21
To: eprints-tech at ecs.soton.ac.uk; David R Newman <drn at ecs.soton.ac.uk>
Subject: Re: [EP-tech] Apache and PerlSwitches

HI,

I hadn't run the generate apacheconf, I was using our codebase dropped into the new vm for testing/etc.. but I have run it now...

The newly minted conf file...
#
# apache.conf include file for EPrints
#
# Any changes made here will be lost if you run generate_apacheconf
# with the --replace --system options
#

# Load the perl modules & repository configurations
PerlSwitches -I/opt/eprints3/perl_lib
PerlModule EPrints
PerlPostConfigHandler +EPrints::post_config_handler

# Load the per-repository apache configuration
Include /opt/eprints3/cfg/apache/*.conf


The error still persists, but the line following this one, (which i somehow overlooked originally... ) also points to PerlSwitches...

AH00526: Syntax error on line 9 of /opt/eprints3/cfg/apache.conf:
Invalid command 'PerlSwitches', perhaps misspelled or defined by a module not included in the server configuration


Matt.
________________________________
From: eprints-tech-bounces at ecs.soton.ac.uk <eprints-tech-bounces at ecs.soton.ac.uk> on behalf of David R Newman via Eprints-tech <eprints-tech at ecs.soton.ac.uk>
Sent: Wednesday, May 13, 2020 6:15 PM
To: Matthew Brady <Matthew.Brady at usq.edu.au>; eprints-tech at ecs.soton.ac.uk <eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] Apache and PerlSwitches


Hi Matt,



This is a bit of a mystery.  Did you run generate_apacheconf to generate new Apache configuration files like the one that has the syntax error you reported or did you just copy this from the older server.  If the latter, run the following command (as the eprints user) to make sure you have Apache configuration appropriate for your current environment:



/opt/eprints3/bin/generate_apacheconf --system --replace



It may be that something other than this line is causing the issue but due to a syntax issue it is reporting this line as a problem rather than the one that is actually at fault.



Regards



David Newman


On 13/05/2020 08:51, Matthew Brady wrote:
Hi David,

Always something new to learn... Its in the list, last entry...

$ httpd -M
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
...
...
perl_module (shared)


________________________________
From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk> <eprints-tech-bounces at ecs.soton.ac.uk><mailto:eprints-tech-bounces at ecs.soton.ac.uk> on behalf of David R Newman via Eprints-tech <eprints-tech at ecs.soton.ac.uk><mailto:eprints-tech at ecs.soton.ac.uk>
Sent: Wednesday, May 13, 2020 5:45 PM
To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk> <eprints-tech at ecs.soton.ac.uk><mailto:eprints-tech at ecs.soton.ac.uk>; Matthew Brady <Matthew.Brady at usq.edu.au><mailto:Matthew.Brady at usq.edu.au>
Subject: Re: [EP-tech] Apache and PerlSwitches


Hi Matt,



It is possible the module is installed but not loaded.  You can check by running one of the following commands:



RedHat/CentOS/Fedora: httpd -M

Debian/Ubuntu: source /etc/apache2/envvars && apache2 -M



You should see perl_module in the list returned.  My general experience is that Mod Perl is enabled automatically on RedHat-based Linux OS but often you need to run "a2enmod perl" on Debian based systems.  On RedHat based systems there should be the file /etc/httpd/conf.modules.d/02-perl.conf that loads Mod Perl.  On Debian-based systems there should be a symlinked file in /etc/apache2/mods-enabled/ called perl.load that symlinks to /etc/apache2/mods-available/perl.load.



Regards



David Newman


On 13/05/2020 08:29, Matthew Brady via Eprints-tech wrote:
Hi Yuri,

Yes, seems to be

$ yum list installed | grep mod_perl

mod_perl.x86_64                      2.0.11-1.el7               @epel
________________________________
From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk> <eprints-tech-bounces at ecs.soton.ac.uk><mailto:eprints-tech-bounces at ecs.soton.ac.uk> on behalf of Yuri via Eprints-tech <eprints-tech at ecs.soton.ac.uk><mailto:eprints-tech at ecs.soton.ac.uk>
Sent: Wednesday, May 13, 2020 4:38 PM
To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk> <eprints-tech at ecs.soton.ac.uk><mailto:eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] Apache and PerlSwitches

is mod_perl installed?


Il 13/05/20 04:17, Matthew Brady via Eprints-tech ha scritto:
> Hi All,
>
> We are in the process of running up new servers to migrate across to,
> and I am getting a problem when starting Apache.
>
> Syntax error on line 17 of /opt/eprints3/cfg/apache.conf:
>
> Line 17 contains:
>
>     PerlSwitches -I/opt/eprints3/perl_lib
>
>
> I can run epadmin with various options, which seems to indicate its
> loading the EPrints::SystemSettings into $conf and can connect to
> database etc...
>
>     $ ./epadmin --verbose test repoep3
>
>     Starting EPrints Repository.
>     Connecting to DB ... done.
>     PID: 10718
>     Everything seems OK.
>
>
>     $ ./epadmin update_dry_run repoep3
>     Dry run: Fixed saved_search__rindex.field collation
>     Dry run: Fixed document__rindex.field collation
>     Dry run: Fixed author__rindex.field collation
>     Dry run: Fixed user__rindex.field collation
>     Dry run: Fixed eprint__rindex.field collation
>     Dry run: Fixed request__rindex.field collation
>     Dry run: Fixed subject__rindex.field collation
>     Dry run: 0 datasets added
>     Dry run: 0 fields added
>     Dry run: 0 counters were added
>
>
> As this is a completely new system, there are lots of variables at play...
> Upgraded OS, Upgraded Apache  2.2 to 2.4
> I have installed the same Perl modules on this system as the existing
> systems, but I am at a loss where to start to investigate the cause...
>
> If anyone has any thoughts on where to start troubleshooting this, I'm
> all ears.
>
>
> Cheers
>
> Matt.
>
> __________________________________________________________________
> This email (including any attached files) is confidential and is
> for the intended recipient(s) only. If you received this email by
> mistake, please, as a courtesy, tell the sender, then delete this
> email.
> The views and opinions are the originator's and do not necessarily
> reflect those of the University of Southern Queensland. Although
> all reasonable precautions were taken to ensure that this email
> contained no viruses at the time it was sent we accept no
> liability for any losses arising from its receipt.
> The University of Southern Queensland is a registered provider
> of education with the Australian Government.
> (CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=6FZGxgLoLZ%2BVLRZWQYx2%2BaeH2%2Bk0d1lIXiF%2BUHxNBGs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=6FZGxgLoLZ%2BVLRZWQYx2%2BaeH2%2Bk0d1lIXiF%2BUHxNBGs%3D&amp;reserved=0>
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oItsNMVryYD5xuQkr5sV9y9jYbcCk%2Fkm14yXtEG%2FG%2FU%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oItsNMVryYD5xuQkr5sV9y9jYbcCk%2Fkm14yXtEG%2FG%2FU%3D&amp;reserved=0>

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=6FZGxgLoLZ%2BVLRZWQYx2%2BaeH2%2Bk0d1lIXiF%2BUHxNBGs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=6FZGxgLoLZ%2BVLRZWQYx2%2BaeH2%2Bk0d1lIXiF%2BUHxNBGs%3D&amp;reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oItsNMVryYD5xuQkr5sV9y9jYbcCk%2Fkm14yXtEG%2FG%2FU%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oItsNMVryYD5xuQkr5sV9y9jYbcCk%2Fkm14yXtEG%2FG%2FU%3D&amp;reserved=0>
__________________________________________________________________
This email (including any attached files) is confidential and is
for the intended recipient(s) only. If you received this email by
mistake, please, as a courtesy, tell the sender, then delete this
email.
The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland. Although
all reasonable precautions were taken to ensure that this email
contained no viruses at the time it was sent we accept no
liability for any losses arising from its receipt.
The University of Southern Queensland is a registered provider
of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech

*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=6FZGxgLoLZ%2BVLRZWQYx2%2BaeH2%2Bk0d1lIXiF%2BUHxNBGs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=6FZGxgLoLZ%2BVLRZWQYx2%2BaeH2%2Bk0d1lIXiF%2BUHxNBGs%3D&amp;reserved=0>

*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oItsNMVryYD5xuQkr5sV9y9jYbcCk%2Fkm14yXtEG%2FG%2FU%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oItsNMVryYD5xuQkr5sV9y9jYbcCk%2Fkm14yXtEG%2FG%2FU%3D&amp;reserved=0>

[Image removed by sender.]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=0uXKYsLbNvcbigGZT%2BcFwvFa9DtmHfu7F1%2BmJPE3yKQ%3D&amp;reserved=0>
Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=%2BjQ6w6JXqgXDXm5l19cwja8uD%2FN%2B%2BxpngHg4a02n6kk%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C497bcd0693a149a1fef608d7f7294c0e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=0uXKYsLbNvcbigGZT%2BcFwvFa9DtmHfu7F1%2BmJPE3yKQ%3D&amp;reserved=0>
__________________________________________________________________
This email (including any attached files) is confidential and is
for the intended recipient(s) only. If you received this email by
mistake, please, as a courtesy, tell the sender, then delete this
email.
The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland. Although
all reasonable precautions were taken to ensure that this email
contained no viruses at the time it was sent we accept no
liability for any losses arising from its receipt.
The University of Southern Queensland is a registered provider
of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)
__________________________________________________________________
This email (including any attached files) is confidential and is
for the intended recipient(s) only. If you received this email by
mistake, please, as a courtesy, tell the sender, then delete this
email.
The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland. Although
all reasonable precautions were taken to ensure that this email
contained no viruses at the time it was sent we accept no
liability for any losses arising from its receipt.
The University of Southern Queensland is a registered provider
of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200513/8612578e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 350 bytes
Desc: image002.jpg
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200513/8612578e/attachment-0001.jpg 


More information about the Eprints-tech mailing list