Difference between revisions of "System health check"

From Joomdle
Jump to: navigation, search
(Joomla URL seems to be misconfigured in Joomdle auth plugin in Moodle)
(Joomla URL seems to be misconfigured in Joomdle auth plugin in Moodle)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Languages}}
 
{{Languages}}
 
=System Health Check=
 
  
  
 
{{Current Version}}
 
{{Current Version}}
 +
 +
=System Health Check=
 +
  
 
Joomdle includes a system health check tool in Joomla Component, that helps you ensure that you have met all the prerequisites to have Joomdle working correctly.
 
Joomdle includes a system health check tool in Joomla Component, that helps you ensure that you have met all the prerequisites to have Joomdle working correctly.
Line 21: Line 22:
 
{{End of Section}}
 
{{End of Section}}
  
==Joomla Web Services==
 
===You must enable Web Services in Joomla Global Configuration===
 
You must enable Web Services in Joomla Global Configuration, in System->Global Configuration, System tab.
 
{{End of Section}}
 
 
==Joomdle XMLRPC Plugin enabled==
 
===You must enable Joomdle XMLRPC Plugin===
 
You must enable the Joomdle XMLRPC Plugin in Joomla backend, Extensions->Manage plugins.
 
{{End of Section}}
 
  
 
==Joomdlehooks User Plugin enabled==
 
==Joomdlehooks User Plugin enabled==
 
===You must enable Joomdlehooks User Plugin===
 
===You must enable Joomdlehooks User Plugin===
 
You must enable the Joomdlehooks User Plugin in Joomla backend, Extensions->Manage plugins.
 
You must enable the Joomdlehooks User Plugin in Joomla backend, Extensions->Manage plugins.
 +
{{End of Section}}
 +
==Joomla to Moodle HTTP connectivity==
 +
 +
This indicated wheter Joomla can connect to the Moodle connection test script.
 +
 +
It is useful for debugging when Joomdle web services check is failing.
 +
 +
If Joomdle web services check is OK, you can ignore the result of this check. Sometimes it will fail due to security measures in place.
 +
{{End of Section}}
 +
 +
==Moodle to Joomla HTTP connectivity==
 +
 +
This indicated wheter Moodle can connect to the Joomla connection test script.
 +
 +
It is useful for debugging when Joomdle web services check is failing.
 +
 +
If Joomdle web services check is OK, you can ignore the result of this check. Sometimes it will fail due to security measures in place.
 
{{End of Section}}
 
{{End of Section}}
  
Line 39: Line 48:
 
===It seems the Joomdle auth plugin is not enabled in Moodle===
 
===It seems the Joomdle auth plugin is not enabled in Moodle===
 
You must enable the Joomdle auth plugin in Moodle Admin->Users->Authentication->Manage Authentication.
 
You must enable the Joomdle auth plugin in Moodle Admin->Users->Authentication->Manage Authentication.
 
===Moodle networking is not enabled===
 
You must enable Moodle Networking in Moodle Admin->Networking->Settings
 
 
===You need to add your site IP to Moodle XML-RPC trusted hosts list===
 
You must add your site IP to the Moodle trusted XML-RPC hosts list, in Moodle Admin->Networking->XML-RPC Hosts
 
  
 
===Something is wrong with Joomdle Web Services setup===
 
===Something is wrong with Joomdle Web Services setup===
Line 67: Line 70:
 
* Make sure you include http://
 
* Make sure you include http://
 
* Check Joomla multi-language configuration and enter appropiate parameters in Moodle side if necessary
 
* Check Joomla multi-language configuration and enter appropiate parameters in Moodle side if necessary
 +
* Check any mod_security rules that may deny XMLRPC traffic
 +
* Disable any Joomla security extensions you may have installed and test
 +
** If it works, you should whitelist site IP address in your security extension and enable it back
 +
* Disable any Joomla SEF extensions you may have
 +
 +
 +
You may also want to visit:
 +
http::/yoursite.com/index.php?option=com_joomdle&task=ws.server&format=xmlrpc
 +
 +
If everything is working fine, you should see something like:
 +
XML-RPC Error (1): Access Denied
 +
 +
Alternatively, you could see this message, if you are trying from the server IP:
 +
