Local (containerized) installation for jobe and moodle: no connection

Local (containerized) installation for jobe and moodle: no connection

por William Oquendo -
Número de respuestas: 2

Hi,

I am testing a local installation for both moodle and
qtype-coderunner.  I have a moodle 4.1, installed using a bitnami
dockerfile (had to use it, other official images did not actually
installed moodle or failed). It is running correctly (I can login,
create courses, and install plugins and create questions and so on).
I installed qtype-coderruner version 4.2 using the zip file.  I need a
local jobe server to evaluate questions. I am using the container
solution from jobeinabox, https://github.com/trampgeek/jobeinabox ,
is running correctly and I am able to both test inside and outside
running the testsubmit.py script,
https://github.com/trampgeek/jobe/blob/master/testsubmit.py , with
--host localhost --port 4000 .  BUT, when I configure the
qtype-coderunner plugin to use my local jobe server, it does not
work. I get the error: An unexpected error occurred. The sandbox may
be down. Try again shortly.  

Using the default (university of Canterbury, thanks!) works.  In the plugin settings, I have tried
putting the following jobe sever
- 127.0.0.1:4000
- 192.168.10.1:4000 (local lan address)
- localhost:4000

But keep getting the same error. Notice that I can connect to those
address and lookup the language support like
http://192.168.10.1:4000/jobe/index.php/restapi/languages

I have tried removing completely the api_keys. Same error.

I entered the global moodle site HTTP security settings, removed all
curl blocked host lists (so allowing anything), removed anythin in
curl allowed ports (so allowing everyhting, but I also allowed
port 4000), same error.

I cannot find any error or logs for code runner, and inspecting and
tracing the actual web page does not show the traffic going either to
the default Canterbury server or my local server, so this does not
help.

The docker logs for the jobe shows connections when I test submissions
with the python script, but nothing when I am testing the questions
from moodle. So I guess is a moodle config not allowing connections ,
but cannot find any clue.

Please, if you know anything about how to solve this problem, please
let me know.

Thanks in advance.


En respuesta a William Oquendo

Re: Local (containerized) installation for jobe and moodle: no connection

por Mike McDowell -
Are you sure your moodle docker can reach local addresses? From inside the container can you ping your jobe server without issue? Can you curl http://192.168.10.1:4000/jobe/index.php/restapi/languages as well? Just trying to help you figure out if it's a container issue, firewall issue, or Moodle issue you're having.
En respuesta a Mike McDowell

Re: Local (containerized) installation for jobe and moodle: no connection

por William Oquendo -

Hi, 

Yeah, that was the key. After entering the moodle container I realized it cannot connect to the jobe server. 

At the end, I fially merged everything into a single docker compose for them to share the same network, and after some time everything is up and running. Latest moodle and latest coderunner plugin and local jobe server. 

Thanks a lot! sometimes the key is so simple that one cannot see it.