Installation

RHEL 8.5 Installation Help

RHEL 8.5 Installation Help

by James Schatzman -
Number of replies: 11

I note that the RHEL installation notes are inaccurate in many minor respects. I will send a detailed list, after I am successful.

One issue that I am stuck on for the moment is this:

The instructions have you use perlbrew to build a special version of perl for webwork. That is fine. It passes its tests. However, I am not finding any instructions for configuring httpd to use that version of perl instead of the system version. There are multiple ways this could be done, I expect, from altering the apache user's startup file and changing the system PATH variable to finding the appropriate httpd configuration file and specifying where the alternative path to the perlbrew version of perl is located.

In my case:

/usr/bin/perl = system version (newer version 5.26, which does not work with webwork)

/usr/local/perlbrew/perls/perl-5.20.3/bin/perl = webwork version (older)

As it is, once webwork2 is installed in httpd, then httpd no longer starts. The status output is:

Jan 13 21:54:41 l1 systemd[1]: Starting The Apache HTTP Server...
Jan 13 21:54:41 l1 httpd[2196419]: AH00526: Syntax error on line 48 of /etc/httpd/conf.d/webwork.conf:
Jan 13 21:54:41 l1 httpd[2196419]: Can't locate DateTime.pm in @INC (you may need to install the DateTime module) (@INC contains: /opt/webwork/webwork2/lib /usr/local/l>
Jan 13 21:54:41 l1 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 13 21:54:41 l1 systemd[1]: httpd.service: Failed with result 'exit-code'.
Jan 13 21:54:41 l1 systemd[1]: Failed to start The Apache HTTP Server.

On the other hand, using the webwork version of perl, the command:

perl -MDateTime -e 'print "installed\n"'

reports:

installed


Thanks in advance!


Tags:
In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by Andrew Parker -

How did you install mod_perl? This issue (mismatch between command line perl and Apache perl) happens when mod_perl is installed through the system package manager instead of through CPAN. (See other related thread in this forum.)

The whole point of installing perlbrew + custom perl is not because WeBWorK doesn’t work with later versions of perl — rather because mod_perl is not supported by RHEL starting with release 8. 

In reply to Andrew Parker

Re: RHEL 8.5 Installation Help

by James Schatzman -

This is a new RHEL8.5 installation. mod_perl was apparently installed with httpd.

I could argue that perl is really old technology but I understand that webwork is closely tied to it. If webwork works with newer versions of perl than the one in the instructions (5.20) why have users install an old version??  The version of perl that RHEL8.5 installs is 5.26. If webwork works with that I would rather just use it....

Nevertheless, sticking with the strategy of the webwork installation instructions... The perl those instructions build (5.20) seems to be self-consistent, at least. It is just not added to the path for the apache user. Options I can think of include:

a) Uninstalling (the OS version of) perl. Putting in links to the perlbrew version in to the standard path (/usr/local/bin).

b) Figuring out how to get mod_perl or httpd to use the perlbrew version instead of the OS-installed version.

c) Putting the perlbrew version of perl into the path for the httpd user (apache) in the user's startup file.

Having httpd run as the webwork user doesn't seem like a good idea, but that would fix the problem.

I was asking for a general recommendation, because the installation instructions do not fix this problem. I note that other people have complained about the same or similar problems.

I am leaning towards option (c)...




In reply to Andrew Parker

Re: RHEL 8.5 Installation Help

by James Schatzman -
I did not explicitly install mod_perl. It was apparently installed by the RHEL8.5 installer. I read that mod-perl was dropped from RHEL 8.0, because it is buggy and fails its own tests, and because the mod_perl maintainer asked for it to be removed. However, it appears to be back in RHEL 8.5, if not in earlier releases. Also, I believe that mod_perl was added to the EPEL repo much earlier.
In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by Andrew Parker -
You are correct that mod_perl is included in EPEL, but I was unsuccessful in getting the EPEL version to work. If you figure it out, please share your process as it would greatly simplify the WeBWorK installation process for RHEL8.

I still suspect that the mod_perl that your httpd is using was not built by the custom perl (5.20) -- which is why the necessary libraries are not being found. Please provide the full contents of the error message that lists the contents of @INC from your apache logs. In your original message, the line is truncated:

> Jan 13 21:54:41 l1 httpd[2196419]: Can't locate DateTime.pm in @INC (you may need to install the DateTime module) (@INC contains: /opt/webwork/webwork2/lib /usr/local/l>
 
The paths in @INC will inform as to which perl this mod_perl is using. If it does not reference your custom perl paths, you may need to restart the installation process. It was my experience that uninstalling/reinstalling mod_perl in RHEL only leads to more headaches.
In reply to Andrew Parker

Re: RHEL 8.5 Installation Help

by James Schatzman -

Removing /usr/bin/perl does not change the result. Also, changing the PATH variable for the httpd process does not change anything.

I expected that httpd would be trying to run the perl executable from its path. That is apparently not the case.

So... I guess this is what you were trying to tell me. It appears that the mod_perl.so in apache is essentially a shared library version of the perl application.

