Hi Dimitris, how do you manage to resolve your issue? I am having the same 
problem,
I  would really appreciate your reply, thanks.


On Friday, March 18, 2016 at 12:00:40 AM UTC+8, dimitris agelakis wrote:
>
> I have come to a dead end with this thing, can somebody give me a hint on 
> how to overcome my problem with the external grader?
> Here is what I have done so far:
>
> I have imported the sample course and also cloned the java grader from 
> here:
> https://github.com/huynq55/java-grader
>
> I have edited the /edx/app/xqueue/xqueue.env.json to look like this:
>
> {
>     "LOCAL_LOGLEVEL": "INFO",
>     "LOGGING_ENV": "sandbox",
>     "LOG_DIR": "/edx/var/log/xqueue",
>     "RABBIT_HOST": "localhost",
>     "S3_BUCKET": "sandbox-bucket",
>     "S3_PATH_PREFIX": "sandbox-xqueue",
>     "SYSLOG_SERVER": "localhost",
>     "XQUEUES": {
>         "certificates": null,
>         "java-queue": "http://localhost:1710";,
>         "open-ended": null,
>         "open-ended-message": null,
>         "test-pull": null
>     },
>     "XQUEUE_WORKERS_PER_QUEUE": 12
> }
>
> I have restarted the xqueue with the following command:
> sudo /edx/bin/supervisorctl restart xqueue:
>
> Seems that all the services are running normally:
>
> $ sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf status
> certs                            RUNNING   pid 5412, uptime 0:10:20
> edxapp:cms                       RUNNING   pid 1506, uptime 1 day, 19:59:
> 30
> edxapp:lms                       RUNNING   pid 1504, uptime 1 day, 19:59:
> 30
> edxapp_worker:cms_default_4      RUNNING   pid 1526, uptime 1 day, 19:59:
> 29
> edxapp_worker:cms_high_1         RUNNING   pid 1521, uptime 1 day, 19:59:
> 29
> edxapp_worker:cms_low_3          RUNNING   pid 1512, uptime 1 day, 19:59:
> 30
> edxapp_worker:lms_default_3      RUNNING   pid 1517, uptime 1 day, 19:59:
> 29
> edxapp_worker:lms_high_4         RUNNING   pid 1531, uptime 1 day, 19:59:
> 29
> edxapp_worker:lms_high_mem_2     RUNNING   pid 1513, uptime 1 day, 19:59:
> 30
> edxapp_worker:lms_low_1          RUNNING   pid 1523, uptime 1 day, 19:59:
> 29
> forum                            RUNNING   pid 1500, uptime 1 day, 19:59:
> 30
> xqueue                           RUNNING   pid 5409, uptime 0:10:20
> xqueue_consumer                  RUNNING   pid 1499, uptime 1 day, 19:59:
> 30
>
> I run the JavaGrader.py:
> sudo python /edx/java-grader/JavaGrader.py
>
> And then I go to the course and try to test the grader...
>
> When I run the one of the 3 problems from the sample course, i see that 
> the grader seems to work correctly, it puts the data to the "xqueue" 
> database in MySQL for example the following query:
> select grader_reply from queue_submission;
>
> returns something like this:
>
>
> +------------------------------------------------------------------------------------------+
> | grader_reply                                                           
>                   |
>
> +------------------------------------------------------------------------------------------+
> | {"msg": "Good job!", "score": 1, "correct": true}                       
>                  |
> | {"msg": "Good job!", "score": 1, "correct": true}                       
>                  |
> | {"msg": "Good job!", "score": 1, "correct": true}                       
>                  |
> | {"msg": "Good job!", "score": 1, "correct": true}                       
>                  |
> | {"msg": "Good job!", "score": 1, "correct": true}                       
>                  |
> .....
> (the rows increase every time I check the program from the sample 
> course)...
>
> But although the grader passes, and it puts the data into database, it 
> NEVER returns the answer to the LMS.
>
> The logs from:
> /edx/var/log/xqueue/edx.log
>
> are the following (after each check):
>
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] INFO [Mathesis1  1896] [consumer.py:321] - Processing submission 
> from queue_name: java-queue, submission_id: 31
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][requests.packages.
> urllib3.connectionpool][env:sandbox] INFO [Mathesis1  1896] [
> connectionpool.py:191] - Starting new HTTP connection (1): localhost
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:185] - Could not connect to 
> server at http://localhost:1710 in timeout=30.000000
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:403] - Submission 31 to 
> grader http://localhost:1710 failure: Reply: cannot connect to server, 
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][requests.packages.
> urllib3.connectionpool][env:sandbox] INFO [Mathesis1  1896] [
> connectionpool.py:191] - Starting new HTTP connection (1): localhost
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:185] - Could not connect to 
> server at 
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update
>  
> in timeout=5.000000
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][requests.packages.
> urllib3.connectionpool][env:sandbox] INFO [Mathesis1  1896] [
> connectionpool.py:191] - Starting new HTTP connection (1): localhost
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:185] - Could not connect to 
> server at 
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update
>  
> in timeout=5.000000
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][requests.packages.
> urllib3.connectionpool][env:sandbox] INFO [Mathesis1  1896] [
> connectionpool.py:191] - Starting new HTTP connection (1): localhost
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:185] - Could not connect to 
> server at 
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update
>  
> in timeout=5.000000
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][requests.packages.
> urllib3.connectionpool][env:sandbox] INFO [Mathesis1  1896] [
> connectionpool.py:191] - Starting new HTTP connection (1): localhost
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:185] - Could not connect to 
> server at 
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update
>  
> in timeout=5.000000
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][requests.packages.
> urllib3.connectionpool][env:sandbox] INFO [Mathesis1  1896] [
> connectionpool.py:191] - Starting new HTTP connection (1): localhost
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:185] - Could not connect to 
> server at 
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update
>  
> in timeout=5.000000
> Mar 17 16:33:09 Mathesis1 [service_variant=xqueue][queue.consumer][env:
> sandbox] ERROR [Mathesis1  1896] [consumer.py:163] - Unable to return to 
> LMS: lms_callback_url: 
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update,
>  
> payload: {'xqueue_header': u'{"lms_key": 
> "eb1915fccfad4b664377bf8e47e27d9e", "lms_callback_url": "
> http://localhost:3180/courses/CUP/j101/2014_T12/xqueue/9/i4x://CUP/j101/problem/a2ed4ae1e2e94c278d92c494b2b738b6/score_update";,
>  
> "queue_name": "java-queue"}', 'xqueue_body': '{"msg": "<div 
> class=\\"capa_alert\\">Your submission could not be graded. Please recheck 
> your submission and try again. If the problem persists, please notify the 
> course staff.</div>", "score": 0, "correct": null}'}, lms_reply: cannot 
> connect to server
>
>
> Anyone knows what this "lms_reply: cannot connect to server" means and 
> why it is happening?
> And what is this "/score_update" at the end of the url shown in the logs?
> How can I make the LMS accept the reply?
>
> Any help would be appreciated as I am totally lost on this one!
> And a thorough tutorial by the creators of the external grader on how to 
> make it work would also be appreciated !
>
> Thank you in advance guys, I hope someone has an answer :)
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/f7f4420c-9d7e-4f9a-95b9-9220e83bc696%40googlegroups.com.

Reply via email to