Installation

Problems with Course Administration link

Problems with Course Administration link

by Michele Rosen -
Number of replies: 8
Hi,

I have recently installed Webwork with some perl module difficulties, but I believe I now have all modules correctly installed. Running check_modules.pl returns a completely installed list. I seem to now be having issues after running the addcourse script. I get the Course Administration link, but when I click on it, I get the following error:

Error messages

error instantiating DB driver WeBWorK::DB::Driver::SQL for table set_user: DBI connect('webwork','webworkWrite',...) failed: Access denied for user 'webworkWrite'@'localhost' (using password: YES) at /opt/webwork/webwork2/lib/WeBWorK/DB/Driver/SQL.pm line 65
at /opt/webwork/webwork2/lib/WeBWorK.pm line 286

Call stack

The information below can help locate the source of the problem.

  • in Carp::croak called at line 262 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::init_table called at line 254 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::init_table called at line 223 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::new called at line 286 of /opt/webwork/webwork2/lib/WeBWorK.pm
I am able to log into MySQL with the webworkWrite user, to the webwork database with password, so I know thats all working correctly. I have also checked in global.conf and the password is correct in there as well.

Any help is appreciated. Thanks.
In reply to Michele Rosen

Re: Problems with Course Administration link

by Danny Glin -
This thread may provide some insight:

It looks like certain non-alphanumeric characters cause problems in perl.  Have you tried changing the webworkWrite password to something that just uses numbers and letters?
In reply to Danny Glin

Re: Problems with Course Administration link

by Michele Rosen -
That was the issue, thanks. I changed my password in global.conf to simple text and I got the log in page. The log in page is displaying a lot of errors already. I'm running this on CentOS5.5 and wondering if thats causing me trouble.

WeBWorK error

An error occured while processing your request. For help, please send mail to this site's webmaster (root@localhost), including all of the following information as well as what what you were doing when the error occured.

Wed Jan 04 09:05:45 2012

Warning messages

Error messages

Call stack

The information below can help locate the source of the problem.

  • in Exception::Class::Base::throw called at line 809 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 410 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 378 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 476 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::listUsers called at line 206 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Login.pm
  • in WeBWorK::ContentGenerator::Login::body called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 491 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 195 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork/webwork2/lib/WeBWorK.pm

In reply to Michele Rosen

Re: Problems with Course Administration link

by Michele Rosen -
I was able to clear up all those errors by running wwdb_check and letting it install the tables for ModelCourse. Now at the log in page it is telling me that my username or password are invalid. I havent successfully logged in yet, so I definitely havent changed them from the default.
In reply to Michele Rosen

Re: Problems with Course Administration link

by Danny Glin -
Did you import users from a file when running addcourse?  If the file wasn't in the proper format, then the password may not have been set properly, or the users may not have been created.

It's worth checking the courses/admin/logs/login.log file to see what the error message is.  This should tell you what the problem is.

I don't know of an easy way to add users from the command line (other than to insert stuff directly into the database).  It's probably possible using wwdb or wwsh, but I have no experience with these.

If it's a matter of the password not being recognized, you can reset it with the newpassword script.

Hope this helps.

Danny
In reply to Danny Glin

Re: Problems with Course Administration link

by Michele Rosen -
I used the addcourse directions from the docs:

addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin

When I look at the adminClasslist.lst file, I dont see any "accounts" or what the passwords are set to. I'm just trying to do the initial log in as admin/admin, which according to the docs should work after running the addcourse script in the manner above.

I tried running the newpassword script, with the course 'admin' and the user 'admin', but I get an error that it "cant get the password for user |admin|"

When I look at the login.log file, the failure is "login failed user unknown user_id=admin login_type=normal credential_source=params"

I did have to run the wwdb_check script which installed all of the model course tables. This fixed the errors I was previously getting on the login page. I also ran the wwdb_update script, which did run through and do updates. This is also in the docs as a step to do once the Webwork database is created. Would that have broken the accounts? Should I run the addcourse script again?

In reply to Michele Rosen

Re: Problems with Course Administration link

by Danny Glin -
It sounds like the admin user didn't get imported into the course.  The easiest solution is probably to run the addcourse script again, though you may need to delete the course first using delcourse.

The other thing I would suggest is using the full path to the adminClasslist.lst file when using addcourse (i.e. --users=/opt/webwork/webwork2/courses.dist/adminClasslist.lst ) to make sure the system finds the file.
In reply to Michele Rosen

Re: Problems with Course Administration link

by Arnold Pizer -
Hi Michele,

Your trouble with MySQL tables not existing for the ModelCourse is (or was) not a real problem.  The ModleCourse is not a real course and no one should be able to log into it. It is only used to copy files from when setting up other real courses.

are the most complete.  They are for Ubuntu but once you have the system set up, you can follow them when installing WeBWorK.  They may also give you some hints when installing CentOS.  Others who have installed WeBWorK on CentOS may be able to provide detailed help.

Arnie
In reply to Arnold Pizer

Re: Problems with Course Administration link

by Michele Rosen -
Hi Danny,

Thank you for your help. I was able to delete the admin course and re-add it using the full path to the adminClasslist.lst and I was then able to log in. I noticed it deleted all the admin tables from the webwork database and re-added them, but the majority still seem to be empty. I think this is expected and things now seem to be running smoothly at the moment.

Arnie, I will try looking at the Ubuntu instructions for next steps.

Thanks to you both!
Michele