To fix the problem the options seem to be

1) Figure out how to create a version 5.20.3 of mod_perl.so and replace the one in httpd.

2) Make httpd work without mod_perl and just run the executable.

Since I don't know how to do either, I am open to suggestions. Thanks!


In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by James Schatzman -
-- Unit httpd.service has begun starting up.
Jan 14 22:07:47 l1 httpd[2964288]: AH00526: Syntax error on line 48 of /etc/httpd/conf.d/webwork.conf:
Jan 14 22:07:47 l1 httpd[2964288]: Can't locate DateTime.pm in @INC (you may need to install the DateTime module) (@INC contains: /opt/webwork/webwork2/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /us> Jan 14 22:07:47 l1 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 14 22:07:47 l1 systemd[1]: httpd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- The unit httpd.service has entered the 'failed' state with result 'exit-code'.
Jan 14 22:07:47 l1 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by James Schatzman -

I found what may be a related problem.  When executed in the perlbrew environment, although cpanm mod_perl2 states that mod_perl2 is already installed, the command

cpanm -v --reinstall mod_perl2


produces voluminous output and then

----------------------------------------------------------------

Entering mod_perl-2.0.11
Checking configure dependencies from META.yml
Running Makefile.PL
Configuring mod_perl-2.0.11 ... no conflicting prior mod_perl version found - good.
Using APXS => /usr/bin/apxs
[  error] Unable to determine server version, aborting.
[  error] Invalid MP_APXS specified?
N/A
! Configure failed for mod_perl-2.0.11. See /root/.cpanm/work/1642249672.3206508/build.log for details.

--------------------------------------------------------------

The referenced log file contains:

----------------------------------------------------------------

cpanm (App::cpanminus) 1.7044 on perl 5.020003 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1642249672.3206508
You have make /usr/bin/make
You have LWP 6.60
You have /usr/bin/tar: tar (GNU tar) 1.30
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching mod_perl2 () on cpanmetadb ...
--> Working on mod_perl2
Fetching http://www.cpan.org/authors/id/S/SH/SHAY/mod_perl-2.0.11.tar.gz
-> OK
Unpacking mod_perl-2.0.11.tar.gz
Entering mod_perl-2.0.11
Checking configure dependencies from META.yml
Configuring mod_perl-2.0.11
Running Makefile.PL
-> N/A
-> FAIL Configure failed for mod_perl-2.0.11. See /root/.cpanm/work/1642249672.3206508/build.log for details.

===========================================

which doesn't actually seem to provide useful "details".



In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by James Schatzman -
That error seems to have been because I removed /usr/bin/perl. The mod_perl2 build uses apxs, which is part of httpd, and it looks for perl in /usr/bin/. Putting the OS version of perl back in /usr/bin, then mod_perl2 builds again.

I note that it installs mod_perl.so in /usr/lib64/httpd/modules, which is linked to by /etc/httpd/modules.

Now restarting httpd works!!

It seems that the command 'cpanm mod_perl2' doesn't actually install mod_perl.so if mod_perl.so is already installed, even if it is a different version. This seems like a bug in the mod_perl2 install script (in the perl codebase).
In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by James Schatzman -
However, the webwork page reports an error:
install_driver(MariaDB) failed: Can't locate DBD/MariaDB.pm in @INC (you may need to install the DBD::MariaDB module) (@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /usr/local/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/x86_64-linux-thread-multi /usr/local/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3 /usr/local/perlbrew/perls/perl-5.20.3/lib/5.20.3/x86_64-linux-thread-multi /usr/local/perlbrew/perls/perl-5.20.3/lib/5.20.3 . /etc/httpd) at (eval 679) line 3. Perhaps the DBD::MariaDB perl module hasn't been fully installed, or perhaps the capitalisation of 'MariaDB' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Mem, Proxy, Sponge, mysql. at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 88.

Executing 'cpanm DBD::MariaDB' fixes that problem.
In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by James Schatzman -
Next problem:

When creating the admin course, addcourse reports the following
=====================================
/opt/webwork/webwork2/bin/addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin
addcourse: WeBWorK root directory set to /opt/webwork/webwork2
addcourse: WeBWorK server is starting
addcourse: WeBWorK root directory set to /opt/webwork/webwork2 in webwork2/conf/webwork.apache2-config
addcourse: The following locations and urls are set in webwork2/conf/site.conf
addcourse: PG root directory set to /opt/webwork/pg
Use of uninitialized value in print at /opt/webwork/webwork2/bin/addcourse line 123.
addcourse: WeBWorK server userID is
Use of uninitialized value in print at /opt/webwork/webwork2/bin/addcourse line 124.
addcourse: WeBWorK server groupID is
addcourse: The webwork url on this site is http://webwork.2pi.net/webwork2
=======================================================

These errors appear to be harmless but I am not sure why they appear.
In reply to James Schatzman

Re: RHEL 8.5 Installation Help

by Danny Glin -

If you have corrections to the installation instructions you can edit the wiki page by logging in with the same credentials that you use for these forums.