/webwork2/instructorXMLHandler: Forbidden
appears. If then I try to render additional problems (using the the render buttons of the individual problems), I get the error this error again. The webserver error log shows the following:
Error message for command: renderProblem
<br/>faultcode: Server
<br/>faultstring: Not an ARRAY reference at /opt/webwork/webwork2/lib/WebworkWebservice/RenderProblem.pm line 547.
<br/>End error message<br/>
Use of uninitialized value in subroutine entry at /usr/share/perl5/HTML/Scrubber.pm line 181.
[Tue Aug 08 20:42:21.486878 2017] [perl:error] [pid 31773] [client 192.168.122.1:47832] [/webwork2/instructorXMLHandler] Error message for command: renderProblem \n<br/>faultcode: Server \n<br/>faultstring: Not an ARRAY reference at /opt/webwork/webwork2/lib/WebworkWebservice/RenderProblem.pm line 547.\n \n<br/>End error message<br/>\n * in WeBWorK::ContentGenerator::instructorXMLHandler::content called at line 233 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm\n * in WeBWorK::ContentGenerator::go called at line 384 of /opt/webwork/webwork2/lib/WeBWorK.pm, referer: https://webwork-server/webwork2/TestCourse/instructor/sets2/Matrices/?user=admin&key=LLha9DqMjHCUOFGDIhngaESSpDrmielr&effectiveUser=admin
Does anybody have an idea what might be the reason for this error? In the past I experienced timeout errors in such situations (I think due to limited resources). But the "Forbidden" error is new to me.
my $debugXmlCode=0; # turns on the filter for debugging XMLRPC and SOAP code local(*DEBUGCODE);
Chrome shows the following errors. I noticed that in the URL the http protocol occurs, while I configured the server to use https. I might have overseen this somewhere.
jquery.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery.js:4
ajax @ jquery.js:4
(anonymous) @ problemsetdetail2.js:8
o @ jquery.js:2
fireWith @ jquery.js:2
ready @ jquery.js:2
B @ jquery.js:2
jquery.js:2 [Violation] 'DOMContentLoaded' handler took 1020ms
[Violation] Forced reflow while executing JavaScript took 307ms
[Violation] Forced reflow while executing JavaScript took 36ms
jquery.js:4 POST http://webwork/webwork2/instructorXMLHandler 403 (Forbidden)
send @ jquery.js:4
ajax @ jquery.js:4
render @ problemsetdetail2.js:319
(anonymous) @ problemsetdetail2.js:115
each @ jquery.js:2
each @ jquery.js:2
(anonymous) @ problemsetdetail2.js:112
dispatch @ jquery.js:3
i @ jquery.js:3
jquery.js:4 [Violation] 'readystatechange' handler took 2399ms
jquery.js:4 POST http://webwork/webwork2/instructorXMLHandler 403 (Forbidden)
send @ jquery.js:4
ajax @ jquery.js:4
render @ problemsetdetail2.js:319
(anonymous) @ problemsetdetail2.js:115
each @ jquery.js:2
each @ jquery.js:2
(anonymous) @ problemsetdetail2.js:112
dispatch @ jquery.js:3
i @ jquery.js:3
jquery.js:4 [Violation] 'readystatechange' handler took 1730ms
I turned on the debug output. Unfortunately the output does not help me much. Grepping the file for "error" gives lines as the following:
errors is : scalar -- not converted
error_flag is : scalar -- not converted
error_message is : scalar -- not converted
Reordering the problems (making another problem the first one) did not help neither.
jquery.js:4 POST http://webwork/webwork2/instructorXMLHandler 403 (Forbidden)
is the serious error.
Check that the site url has been defined properly (with https)
in the file webwork2/conf/site.conf
http://webwork/webwork2/instructorXMLHandler 403 (Forbidden)
This is wrong on a couple of levels. It should be https: instead of http: and I believe it should be https://yourschool.edu/webwork2/instructorXMLHandler.
This is the call that is creating the error. The next question is where is the address for this post being defined?
I might be wrong about it being defined in site.conf. One debugging trick I use is to change the variable that I think is responsible (e.g. the definition of the site url ) to something nonsensical (e.g. https://foobar.edu/.....) and see if I can detect the change. I have found more than once that I was editing the wrong file. :-)
I did tests concerning the URL that figures in the error messages in the Chrome console. It seems to be derived from the URL in the browser of the user and not depend on the value of the URL configured in site.conf. The fact that it figured http and not https was due to the fact that I accessed the server exceptionally using Chrome for debugging purposes. It is a test server and I do not have a http -> https forwarding configured there. Therefore I was accessing the server using http without noticing it (Chrome seems to prepend incomplete URLs by http). This seems to be the cause for the http in the URL in the error message.
The problem seems to depend on specific problems. I did not notice this beforehand. Two of the problems that causes this error are:
OpenProblemLibrary/TCNJ/TCNJ_MatrixLinearTransformation/problem1.pg
OpenProblemLibrary/TCNJ/TCNJ_MatrixLinearTransformation/problem2.pg
/webwork2/instructorXMLHandler: Forbidden
I am currently having the same issue. It causes a number of problems, for example rendering problems or using the library to add problems to a target assignment with the error message "305 setmaker.js: /webwork2/instructorXMLHandler: Forbidden." Apache2 error log lists the error "500 Can't connect to math.usm.edu:443 (Name or service not known) at /opt/webwork/webwork2/lib/WebworkClient.pm line 302." I added hostname to docker-compose.yml as you suggested (and I restarted apache) but the problem still persists. It also appears to have affected webwork email. What baffles me is that I have not done anything to the server including any kind of routine updates this year. There hasn't been any issue until now. Btw my ww version is 2.15.
I would very much appreciate any insight on this issue.
Thank you.
John
I resolved the issue. For some reason, DNS entry in the network setting was removed. Once I corrected it, all seems to be working fine. I realized it might have something to do with DNS when I noticed that email messages from webwork are not going out.
John
John