WeBWorK Problems

Problem Library images not loading

Problem Library images not loading

by Kelsey Caron -
Number of replies: 8

Hello,

My site is having trouble loading images in the 'Problem Library' section of WebWork. I looked a the console in my browser and see the crowser is timing out trying to find the image. Where would I look to troubleshoot this problem. The issue also makes loading other questions on the 'Problem Library' page load slow. 


Console output:



Any help would be very appreciated. 


--


kelsey

In reply to Kelsey Caron

Re: Problem Library images not loading

by Danny Glin -

I don't see the console output in your post.  Can you try pasting it as plain text?

In reply to Danny Glin

Re: Problem Library images not loading

by Kelsey Caron -

GET https://XXX.X.XXX.XX:8080/wwtmp/TEST_LOGIN_331//images/afee334b-282b-3807-a50c-1a8e4c8bd79f___87700c28-268c-33f3-bb2b-dd7e33198cda.png net::ERR_CONNECTION_TIMED_OUT

This is what I see in the browser output. 

In reply to Kelsey Caron

Re: Problem Library images not loading

by Arnold Pizer -
I have had the same or a similar problem running WeBWorK on a virtual machine when I set
$server_root_url = 'http://localhost' ;
Everything worked except e.g. equations when viewing problems in the Library Browser. "Trying it" (the eye icon) in the library Browser also worked fine. Changing $server_root_url to an actual ip address, e.g.
$server_root_url = 'http://192.168.138.128';
solved the problem. My point is that you should double check how $server_root_url is set.
In reply to Arnold Pizer

Re: Problem Library images not loading

by Kelsey Caron -
Hey,

my $server_root_url was set to my domain name:

$server_root_url = 'https://webwork1.cc.uregina.ca';

I then changed it to:

$server_root_url = 'https://XXX.X.XXX.XX';


I made this change in the site.conf file.
This did not help. The images are still not loading in the problem library. It only seems to be the images as well (Everything else seems to look correct).
In reply to Kelsey Caron

Re: Problem Library images not loading

by Kelsey Caron -
Solution:

Make sure the the variables ( $webworkDirs{htdocs_temp} $webworkURLs{htdocs_temp} ) are set correctly in the localOverrides.conf file.

This is how they are set up now and it works.

$webworkDirs{htdocs_temp} = '/var/www/html/wwtmp';
$webworkURLs{htdocs_temp} = '/wwtmp';
In reply to Kelsey Caron

Re: Problem Library images not loading

by Mark Frame -

I am have almost this exact same problem. All images are loading if I am connected to the same network as my Webwork server. If I am connected from outside the network formulas display, but other images such as graphs do not. Instead I get the error Failed to load resource: GET https://webwork.hopkinsschools.org:8443/wwtmp/AP_Calculus/images/26f1a20e-223c-3c7f-b1db-919070383517___2856e0a2-ab6e-3e60-af3c-710f82a5c79c.png::ERR_CONNECTION_TIMED_OUT. This occurs in Edge, Firefox, and Chrome.

I've tried implementing the suggestions made already but none of worked.

From sites.conf

$webwork_url       = '/webwork2';
$server_root_url   = 'https://webwork.hopkinsschools.org';


From localOverrides.conf

$webworkDirs{htdocs_temp}  =  '/var/www/html/wwtmp';
#webworkURLs{htdocs_temp}   = '/wwtmp';
$webworkURLs{htdocs_temp}   = 'https://webwork.hopkinsschools.org:8443/wwtmp';
$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
$courseDirs{html_temp}  =  "/var/www/html/wwtmp/$courseName";
#$courseURLs{html_temp}   = "/wwtmp/$courseName";
$courseURLs{html_temp}   = "https://webwork.hopkinsschools.org:8443/wwtmp/$courseName";
# Location of MathJax script, used for the MathJax display mode.
#$webworkURLs{MathJax}       = 'https://webwork.hopkinsschools.org:8443/webwork2_files/mathjax/es5/tex-chtml.js';
$webworkURLs{MathJax} = "$webworkURLs{htdocs}/mathjax/es5/tex-chtml.js";

This is version 2.16 installed from the virtual machine image.

In reply to Mark Frame

Re: Problem Library images not loading

by Danny Glin -

Based on your description it sounds like a firewall issue.  Since you have configured lighttpd to serve static images via port 8443, you will have to make sure that you are allowing connections on that port from all clients.  Since it is working from within your network it may require changes to the rules on your institution's firewall.

In reply to Danny Glin

Re: Problem Library images not loading

by Mark Frame -

That was the problem. My network admin says he doesn't know why he didn't think of that .