Help with xqueue

docker ps shows the following:

tutor_local_cms_1
ad6638345c05        overhangio/openedx-xqueue:0.1.3             "/bin/sh -c 'gunicor…"   2 days ago          Up 2 days           8040/tcp                                   tutor_local_xqueue_1
d0f769ca1b41        overhangio/openedx-xqueue:0.1.3             "sh -e -c 'while tru…"   2 days ago          Up 2 days           8040/tcp          

what should the queuename be for this example:
https://edx.readthedocs.io/projects/open-edx-ca/en/latest/exercises_tools/external_graders.html#create-a-code-response-problem

I have an example grading script but i’m not sure how to connect to the xqueue. Any help would be much appreciated.

Hi @yaliu14! Any queue name should work just fine. Did you test it? Did it work? If not, what were the error logs?

@regis, I did, at the lms interface I get:

Unable to deliver your submission to grader (Reason: Incorrect login credentials). Please try again later.

For the python3 script with the following code:

XQUEUE_URL = os.environ.get('XQUEUE_URL', '<lms URL>')
XQUEUE_LOGIN = '{}/xqueue/login/'.format(XQUEUE_URL)
def login():
    response = SESSION.post(XQUEUE_LOGIN, data={
        'username': XQUEUE_USER,
        'password': XQUEUE_PASSWORD,
    })
    return response.json().get('content', None) == 'Logged in'

I am unable to log in.

Anything else that might be useful?

This is from: $(tutor config printroot)/data/lms/logs/tracking.log

