WSServerHandshakeError: 400
yanzmgit opened this issue · 3 comments
It seems not easy to build up the whole env of vj4. Let me introduce my problem brifly.
1)on one dev machine, run the vj4 server with python3 -m vj4.server --debug --listen http://0.0.0.0:8888
, open port 8888.
2)on another machine, use docker to start the jd4 server, it went wrong with error output:
[D 180604 06:04:29 selector_events:65] Using selector: EpollSelector
[I 180604 06:04:29 pool:22] Using parallelism: 2
[I 180604 06:04:30 api:76] Session is valid
[I 180604 06:04:30 daemon:133] Update problem data
[E 180604 06:04:32 daemon:164] 400, message='Invalid response status'
Traceback (most recent call last):
File "/venv/lib/python3.5/site-packages/jd4/daemon.py", line 162, in daemon
await gather(*done)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/venv/lib/python3.5/site-packages/jd4/daemon.py", line 143, in do_judge
await session.judge_consume(JudgeHandler)
File "/venv/lib/python3.5/site-packages/jd4/api.py", line 59, in judge_consume
async with self.ws_connect(self.full_url('judge/consume-conn/websocket')) as ws:
File "/venv/lib/python3.5/site-packages/aiohttp/client.py", line 690, in __aenter__
self._resp = yield from self._coro
File "/venv/lib/python3.5/site-packages/aiohttp/client.py", line 465, in _ws_connect
headers=resp.headers)
aiohttp.client_exceptions.WSServerHandshakeError: 400, message='Invalid response status'
I found almost the similar problem at issue 49, BUT i did't use
nginx. My config.yaml :
server_url: http://140.82.**.***:8888
uname: judge
password: ****
thanks for any help in advance.
I checked the websocket url, It is:
http://140.82.**.***:8888/judge/consume-conn/websocket
is this websocket address wrong?
I don't know why...
thanks anyway.
I guess maybe the vj4 server also needs to be running on newer linux of version 4.4.
I tried deploy it on the same machine of jd4, it runs OK.