faultString parse error. not well formed. error occurred at line 1, column 1, byte index 0 faultCode -32700
 +
 +
 +
If you get a different message or a blank page, there is some problem with your server configuration.
  
 
===Received empty response from Moodle===
 
===Received empty response from Moodle===
Usually this caused by a misconfigured Moodle URL in Joomdle component. Double check that it is correct and that it includes '''http://''' in front.
+
This can be caused by a misconfigured Moodle URL in Joomdle component. Double check that it is correct and that it includes '''http://''' in front.
If you are sure everything is correct, consider that it may be a connection issue (firewall, etc).
+
  
===Source IP not allowed===
+
You also need to make sure that the URL you are using is the same as the one defined in moodle/config.pgp as $CFG->wwwroot.
This means your server is using a non-public IP address for Joomla-Moodle connections. You will need to enter the displayed IP address in the "Server address" config option, which can be found:
+
 
* In Joomla 1.5, in Joomdle XMLRPC plugin configuration
+
Also check that Networking is enabled in Moodle, as well as Joomdle plugin.
* In Joomla 1.6, in Joomdle general config
+
 
 +
If you are sure everything is correct, consider that it may be a connection issue: firewall and other security measures, DNS problems....
  
 
===E_DEPRECATED errors are enabled in your PHP configuration===
 
===E_DEPRECATED errors are enabled in your PHP configuration===
Line 84: Line 104:
 
For example, my local configuration is:
 
For example, my local configuration is:
 
error_reporting = E_ALL & ~E_DEPRECATED
 
error_reporting = E_ALL & ~E_DEPRECATED
 +
 +
=Raw replies=
 +
 +
Joomdle will write raw system check XMLRPC replies to files to help you troubleshoot connection issues.
 +
 +
Files written are:
 +
* joomla_folder/logs/joomdle_system_check.xml
 +
* moodledata_folder/temp/joomdle_system_check.xml
 +
 +
 +
If you have errors in system check, you should check these files.
 +
 +
You need to read them carefully, looking for unwanted tags, code, etc.
 +
For example, you may find an HTML "<head>" tag in the XML file.
 +
 +
 +
If you find any wrong tags, not belonging to XML, in the file in moodledata folder, you should check your Joomla installation:
 +
* Try changing front end template for a moment and run system check again. If it solves the issue, it indicates some problem with the HTML generated by the template
 +
* Try disabling any non-core plugins, starting with those of type "system"
 +
 +
 +
Miloud, a Joomdle user, also contributes this information about Apache's mod_pagespeed for Joomdle versions < 1.2:
 +
 +
In case anybody having similar <head /> problem the fix is very simple, but kind of hidden and some how seems not realted, but it is the casue of the problem.
 +
 +
This problem was caused by Apache cache. So in httpd.conf there is :
 +
 +
Include conf/pagespeed.conf
 +
 +
Include conf/pagespeed_libraries.conf
 +
 +
If not commented just comment them and restart Apache or your server.

Latest revision as of 16:27, 28 October 2019


This document applies to Joomdle Release 2.0.0

System Health Check

Joomdle includes a system health check tool in Joomla Component, that helps you ensure that you have met all the prerequisites to have Joomdle working correctly.

System check.png


.

XMLRPC PHP Extension

You need to install/enable the XMLRPC extension in your PHP configuration

If you are working on a dedicated server, you must install the XML-RPC PHP extension. If on shared hosting, you should ask your provider to enable it for you.


.

Allow URL fopen

You need to set PHP option allow_url_fopen to On, on your PHP configuration

If you are working on a dedicated server, you must set PHP option allow_url_fopen to On, on your PHP configuration. If on shared hosting, you should ask your provider to enable it for you.


.


Joomdlehooks User Plugin enabled

You must enable Joomdlehooks User Plugin

You must enable the Joomdlehooks User Plugin in Joomla backend, Extensions->Manage plugins.


.

Joomla to Moodle HTTP connectivity

This indicated wheter Joomla can connect to the Moodle connection test script.

It is useful for debugging when Joomdle web services check is failing.

If Joomdle web services check is OK, you can ignore the result of this check. Sometimes it will fail due to security measures in place.


.

Moodle to Joomla HTTP connectivity

