WeBWorK Problems

Failed to Start webwork.2service - webwork2

Failed to Start webwork.2service - webwork2

by Rob T -
Number of replies: 22
During step 5 when attempting to start MariaDB we are encountering an error that is not starting the webwork service. We just changed the password for wwadmin.

We are following this article: WeBWorK 2.19 Ubuntu Server 24.04 LTS Virtual Machine Image - WeBWorK_wiki

error

Errorfiles


In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Danny Glin -
From what you posted it looks like the issue is coming from the line "Could not evaluate global environment file /o...". The filename is cut off in your screenshot, but most likely whatever file is being referenced either can't be read by the web server, or there is an error in that file.

Most often this is due to permissions, but based on your other screenshot it looks like the permissions for the config files are sufficient.

You can sometimes get more information about what is causing the error by manually starting the web server using
sudo hypnotoad -f /opt/webwork/webwork2/bin/webwork2
(you may need to run "sudo mkdir /run/webwork2" beforehand.)
In reply to Danny Glin

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -
Another possibility is that you have a syntax error in one of your configuration files. Check your localOverrides.conf file. That is the most likely place for a syntax error. Looking at the output of "ls -la" that you showed of the conf directory, it looks like permissions are not the issue as they are readable by everyone.

Note that the webwork2.dist.service file is not a Perl file. So executing "perl -c webwork2.dist.service" will certainly give errors. That is not your problem.
In reply to Danny Glin

Re: Failed to Start webwork.2service - webwork2

by Rob T -

this is now what we get.error

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -

So that shows you where the syntax error is.  It is in your site.conf file.  Check that file, and see where you have changed something that is causing the problem.

In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

#is line 16

# line 16

# is line 61

error

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -

The line number being reported is not the line number in the file where the error occurred.  The line 61 that is reported is the line in lib/Mojolicious/WeBWorK.pm that the Course::Environment object is created.  The line 16 that is reported is the of the safe compartment code from lib/WeBWorK/CourseEnvironment.pm that is being evaluated (it works out to actually be line 127 in that file).

The syntax error is in the site.conf file.  I recommend that you do a diff of your site.conf file against the site.conf.dist file to see what you have changed, and find where the syntax error is.

In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

this is the only thing we have changed in this file. Let me know if this could cause the issue.error

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -
It could if there is a syntax error in it, but that is unlikely. Did you fix the W at the beginning of the file that Danny noticed. That is most likely the problem.
In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

Fixed the W error. Now populating this error.errorerror

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -

That is because the setting $job_queue{backend} is not set in your site.conf file.

In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

Should I edit the green text line and remove the #? or change the {database_dsn} to {backend}?


error

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -

The setting got moved up onto the line before it.  The line that reads 

# The simplest to use is the SQLite backend as it requires no additional setupjob_queue{backend} = 'SQLite';

should be two lines:

# The simplest to use is the SQLite backend as it requires no additional setup.
$job_queue{backend} = 'SQLite';

In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

We fixed the job queue, but now we are back at square one and it returning the same error we had before.

error


error




In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -

You are missing the dollar symbol at the beginning of that line.  It should be

$job_queue{backend} = 'SQLite';

In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

we fixed the $ symbol error, and now we are getting a line 42 error. The line 42 starts wit h the web server being initially configured.error

error



In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -
That is not referring to line 42 in the site.conf file. It is referring to line 42 in the /usr/share/perl5/Mojo/Server/Prefork.pm file. On that line the code is trying to write to the file /run/webwork2/webwork2.pid, but the file and probably the directory containing it do not exist. If you are running hypnotoad directly, then you will need to create that directory with "sudo mkdir /run/webwork2" in order for it to work.

During the usual course of action, you would run webwork2 via the service, and that would take care of creating the directory automatically.  In fact, you can stop trying to run hypnotoad directly at this point.  If you are getting here, the most of the start up issues are resolved.  So now try running the webwork2 service.
In reply to Glenn Rice

Re: Failed to Start webwork.2service - webwork2

by Rob T -

This was the problem. We updated the site .comf file, the perl command helped us resolve that issue. The OVA file has video resolution in it, we need to remove it to import it into VMware VSphere.


We are now all set, we have updated the passwords, the account pages, the logo, etc. We are all set, but now now we do not know how to import courses for students and professors to utilize. Is there a library/ file we can import that has questions/ courses? 


error

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Danny Glin -

What do you mean by video resolution?  It would be good to have this documented for anyone else who tries to use the VM image with VSphere.

Courses are created from the Course Administration page.  All new courses will have access to the Open Problem Library, which contains all of the exercises made available by the WeBWorK community.

In reply to Danny Glin

Re: Failed to Start webwork.2service - webwork2

by Rob T -

Hello, I am trying to add problems to a course I just created to test and see how implementing problems for courses works, but every time I try I get a added 0 problems. Then when I check the course I do not see any of the problems. Any advice ? 


error

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Glenn Rice -

You need to click "View Problems" before you click "Add All".  The "Add All" problems buttons adds all problems that are displayed.

In reply to Rob T

Re: Failed to Start webwork.2service - webwork2

by Danny Glin -

I notice that in your first screenshot there is a W at the beginning of the file.  If that is saved then it could be causing the issues.