Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?

Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?

de Dipo Adeniyi -
Número de respuestas: 3

Good evening,

I am having similar issue with the error:

Code runner successfully installed on moodle 4.1.1

"Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?". 

I have read as much as I could, but no solution so far. Please find below various solution attempts:

I tried: 

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

--2023-07-01 17:35:31--  http://jobe2.cosc.canterbury.ac.nz/jobe/index.php/restapi/languages

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... 200 OK


I then tried: 

wget --header="X-API-Key: 2AAA7A5415B4A9B394B54BF1D2E9D" xx. xxx. xx. xxxx[my server IP]/jobe/index.php/restapi/language

--2023-07-01 17:43:35--  http://xx.xxx.xx.xxx/jobe/index.php/restapi/language

Connecting to 64.227.40.179:80... connected.

HTTP request sent, awaiting response... 404 Not Found

2023-07-01 17:43:35 ERROR 404: Not Found.


I use digitalocean server and is up and running.

Not sure if what to do.

All help greatly appreciated.

Thanks.




En respuesta a Dipo Adeniyi

Re: Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?

de Richard Lobb -
It sounds like you have a moodle+coderunner server that works OK with jobe2.cosc.canterbury.ac.nz and are having trouble using your own Jobe server?

The wget command you're using to poll your own jobe server is missing the 's' on the end of languages.
En respuesta a Richard Lobb

Re: Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?

de Dipo Adeniyi -
Thanks so much Richard.
I can confirm that the problem if between my Moodle and the Jobe server.
I temporarily disabled ufw and it worked.

I think I'm having issues using the settings: ufw allow in proto tcp to any port 80 from I used my Moodle IP address (which I believe is same to my computer), but that's when it stopped working. However it works when I disable the ufw.
Would be very grateful on how to resolve this.

Thanks.
En respuesta a Dipo Adeniyi

Re: Unexpected error while executing your code. The sandbox server may be down or overloaded. Perhaps try again shortly?

de Richard Lobb -
Have you resolved this? If turning off ufw solves the problem then the only explanation I can think of is that you've got some other rule that's denying access or you have the wrong IP address for your moodle server. Have you run the command

sudo ufw status
to see the full configuration? You can use the command

sudo ufw --force reset
to start with a fresh configuration if necessary. You might also want to try simpler versions of the allow command, such as

sudo ufw allow from 123.45.67.8