This indicated wheter Moodle can connect to the Joomla connection test script.

It is useful for debugging when Joomdle web services check is failing.

If Joomdle web services check is OK, you can ignore the result of this check. Sometimes it will fail due to security measures in place.


.

Joomdle Web Services

It seems the Joomdle auth plugin is not enabled in Moodle

You must enable the Joomdle auth plugin in Moodle Admin->Users->Authentication->Manage Authentication.

Something is wrong with Joomdle Web Services setup

Something went wrong setting up Joomdle web services in Moodle. Try visiting Notifications page in Moodle Admin->Notifications.

If you get database errors with duplicate keys, try starting over by removing the offending rows/table. Execute these queries in your Moodle database:

  • delete from mdl_config_plugins where plugin like '%joomdle%';
  • delete from mdl_mnet_host2service where hostid=0 and serviceid=4;
  • drop table mdl_joomdle_dummytable

An then, visit Notifications page again.

Moodle Network authentication is not enabled in Moodle

You must enable the Moodle Network auth plugin in Moodle Admin->Users->Authentication->Manage Authentication.

Joomla URL is not configured in Joomdle auth plugin in Moodle

You need to enter Joomla URL in Joomdle auth plugin configuration, in Moodle Admin->Users->Authentication->Joomdle

Joomla URL seems to be misconfigured in Joomdle auth plugin in Moodle

  • Re-check your Joomla URL in Joomdle auth plugin configuration, in Joomdle auth plugin in Moodle.
  • Make sure you include http://
  • Check Joomla multi-language configuration and enter appropiate parameters in Moodle side if necessary
  • Check any mod_security rules that may deny XMLRPC traffic
  • Disable any Joomla security extensions you may have installed and test
    • If it works, you should whitelist site IP address in your security extension and enable it back
  • Disable any Joomla SEF extensions you may have


You may also want to visit: http::/yoursite.com/index.php?option=com_joomdle&task=ws.server&format=xmlrpc

If everything is working fine, you should see something like:

XML-RPC Error (1): Access Denied

Alternatively, you could see this message, if you are trying from the server IP:

faultString parse error. not well formed. error occurred at line 1, column 1, byte index 0 faultCode -32700 


If you get a different message or a blank page, there is some problem with your server configuration.

Received empty response from Moodle

This can be caused by a misconfigured Moodle URL in Joomdle component. Double check that it is correct and that it includes http:// in front.

You also need to make sure that the URL you are using is the same as the one defined in moodle/config.pgp as $CFG->wwwroot.

Also check that Networking is enabled in Moodle, as well as Joomdle plugin.

If you are sure everything is correct, consider that it may be a connection issue: firewall and other security measures, DNS problems....

E_DEPRECATED errors are enabled in your PHP configuration

You have E_DEPRECATED errors enabled in your PHP configuration. You need to disable them for Joomla web services to work.

Look into your php.ini file and look for the 'error_reporting' directive. If you are on a hosted server you may need to contact your hosting company to modify your PHP configuration.

For example, my local configuration is: error_reporting = E_ALL & ~E_DEPRECATED

Raw replies

Joomdle will write raw system check XMLRPC replies to files to help you troubleshoot connection issues.

Files written are:

  • joomla_folder/logs/joomdle_system_check.xml
  • moodledata_folder/temp/joomdle_system_check.xml


If you have errors in system check, you should check these files.

You need to read them carefully, looking for unwanted tags, code, etc. For example, you may find an HTML "<head>" tag in the XML file.


If you find any wrong tags, not belonging to XML, in the file in moodledata folder, you should check your Joomla installation:

  • Try changing front end template for a moment and run system check again. If it solves the issue, it indicates some problem with the HTML generated by the template
  • Try disabling any non-core plugins, starting with those of type "system"


Miloud, a Joomdle user, also contributes this information about Apache's mod_pagespeed for Joomdle versions < 1.2:

In case anybody having similar <head /> problem the fix is very simple, but kind of hidden and some how seems not realted, but it is the casue of the problem.

This problem was caused by Apache cache. So in httpd.conf there is :

Include conf/pagespeed.conf

Include conf/pagespeed_libraries.conf

If not commented just comment them and restart Apache or your server.