WeBWorK Main Forum

Upgrade from 2.17 to 2.18: Unknown server communication error.

Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -
Number of replies: 8

I have just upgraded from WW 2.17 to WW 2.18 on my local machine following the instruction given in the Upgrade Notes.

Things seems to be working fine: I can rending the problems of my existing courses. However, when I get the the Library Browser, I got

/webwork2/instructor_rpc

Unknown server communication error.

And when I click "View Problems" I got

Unexpected token '<', "

(see attached screenshot)

Any suggestion?

----------------------------------------------------------------------Render issue


In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Glenn Rice -
There are a couple of things to check. First check that you don't have any local modifications that are interfering. For this run "git status" in the "/opt/webwork/webwork2" and "/opt/webwork/pg" directories. In both directories it should show

On branch main
Your branch is up to date with 'origin/main'

If it shows "Your branch and "origin/main" have diverged" or something like that, then you have local modifications.  If it shows "Changes not staged for commit:" and lists files below, then you also have local modifications.  You can ignore "Untracked files" if that shows up.  If you have local modifications, then you need to revert any of those.

If you don't have local modifications, then try running "npm ci" from the /opt/webwork/webwork2/htdocs and /opt/webwork2/pg/htdocs directories, and then restart the webwork2 app with "sudo systemctl restart webwork2".  Then see if the problem is resolved.
In reply to Glenn Rice

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -

Hi Glenn,

      git status in /opt/webwork/webwork2 shows

Changes to be committed:

  (use "git restore --staged <file>..." to unstage)

        deleted:    conf/localOverrides.conf.dist

        deleted:    conf/site.conf.dist

        new file:   htdocs/themes/math4/math4-coloring.css

and no problem in /opt/webwork/pg

I surely deleted those conf.dist file, because I accidentally modified them instead of the local conf files and saved them as conf (without the .dist)

What should I do then?

Thanks

In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -

Just for the referrence to anyone who may have the same problem.

The issue for me was in math4/math4-coloring.css

npm ci gives the following complains.

In themes/math4/math4-overrides.css:

expected ":".

    ╷

305 │     color: #FF6600; b

    │                      ^

    ╵

Replacing math4-overrides.css by the one that comes with the distro, math4-overrides.css.dist, solves my issue.

"Note that theming is no longer done with this file." that's what said in the math4-overrides.css.dist file. 

In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Glenn Rice -

So you had a syntax error in your math4-coloring.css file.  When the generate-assets.js script runs (it is called when you run "npm ci") it attempts to minimize the file, and fails because of the syntax error.

The math4-coloring.css file is not used at all.  There isn't even a math4-coloring.css.dist file in the distribution anymore.  If you have one, then it is a remnant from previous versions of WeBWorK.  You should just delete the math4-coloring.css and math4-coloring.css.dist files.

In reply to Glenn Rice

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -
Glenn, thanks for letting me know. I will simply delete them then.
In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -
Hi I'm having the this trouble again :(
I have just upgraded from Ubuntu 22.04 to 24.04 but that WebWork is still 2.18 but get this

/webwork2/instructor_rpc
Unknown server communication error.

But this time for sure is not the problem of math4-overrides.css

As you know Ubuntu 24.04 is running php 8.3, I wonder whether mpm_prefork would have anything to do with it.
In reply to Wai Yan Pong

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Glenn Rice -

You should not be using mpm_prefork with webwork 2.18 or newer.  See https://webwork.maa.org/wiki/Installation_Manual_for_2.19_on_Ubuntu#Option_2:_Serving_via_Proxy_by_Apache2 for instructions on setting up mpm_event instead.

Do you have php 8.3 enabled on your server?  You don't need that for webwork2.  If you aren't using it for something else, then disable it.  If you are, then switch to using `php8.3-fpm`.  That is better and works with mpm_event.  I forget the name of the old cgi module for php8.3, but make sure to disable that.

In reply to Glenn Rice

Re: Upgrade from 2.17 to 2.18: Unknown server communication error.

by Wai Yan Pong -
Glenn, we do need php on that sever.

Also, following your advice, I dismoded php8.3, php8.1, mpm_prefork and enabled mpm_event.
However, we still get Unexpected token '<', " when I try to render the questions and Unknown server communication error when we try to review problem using Library browser.

Well, I don't think that's the cause but after upgrade to Ubuntu 24.02, we need to install the perl module DBD::MariaDB to have webwork2 runs.

What else can we try?