2020-02-28 07:39:58,425 INFO 12 [tracking] logger.py:42 - {“username”: “austin”, “event_source”: “browser”, “name”: “problem_graded”, “accept_language”: “en-US,en;q=0.5”, “time”: “2020-02-28T07:39:58.425261+00:00”, “agent”: “Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0”, “page”: “https://918428.xyz/courses/course-v1:Akomba+CS101+2020_T1/courseware/e052d2b823d545369520fb5283e33f7f/055c2adccebc4ede8fa8b78f314ff468/1?activate_block_id=block-v1%3AAkomba%2BCS101%2B2020_T1%2Btype%40vertical%2Bblock%40a7242456470a4420ac6762cd8ea7246f”, “host”: “918428.xyz”, “session”: “ed996ef8d1884e4babb9f05e82b25050”, “referer”: “https://918428.xyz/courses/course-v1:Akomba+CS101+2020_T1/courseware/e052d2b823d545369520fb5283e33f7f/055c2adccebc4ede8fa8b78f314ff468/1?activate_block_id=block-v1%3AAkomba%2BCS101%2B2020_T1%2Btype%40vertical%2Bblock%40a7242456470a4420ac6762cd8ea7246f”, “context”: {“user_id”: 6, “org_id”: “Akomba”, “course_id”: “course-v1:Akomba+CS101+2020_T1”, “path”: “/event”}, “ip”: “42.61.82.18”, “event”: [“input_5a7afc1d819c44fda9360918b0e0c408_2_1=++++++++%23+students+please+write+your+program+here%0D%0A++++++++print+%22helo+world%22%0D%0A++++++”, “\n\n\n\n<h3 class=“hd hd-3 problem-header” id=“5a7afc1d819c44fda9360918b0e0c408-problem-title” aria-describedby=“block-v1:Akomba+CS101+2020_T1+type@problem+block@5a7afc1d819c44fda9360918b0e0c408-problem-progress” tabindex=”-1">\n Blank Advanced Problem\n\n\n<div class=“problem-progress” id=“block-v1:Akomba+CS101+2020_T1+type@problem+block@5a7afc1d819c44fda9360918b0e0c408-problem-progress”>\n\n<div class=“problem”>\n

\n <div class=“wrapper-problem-response” tabindex="-1" aria-label=“Question 1” role=“group”><div id=“textbox_5a7afc1d819c44fda9360918b0e0c408_2_1” class=“capa_inputtype textbox cminput”>\n <label class=“problem-group-label” for=“cm-textarea-5a7afc1d819c44fda9360918b0e0c408_2_1”>Write a program that prints “hello world”.\n <textarea rows=“10” cols=“80” name=“input_5a7afc1d819c44fda9360918b0e0c408_2_1” aria-label=“python editor” aria-describedby=“answer_5a7afc1d819c44fda9360918b0e0c408_2_1” id=“input_5a7afc1d819c44fda9360918b0e0c408_2_1” tabindex=“0” data-mode=“python” data-tabsize=“4” data-linenums=“true”> # students please write your program here\n print “helo world”\n \n <span class=“cm-editor-exit-message capa-message” id=“cm-editor-exit-message-5a7afc1d819c44fda9360918b0e0c408_2_1”>\n Press ESC then TAB or click outside of the code editor to exit\n \n\n <div class=“grader-status” tabindex="-1">\n\n \n\n<span class=“status None” id=“status_5a7afc1d819c44fda9360918b0e0c408_2_1” data-tooltip="">\n <span class=“sr”>None<span class=“status-icon” aria-hidden=“true”/>\n\n\n\n\n\n <p class=“debug”>None\n
\n\n <span id=“answer_5a7afc1d819c44fda9360918b0e0c408_2_1”/>\n\n <div class=“external-grader-message”>\n Unable to deliver your submission to grader (Reason: Incorrect login credentials). Please try again later.\n \n\n\n <div class=“action”>\n <input type=“hidden” name=“problem_id” value=“Blank Advanced Problem” />\n\n <div class=“submit-attempt-container”>\n <button type=“button” class=“submit btn-brand” data-submitting=“Submitting” data-value=“Submit” data-should-enable-submit-button=“True” aria-describedby=“submission_feedback_5a7afc1d819c44fda9360918b0e0c408” >\n <span class=“submit-label”>Submit\n \n <div class=“submission-feedback” id=“submission_feedback_5a7afc1d819c44fda9360918b0e0c408”>\n <span class=“sr”>Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.\n \n \n <div class=“problem-action-buttons-wrapper”>\n <span class=“problem-action-button-wrapper”>\n <button type=“button” class=“show problem-action-btn btn-default btn-small” aria-describedby=“5a7afc1d819c44fda9360918b0e0c408-problem-title”><span class=“icon fa fa-info-circle” aria-hidden=“true”><span class=“show-label”>Show Answer\n \n \n \n \n\n\n<div class=“notification warning notification-gentle-alert\n is-hidden”\n tabindex="-1">\n <span class=“icon fa fa-exclamation-circle” aria-hidden=“true”>\n <span class=“notification-message” aria-describedby=“5a7afc1d819c44fda9360918b0e0c408-problem-title”>\n \n <div class=“notification-btn-wrapper”>\n <button type=“button” class=“btn btn-default btn-small notification-btn review-btn sr”>Review\n \n\n\n \n\n\n<div class=“notification warning notification-save\n is-hidden”\n tabindex="-1">\n <span class=“icon fa fa-save” aria-hidden=“true”>\n <span class=“notification-message” aria-describedby=“5a7afc1d819c44fda9360918b0e0c408-problem-title”>None\n \n <div class=“notification-btn-wrapper”>\n <button type=“button” class=“btn btn-default btn-small notification-btn review-btn sr”>Review\n \n\n\n \n \n\n\n<div class=“notification general notification-show-answer\n is-hidden”\n tabindex="-1">\n <span class=“icon fa fa-info-circle” aria-hidden=“true”>\n <span class=“notification-message” aria-describedby=“5a7afc1d819c44fda9360918b0e0c408-problem-title”>Answers are displayed within the problem\n \n <div class=“notification-btn-wrapper”>\n <button type=“button” class=“btn btn-default btn-small notification-btn review-btn sr”>Review\n \n\n\n\n"], “event_type”: “problem_graded”}

I must admit I’m not very familiar with xqueue. What I can tell you is that the xqueue username is “lms”, the password can be obtained with tutor config printvalue XQUEUE_AUTH_PASSWORD and the url of the xqueue service should be http://xqueue:8040.

No problem, do you have a minimal example I can try out?