DMOJ / judge-server

Judging backend server for the DMOJ online judge.
https://dmoj.ca
GNU Affero General Public License v3.0
874 stars 246 forks source link

Failed to Run Judge #271

Closed joonas-yoon closed 6 years ago

joonas-yoon commented 6 years ago

i'm working on Ubuntu-16.04-LTS (64bit) i tried to run a judge (is it instance?), and followed guide on docs. but i can not find details about this on docs.

First, run server with python manage.py runserver 0.0.0.0:5000 in site/. and then dmoj localhost -p 5000 -c judge/config.yml

i got error messages under.

(dmojsite) joonas@joonas-ubuntu:~$ dmoj localhost -p 5000 -c judge/config.yml 
Self-testing executors...
Self-testing AWK:    Success
Self-testing BF:     Success
Self-testing C:      Success
Self-testing CPP03:  Success
Self-testing CPP11:  Success
Self-testing CPP14:  Success
Self-testing GAS64:  Success
Self-testing PERL:   Success
Self-testing PY3:    Success
Self-testing RUBY2:  Success
Self-testing SED:    Success
Self-testing TCL:    Success
Self-testing TEXT:   Success

Running live judge...
Traceback (most recent call last):
  File "/home/joonas/judge/dmoj/packet.py", line 201, in handshake
    packet = self.input.read(size).decode('zlib')
  File "/usr/lib/python2.7/encodings/zlib_codec.py", line 43, in zlib_decode
    output = zlib.decompress(input)
error: Error -3 while decompressing data: incorrect header check

SOCKET ERROR: Disconnected! Reconnecting in 4 seconds.

what do I have done wrong? please help.

r4k0nb4k0n commented 6 years ago

Check BRIDGED_JUDGE_ADDRESS in local_settings.py. There is a port where judge can actually access.. I guess. And Check if python manage.py runbridged is runned by supervisor.

ps. I think we have same goal. I hope we help each other.

joonas-yoon commented 6 years ago

thx for your reply. but it still isn't working. I used a port 5000 for server(site), and 5001 for bridged judge.

And more, server logged following messages when I tried to run a judge.

Performing system checks...

System check identified no issues (7 silenced).
September 10, 2017 - 11:51:07
Django version 1.10.8, using settings 'dmoj.settings'
Starting development server at http://0.0.0.0:5000/
Quit the server with CONTROL-C.
[10/Sep/2017 11:53:44] code 400, message Bad request syntax ('\x00\x00\x01}x\x9ce\x90Yo\x82@\x14\x85\xff')
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/home/joonas/dmojsite/local/lib/python2.7/site-packages/django/utils/log.py", line 192, in format
    return super(ServerFormatter, self).format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 476, in format
    raise e
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 13: invalid start byte
Logged from file basehttp.py, line 131

I changed encoding utf8 from ascii but it has problem too. I think it has a problem with zlib_~~ on packet.py or something else.

joonas-yoon commented 6 years ago

How can I check if python manage.py runbridged is runned by supervisor?

I just typed a command $ python manage.py runbridged on prompt, but nothing happend. đŸ˜¢ After type that command, prompt keep waiting (or running) with nothing.

Xyene commented 6 years ago

The bridge is supposed to always run alongside the site, so runbridged should be executed in the background. Otherwise, judges can't connect to it.

joonas-yoon commented 6 years ago

excute in background, but still not working with same error messages. I guess that is not problem by runbridged

quantum5 commented 6 years ago

It helps if you connect the judge to the bridge IP and port... Instead of trying to edit the code when you don't even know what it does...