codalab / codabench

Codabench is a flexible, easy-to-use and reproducible benchmarking platform. Check our paper at Patterns Cell Press https://hubs.li/Q01fwRWB0
Apache License 2.0
72 stars 28 forks source link

Problems after installation #1380

Closed johann-petrak closed 4 months ago

johann-petrak commented 6 months ago

Followed the instructions for quick setup under Linux (different machine from the attempt described in #1379) and this time the docker compose steps seemed to work fine. I used the current development branch (the default when cloning the repo). However after completing all the steps, the web site does not work properly: the login screen does not show some of the graphic elements and the menu does not react at all.

On the log the following is shown:

jango-1          | Not Found: /static/css/calendar.min.css
django-1          | Not Found: /static/css/calendar.min.css
django-1          | Not Found: /static/js/calendar.min.js
django-1          | Not Found: /static/js/calendar.min.js
django-1          | Not Found: /static/js/ours/client.js
django-1          | Not Found: /static/js/ours/client.js
django-1          | Not Found: /static/js/ours/init.js
django-1          | Not Found: /static/js/ours/init.js
django-1          | Not Found: /static/js/ours/riotjs_mixins.js
django-1          | Not Found: /static/js/ours/riotjs_mixins.js
django-1          | Not Found: /static/js/ours/utils.js
django-1          | Not Found: /static/js/ours/utils.js
django-1          | Not Found: /static/js/jquery.form.serializer.js
django-1          | Not Found: /static/js/jquery.form.serializer.js
django-1          | Not Found: /static/js/Chart.bundle.js
django-1          | Not Found: /static/js/Chart.bundle.js
django-1          | Not Found: /static/js/reconnecting-websocket.min.js
django-1          | Not Found: /static/js/reconnecting-websocket.min.js
django-1          | Not Found: /static/generated/riot.js
django-1          | Not Found: /static/generated/riot.js
django-1          | Not Found: /static/js/ours/latex_markdown_html.js
django-1          | Not Found: /static/js/ours/latex_markdown_html.js
django-1          | Not Found: /static/generated/output.css
django-1          | Not Found: /static/generated/output.css
django-1          | Not Found: /static/img/Cha_Logo.png
django-1          | Not Found: /static/img/Cha_Logo.png
django-1          | Not Found: /static/js/calendar.min.js
django-1          | Not Found: /static/js/calendar.min.js
django-1          | Not Found: /static/js/ours/client.js
django-1          | Not Found: /static/js/ours/client.js
django-1          | Not Found: /static/js/ours/init.js
django-1          | Not Found: /static/js/ours/init.js
django-1          | Not Found: /static/js/ours/riotjs_mixins.js
django-1          | Not Found: /static/js/ours/riotjs_mixins.js
django-1          | Not Found: /static/js/ours/utils.js
django-1          | Not Found: /static/js/ours/utils.js
django-1          | Not Found: /static/js/jquery.form.serializer.js
django-1          | Not Found: /static/js/jquery.form.serializer.js
django-1          | Not Found: /static/js/Chart.bundle.js
django-1          | Not Found: /static/js/Chart.bundle.js
django-1          | Not Found: /static/js/reconnecting-websocket.min.js
django-1          | Not Found: /static/js/reconnecting-websocket.min.js
django-1          | Not Found: /static/generated/riot.js
django-1          | Not Found: /static/generated/riot.js
django-1          | Not Found: /static/js/ours/latex_markdown_html.js
django-1          | Not Found: /static/js/ours/latex_markdown_html.js
django-1          | Not Found: /static/img/favicon.ico
django-1          | Not Found: /static/img/favicon.ico

Is there a recommended way to set this up locally that works?

ihsaan-ullah commented 6 months ago

When you start the docker stack
docker-compose up -d

you need to collect static files docker-compose exec django ./manage.py collectstatic --noinput

johann-petrak commented 6 months ago

Thank you! I have actually done that (I ran all the steps given in the instructions, only using docker compose instead of docker-compose.

I retried now running:

This showed:

WARN[0000] The "RABBITMQ_HTTP_PROXY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "RABBITMQ_HTTPS_PROXY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "RABBITMQ_NO_PROXY" variable is not set. Defaulting to a blank string. 
WARN[0000] /data/johann/work-git/codabench/docker-compose.yml: `version` is obsolete 

2 static files copied to '/app/src/staticfiles', 303 unmodified.

After running this, I tried to access the web page on localhost:8000 again and got the same errors/problems as before.

johann-petrak commented 6 months ago

BTW, I always got the following error on the docker compose up log, no idea if it is related in any way:

caddy-1           | 2024/04/04 08:12:52 [ERROR] Sending telemetry: Post https://telemetry.caddyserver.com/v1/update/f035fec7-a3a1-42c5-9b62-16b83c26dab9: dial tcp: lookup telemetry.caddyserver.com on 127.0.0.11:53: no such host
rabbit-1          | 2024-04-04 08:14:21.033435+00:00 [error] <0.736.0> closing AMQP connection <0.736.0> (172.20.0.8:45074 -> 172.20.0.5:5672):
rabbit-1          | 2024-04-04 08:14:21.033435+00:00 [error] <0.736.0> missed heartbeats from client, timeout: 60s
rabbit-1          | 2024-04-04 08:14:22.703408+00:00 [error] <0.782.0> closing AMQP connection <0.782.0> (172.20.0.8:45084 -> 172.20.0.5:5672):
rabbit-1          | 2024-04-04 08:14:22.703408+00:00 [error] <0.782.0> missed heartbeats from client, timeout: 60s
ihsaan-ullah commented 6 months ago

Can you check if your localhost is http://localhost/ (not https)

in the new versions docker compose instead of docker-compose if fine

ihsaan-ullah commented 6 months ago

I think these two links will help

  1. Opening ports: https://github.com/codalab/codabench/wiki/How-to-deploy-Codabench-on-your-server#open-access-permissions-for-following-port-number
  2. Django configuration: https://github.com/codalab/codabench/wiki/How-to-deploy-Codabench-on-your-server#modify-django-related-configuration
curious-broccoli commented 6 months ago

simply localhost should work. localhost:8000 also loads the page but the static files only if django is run with debug turned on (because it goes straight to django without caddy in between)

bbearce commented 6 months ago

How is this going? Is this resolved?

johann-petrak commented 6 months ago

Thank you. I used http://localhost:8000 because I followed the instructions in the README.md file for quick Linux setup which state: "You can now login as username "admin" with password "admin" at http://localhost:8000"

When I instead use http://localhost (default port 80), it seems to work. The only thing I notice is that the images/logos in front of each listed competition on the main page are not shown. The link to the image is shown as http://minio:9000/public/logos/2024-04-04-1712217063/c61c3a3610ee/example_icon.jpg which looks wrong to me and should probably be http://localhost:9000/public/logos/2024-04-04-1712217062/1ba9635658dd/example_icon.jpg instead. That logo is also not shown in the competition page as the same incorrect link is used.

Ports 5672, 8000 and 9000 are open and unused on my server.

I am actually a bit surprised that it works to have it run on port 80 by default because I would have thought that 80 is a protected port. This is also why I did expect the local web site to run on a higher port number in order to avoid any issues with protected ports?

I guess the main issue here might be to figure out if what is statet in the README is incorrect or if accessing the web server on port 8000 should actually work or not? The other issue may be the incorrect link to the image using "minio:" instead of "localhost:" ?

Didayolo commented 4 months ago

The quick setup instructions have been updated after this: https://github.com/codalab/codabench/commit/992bd86c661b157fde9ef1ed94ab35276694eddc

I mark this issue as resolved.