Installation

Problems render in some places but not others

Problems render in some places but not others

by Philip Loewen -
Number of replies: 8

Greetings. I have WW 2.19 running on my home Debian system, thanks to the virtual disk image provided by the project. After starting the virtual machine, I followed the steps to upgrade all the parts by pulling from github. The whole system is super-close to working: the web server runs, I have created a new course, and I even imported some set definition files that cite the OPL. The corresponding files exist and can be rendered ... sometimes. I am perplexed because I can view the rendered problems in some parts of the system but not in others.

All is well when the breadcrumb trail says WeBWorK/M317/WebWork01/4: I see problem 4. That view provides buttons to navigate the assignment, and each problem shows up correctly on a one-by-one basis.

The PDF hardcopy offered on the parent page WeBWorK/M317/WebWork01 also works nicely.

However, when I open the problem editor (sample breadcrumbs: WeBWorK/M317/Editor), I see a two-panel presentation where the problem source is in the left box and the right box of equal size just stays empty no matter what I do.

Similarly (?), on the screen at WeBWorK/M317/Instructor Tools/Sets Manager/Set Detail for set WebWork09, I can see a concise list of all the problems with their source file names, point values, etc., but the button "Render All" does nothing. I am expecting the page to show the rendered problem statements alongside these other characteristics. Toggling between MathJax and Images for the Display Mode makes no difference.

Somewhere there must be a configuration option or user-expectation upgrade that I am missing. Could someone suggest what to try? Thanks.

[Further info, relevence unknown: (1) I am comfortable with SSH access to the WW server, and I have run the command "check_modules.pl". It gives no clues about problems. (2) I'm running my own server to develop new problems far from production. I will upload the results to the "real" server later. So I am focussed on a tiny part of the vast functionality in WW. (3) Some docs suggest looking at the web server logs. But TBH I don't even know what webserver is running: there seem to be no processes named either nginx or apache, and the directory /var/log doesn't contain any files with names similar to either.]



In reply to Philip Loewen

Re: Problems render in some places but not others

by Glenn Rice -
Try running "npm ci" in both the /opt/webwork/webwork2/htdocs and /opt/webwork/pg/htdocs directories. After doing that restart the webwork2 app with "sudo systemctl restart webwork2". Then see if the problem is resolved.

If not, then check to see if there are any console errors in the browser on those pages when you try to render the problems (hit F12 to open the developer console). If there are errors, then post them here.

If there aren't errors and the problem is still not resolved, then we will need more information.

By the way, most likely the image is set up to serve webwork2 directly via hypnotoad, and so apache2 and nginx are probably not running.
In reply to Glenn Rice

Re: Problems render in some places but not others

by Philip Loewen -

Thanks for looking at this, Glenn.

In the first directory (.../webwork2/htdocs), the npm ci command runs to completion and shows no errors.

In the second one (.../pg/htdocs), the npm ci command starts and then hangs. It seems like that command normally offers play-by-play comments on what it is doing. The last thing that worked was something like

reify: jsxgraph: timing reifyNode:node_modules/caniuse-lite Completed in 2843ms

After that I get cryptic log messages with timestamps. One says, "INFO: task iou-sqp-18377:18385 blocked for more than 245 seconds." The next line says what kernel I have and the third one says what to do to disable the message. The quoted message comes back from time to time, reporting a longer blocking duration every time.

... time passes ...

I have tried a number of variations on the approach above, without success. The package manager hangs every time. Doing the same steps lead to the same results in spite of the following modified approaches ...

  • saying "systemctl stop webwork2" and "systemctl stop webwork2-job-queue" before giving the "npm ci" command,
  • compounding the above commands with a "rm -rf node_modules" in the working directory, and then saying "npm install",
  • doing all of the above and additionally using the "--no-progress" option on the "npm install" command, and
  • Installing yarn and trying "yarn install" instead of "npm install" [this one also stalls and says that iou-sqp is blocking].
These are deep waters indeed. Do you (or others) have any suggestions about what to try next?
In reply to Philip Loewen

Re: Problems render in some places but not others

by Glenn Rice -

What versions of node and npm are installed?  Run "node -v" and "npm -v" to get the versions.

Also try running "npm ci --ignore-scripts" and then run "./generate-assets.js"

In reply to Glenn Rice

Re: Problems render in some places but not others

by Philip Loewen -
wwadmin@wwserver:~$ node -v
v18.19.1
wwadmin@wwserver:~$ npm -v
9.2.0

Unfortunately the command "npm ci --ignore-scripts" hangs in the same way as described above. This leaves no opportunity to try the second command, ./generate-assets.js.

Thanks again.

In reply to Philip Loewen

Re: Problems render in some places but not others

by Glenn Rice -

You might try upgrading to node 20 or 22.  I am using node 22 now and it has been working without problem.  Version 18 should work, but it is getting old and might have some new issue that is causing problems.

To upgrade go to https://github.com/nodesource/distributions and follow the instructions there for version 20 or 22.

In reply to Glenn Rice

Re: Problems render in some places but not others

by Philip Loewen -
Thanks, Glenn. Arnie's tip about editing site.conf solved my original problem. After that was settled, I took your advice to get a new version of node from their github page. Now I have node v23.11.0 and npm version 10.9.2, and the "npm ci" script completes successfully. It's a glorious spring day and I can go back to inventing vector calculus puzzles!
In reply to Philip Loewen

Re: Problems render in some places but not others

by Arnold Pizer -
One thing that causes some things in WeBWorK not to work (e.g. displaying problems in the Library Browser) is that $server_root_url may not be set "correctly" in the site.conf file. Take a look at https://webwork.maa.org/wiki/WeBWorK_2.19_Ubuntu_Server_24.04_LTS_Virtual_Machine_Image#Edit_the_site.conf_file
Not sure if your problem is related to this but it sounds similar.  
Arnie
In reply to Arnold Pizer

Re: Problems render in some places but not others [SOLVED]

by Philip Loewen -

Arnie, this was it. Thanks a lot!

I have been away from WW for some time, so I thought I would get myself a shiny new server to prep for September. Some combination of overconfidence and impatience led me to pay less than full attention to the installation instructions. So I had missed the step where site.conf gets tweaked. Providing the right IP address for the virtual server got me up and running, and I changed the time zone from your to mine for good measure.  ;)

(The secondary problems with node that Glenn has been helping with are not yet resolved. I'm going to try his suggestion next.)

Warm regards to all, Philip