Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

資料庫照官方文件復原後 #336

Open
guangyawli opened this issue Nov 4, 2020 · 2 comments
Open

資料庫照官方文件復原後 #336

guangyawli opened this issue Nov 4, 2020 · 2 comments

Comments

@guangyawli
Copy link

@guangyawli guangyawli commented Nov 4, 2020

oj0001
底下為官方步驟:
docker cp db_backup_xxxxxxx.sql oj-postgres:/root
docker exec -it oj-postgres bash
psql -U postgres 然后运行 drop database onlinejudge; (请一定注意!!!看清楚自己再哪台机器上)
\q 退出,然后 psql -f /root/db_backup_xxxxxxx.sql -U postgres

執行完畢後,發生兩個問題:

  1. 所有試題後面出現 rejudge的藍色按鈕,這正常嗎?意思是舊有的已judge的成績都要重送?
  2. 線上答題都出現 runtime error , 以 judserver bash 試驗出現 read only file system, 會不會是少了什麼步驟沒做?
@virusdefender
Copy link
Contributor

@virusdefender virusdefender commented Nov 4, 2020

  1. 这个本来就有吧
  2. readonly file system 也是本来就这样的,runtime error 得点进去看下详情。
@guangyawli
Copy link
Author

@guangyawli guangyawli commented Nov 5, 2020

有去找log
出現以下錯誤:

Traceback (most recent call last):
File "/code/service.py", line 19, in _request
"Content-Type": "application/json"}, timeout=5).text
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='oj-backend', port=8000): Max retries exceeded with url: /api/judge_server_heartbeat/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f628416ea90>: Failed to establish a new connection: [Errno -2] Name or service not known',))

During handling of the above exception, another exception occurred:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.