Moodle 503 service temporarily unavailable

I still have trouble getting moodle to work.
scenario:

[root@ns75 ~]# ps aux | grep php-fpm
root 4475 0.0 1.7 507888 33168 ? Ss 19:35 0:00 php-fpm: master process (/etc/opt/rh/rh-php71/php-fpm.conf)
apache 4476 0.0 1.3 512752 25792 ? S 19:35 0:00 php-fpm: pool www
apache 4477 0.0 0.7 510536 14776 ? S 19:35 0:00 php-fpm: pool www
apache 4478 0.0 0.9 510520 17672 ? S 19:35 0:00 php-fpm: pool www
apache 4479 0.0 0.4 509972 8124 ? S 19:35 0:00 php-fpm: pool www
apache 4480 0.0 0.4 509972 8128 ? S 19:35 0:00 php-fpm: pool www
root 8933 0.0 0.0 112704 972 pts/0 S+ 20:46 0:00 grep --color=auto php-fpm

Checking port:

netstat -an | grep :9001
tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN

What am I missing here?

Thanks for testing!

By default you go to https://yournethserver.yourdomain.tld/moodle via the app button and maybe the name cannot be resolved.

To change it to use an IP address (or a working hostname) instead:

config setprop moodle host 192.168.1.187
signal-event nethserver-moodle-update

Looks like this is the solution. Even though I have NO entries in DNS, when I go to https://serverIP/moodle it changes to https://server.localdomain.tld/moodle
After setting an IP address as target: config setprop moodle host IPADDRESS I reach the moodle instance at https://IPADDRESS/moodle

Moodle uses a wwwroot config param in /usr/share/moodle/config.php and if no “host” is set, the template defaults to SYSTEMNAME.DOMAINNAME. It’s easier for me to get as one may use more IPs but only one Systemname.

my $host = ${'moodle'}{'host'} || $SystemName . '.' . $DomainName;
$OUT .= "\$CFG->wwwroot   = 'https://$host/moodle';";

It’s documented in the wiki:

https://wiki.nethserver.org/doku.php?id=moodle34#moodle_host_property_-_change_hostname

2 Likes

I see you updated the module to Moodle 3.5
Can you update that info in the wiki too? https://wiki.nethserver.org/doku.php?id=moodle34

Yes and I’ll merge the pages as I used moodle34 as pagename because moodle already existed. It makes more sense to have just moodle.

2 Likes

Hi @mrmarkuz
I am dusting off the moodle module again. I notice that with a vanilla NethServer 7.5, updated to the latest patchlevel, php7.1 is still not set by default for Moodle.
As you suggested in a previous reply:

yum install nethserver-rh-php71-php-fpm
systemctl restart httpd

resolves the problem. So it seems the php71-php-fpm package is still not added or activated by the nethserver-moodle rpm.

Could you look into this?

1 Like

Thanks for testing, it should be fixed now. I uploaded a new rpm. You may update with

yum update nethserver-moodle

1 Like

Thanks a lot @mrmarkuz Confirmed that the issue is fixed.

1 Like

You may try the update on a test machine:

yum install https://mrmarkuz.goip.de/mirror/devtest/nethserver-moodle-0.1.2-1.9.g3c22882.ns7.noarch.rpm

1 Like

Thanks a lot @mrmarkuz
Installing a new NS VM as we spreak. Will comment back as soon as I know more.
I will be doing a fresh install and an update from Moodle3.5

1 Like

Thanks for testing!
In this module version the cli php installer/updater is used to fully setup moodle and an admin account with default password “Nethesis,1234” instead of using the web installer. Additionaly I added the moodle cron job.

https://docs.moodle.org/36/en/Installing_Moodle_using_command_line
https://docs.moodle.org/36/en/Cron

1 Like

Does that mean you also use a NS virtual host to install it in?

Sorry, what do you mean with NS virtual host? The one you can setup via web UI? In this case no.
Nothing has changed in httpd configuration. You still can reach moodle via https://nethserver/moodle.

Fresh install works as expected.

I received an error on the webinterface after updating from Moodle 3.5… Could have something to do with the autoconfig of moodle in the new package.

Do you use moodle plugins/extensions?

I didn’t get that one when testing…I only found this thread:

https://moodle.org/mod/forum/discuss.php?d=368968

What you could try:

  • Maybe a permission problem:
    chown -R apache:apache /usr/share/moodle
  • Try another signal-event nethserver-moodle-update
  • Check logfiles (/var/log/messages, /var/log/httpd/*)

Reviving an old topic, but from time to time this module needs a bit of attention. Today I received an update from the moodle dev list where they talk about collabora integration with Moodle.
This is already available for Nethserver-nextcloud but it would be great to use collabora also for Moodle.
The latest version of Moodle is version 3.8 So,if you have some spare time @mrmarkuz, can you provide for an update on that?
The link to the Moodle tracker discussion for adding collabora: https://tracker.moodle.org/browse/MDL-58943?focusedCommentId=761272&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-761272

1 Like

bump… did you find any time in updating the moodle package?

Unfortunately not but it’s still on the todo list…

1 Like

Update is coming…

2 Likes