WeBWorK Main Forum

"Unable to retrieve permissions" error

"Unable to retrieve permissions" error

by Sean Fitzpatrick -
Number of replies: 4
One of our instructors forwarded a message to me from one of her students, who keeps running into a permissions error.
I've never seen it before, and we have close to 1000 students per term on our server.

The only authentication pathway for students is LTI via Moodle; direct login is disabled.

The error she gets is "Unable to retrieve your permissions, perhaps due to a collision between your request and that of another user (or possibly unfinished request of yours). Please press the BACK button on your browser and try again."

The portion of ContentGenerator.pm that's throwing the error is:

# check to verify if there are set-level problems with running

#    this content generator (individual content generators must

#    check $self->{invalidSet} and react correctly)

my $authz = $r->authz;

$self->{invalidSet} = $authz->checkSet();

my $returnValue = MP2 ? Apache2::Const::OK : Apache::Constants::OK;

In the login logs I can see this student sometimes authenticating twice within a minute or so. Possibly that creates the collision?

The other possibility: the instructor is using the "HomeworK" LTI grade mode, so that quizzes and assignments get separate gradebook entries. Possibly this is a case of the student using the wrong LTI link and then trying to navigate to her quiz? (I think the error message for that is different, though.)


Fun fact: if you search Google for phrases including "WeBWorK" and "collision", most of the results are Chegg pages where students have uploaded some WeBWorK problem about collisions, with the WeBWorK URL visible.


The error message from webwork

In reply to Sean Fitzpatrick

Re: "Unable to retrieve permissions" error

by Danny Glin -

Have you only seen this with one student?

We were seeing this error at the beginning of the term.  We migrated to the University's new database cluster, and it appeared that connections to the database were being dropped in the middle of processes, which meant that in some cases permission levels were not being set, and in other cases problems weren't being assigned to users.  I've since had to revert back to the old DB server.

What database server are you running?  i.e. MariaDB or mysql, and what version?  Nathan Wallach reported the same error at https://github.com/openwebwork/webwork2/pull/1150, so I'm curious if there are issues with certain versions of MariaDB.

BTW, viewing the student in the Classlist Editor will fix the missing permissions.  Once you've done that the student should have no trouble logging in in the future.

In reply to Danny Glin

Re: "Unable to retrieve permissions" error

by Sean Fitzpatrick -

Thanks. As far as I know, this has only happened with one student.

For this particular instructor, it's a 3rd year course in abstract algebra, using mostly problems she wrote over the summer.

She told me that a few students complained that WeBWorK would "time out and not save their answers" but I'd have to investigate further to find out what's happening there. If they're submitting, it shouldn't time out, and submitted answers are saved automatically. Maybe there's a database problem there? But I wouldn't expect her to see several database problems in a class of 20-30 when I haven't had issues in my calculus class of 250.

I'm pretty sure we're running MySQL on the same VM as WeBWorK but I could be wrong. I've emailed our sysadmin to check.

In reply to Sean Fitzpatrick

Re: "Unable to retrieve permissions" error

by Nathan Wallach -

What version of WW are you running?

Danny and I have been discussion a possible database communications error on GitHub at https://github.com/openwebwork/webwork2/pull/1150 and some investigations I did may have found something.

It seems that there may be an issue with the Perl DBD connector - at least when it is connection to "recent" versions of Maria DB. It is not clear exactly what is wrong, but the "classic" DBD::mysql Perl module is not being kept well updated, and a fork was made to create DBD::MariaDB (which also supports regular mySQL) and is supposed to be better in terms of how it handle Unicode, among other things.

Using the new DBD driver, I am not seeing the many aborted connections as I was seeing before with the old driver. Using the new driver requires (a) installing it, (b) some changes to WW Perl files (one is critical for simple use by students, but may not address the library browser and some other things), as well as (c) a change in the DSN setting for the database connection in the WW config files.

If you are still having trouble, you may want to try out the new DBD driver.

In reply to Nathan Wallach

Re: "Unable to retrieve permissions" error

by Sean Fitzpatrick -

Thanks. I'm on 2.15, but haven't done a pull for the pg or webwork2 repos in the last month or two.

(I try not to make too many server changes in the middle of term if I can avoid it.)

We are using mySQL as far as I can tell.