Question Authors' Forum

An unexpected error occurred. The sandbox may be down. Try again shortly.

An unexpected error occurred. The sandbox may be down. Try again shortly.

by jocelin devalette -
Number of replies: 5

Hi,

i'm using coderunner and for this new scolaryear i can't make it run !

I get en error an my moodle "

An unexpected error occurred. The sandbox may be down. Try again shortly."

My jobe suerver seems to run well, and when i ran "testsubmit.py" on my computer at home, all worked well. 

But on my moodle (on my provider 'O2Switch'), i can't use coderunner questions. 

It seems my moodle can't reach my jobe srver (nsi.egd.mg), do you have an idea ?

Thank you
In reply to jocelin devalette

Re: An unexpected error occurred. The sandbox may be down. Try again shortly.

by jocelin devalette -

I have a limited terminal and i've tried :

[mad31@fox ~]$ wget  nsi.egd.mg:8080/jobe/index.php/restapi/language

--2021-09-27 05:53:26--  http://nsi.egd.mg:8080/jobe/index.php/restapi/language

Resolving nsi.egd.mg (nsi.egd.mg)... 154.126.58.194

Connecting to nsi.egd.mg (nsi.egd.mg)|154.126.58.194|:8080... failed: Connection refused.

What have I to ask my provider ?


(Excuse my poor english )

In reply to jocelin devalette

Re: An unexpected error occurred. The sandbox may be down. Try again shortly.

by Richard Lobb -

Your Jobe server works fine from my machine too, so indeed the problem is not at that end, as you've deduced.

I don't have much experience dealing with providers like o2switch. But I think you will just have to ask for access to http://nsi.egd.mg:8080.

There is one other possibility to explore. Does your Moodle server connect OK to the default Jobe server at University of Canterbury (jobe2.cosc.canterbury.ac.nz) if you restore the default Jobe server settings in the CodeRunner admin panel? If so, that suggests that your provider is blocking attempts to connect to port 8080 rather than to your Jobe server host. If so, and if the host running your Jobe server is not providing HTTP services, you could perhaps just kill the web server on it (if there is one) and let JobeInABox provide service on port 80 instead?

As an aside, the fact that I'm able to use your Jobe server is a bit worrying, because that implies anyone else in the world can use it too. As soon as you've got the current problems sorted, if not before, you should make sure that your jobe server host is firewalled to prevent access from anywhere other than your Moodle server.

In reply to Richard Lobb

Re: An unexpected error occurred. The sandbox may be down. Try again shortly.

by jocelin devalette -
Thanks,
i'm aware of the problem of firewall...But in a first time the problem is to acess th jobe server.
For the moment it doens't work even with your demo jobe server.

I have a restricted terminal and i tried :

[mad31@fox ~]$ wget jobe2.cosc.canterbury.ac.nz/jobe/index.php/restapi/language

--2021-09-28 10:55:16--  http://jobe2.cosc.canterbury.ac.nz/jobe/index.php/restapi/language

Resolving jobe2.cosc.canterbury.ac.nz (jobe2.cosc.canterbury.ac.nz)... 132.181.18.6

Connecting to jobe2.cosc.canterbury.ac.nz (jobe2.cosc.canterbury.ac.nz)|132.181.18.6|:80... connected.

HTTP request sent, awaiting response... 403 Forbidden

2021-09-28 10:55:16 ERROR 403: Forbidden.

In reply to jocelin devalette

Re: An unexpected error occurred. The sandbox may be down. Try again shortly.

by Matthew Toohey -

Hi Jocelin


To me it does look like you can connect to the demo jobe server. But you are geting a 403: Forbidden because the demo jobe has an extra layer of security that requires an API key (I get the same from my machine when running the command you tried). You should be able to use the default key of "2AAA7A5415B4A9B394B54BF1D2E9D".

Try running
curl --header "X-API-KEY: 2AAA7A5415B4A9B394B54BF1D2E9D" jobe2.cosc.canterbury.ac.nz/jobe/index.php/restapi/languages

or

wget --header="X-API-KEY: 2AAA7A5415B4A9B394B54BF1D2E9D" jobe2.cosc.canterbury.ac.nz/jobe/index.php/restapi/languages

To confirm that you can connect to the default jobe server (or try using it within coderunner with the above api key).


If you can, then I suspect Richard is right about your provider blocking on port 8080.



Matthew

In reply to jocelin devalette

Re: An unexpected error occurred. The sandbox may be down. Try again shortly.

by jocelin devalette -

Thx for your help...


i found a solution, effectively the port 8080 was closed by my provider. O2switch open only 80 and 443 !

All is working fine now... and have to protect my jobe server now !