Forums | Mahara Community

Support /
Message "Site unavailable A nonrecoverable error occurred. This probably means you have encountered a bug in the system"


27 July 2021, 20:05

Hi everybody, my name is Luis and I'm a newbie admin of Mahara and a Moodle.  I have a problem when I send a document from Moodle to Mahara, Mahara shows me this menssage:

MaharaZar: Site unavailable
A nonrecoverable error occurred. This probably means you have encountered a bug in the system

I give you more information:

  • Moodle version: Moodle 3.9.8+ (Build: 20210716)
  • Mahara version: 18.04.3testing
  • Both systems have the same public key.
  • When I use the Mahara web offline with moodle it works perfectly.
  • I do not have permissions to see the apache error.log file.

What's happening here? How do I correct it?

Thanks

 

 

Robert Lyon's profile picture
Posts: 773

28 July 2021, 7:46

Hi Luis,

Unfortunately that error is a catch-all generic error in Mahara and so is too hard to diagnose the problem from that alone.

More help would exist in the apache error.log so I'd suggest asking for a copy of it from the system administrator that looks after the server - but if you can't get that one thing you could try is this:

If you can access the dataroot folder for the site (defined by $cfg->dataroot in config.php file) then you could specify the error log info to go to a file that you can see.

To do this add/adjust the logging info in your config.php file by placing this at the end of the file

$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG | LOG_TARGET_FILE;
$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG | LOG_TARGET_FILE;
$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG | LOG_TARGET_FILE;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG | LOG_TARGET_FILE;
$cfg->log_file = $cfg->dataroot . '/log/test_error.log';

You now should get the latest error being logged to a file called test_error.log in the dataroot 'log' subdirectory.

Note - this log will continually be overwritten by the latest activity so you'll need to check this file at same time doing the failing activity

Hope this helps

Robert

 

 

 

Cheers

Robert

28 July 2021, 20:22

Hi Robert, thanks for your help. I have made the changes that you have suggested and I can expand the error information with a screenshot and an error file.

I hope they help you to diagnose the problem and that you can help me correct it

Thanks for your time

  • test_error.log
  • Screenshot_2021-07-28 MaharaZar.png
Robert Lyon's profile picture
Posts: 773

03 August 2021, 12:47

Hi Luis,

Thank you for the logging screenshot. From what I can tell (as the text is quite small) is that the error is occurring when the function "find_by_instanceid_username()" is being called.

The problem seems to be related to the checking of the remote username.

Eg, if we have a person with username = 'test01' and we have a row in the auth_remote_user table where remoteusername = 'test01' and the authinstance matches the one in the usr table things work fine

But if we have a person with username = 'test01' and we have a row in the auth_remote_user table where remoteusername = 'test01' and the authinstance matches the one in the usr table and another row in the auth_remote_user table where remoteusername = 'Test01' then things break. 
We get ERROR:  more than one row returned by a subquery used as an expression

The problem is the SQL query checks on the remoteusername by converting it to lowercase first.

We should be saving remoteusername either as lowercase only or checking before saving that there is only one of any case.
This is a bug so I'll file a bug report.

For you though - you can look through the auth_remote_user table and remove any duplicates and also check with the external systems that are supplying the remote username are supplying it as lowercase only from all places

Cheers
Robert

30 September 2021, 22:07

HI Robert, I wanted to know if the bug you told me is already corrected. I ask you to apply it in our installation or do a version update.

Thanks for your time

Best regards

 

 

Luis

Kristina Hoeppner's profile picture
Posts: 4863

01 October 2021, 9:48

Hi Luis,

The issue is not yet fixed, and it's not yet scheduled in. The bug report itself is available. We are not able to update your instance of Mahara as the Mahara core team does not manage that.

Thank you

Kristina

6 results