AnubisLMS / Anubis

Distributed LMS for automating Computing Science Courses From NYU
https://about.anubis-lms.io
MIT License
290 stars 45 forks source link

FIX 404 page not found with make debug #463

Open divatemangesh opened 12 months ago

divatemangesh commented 12 months ago

I am just trying to test the software so I followed https://github.com/AnubisLMS/Anubis/blob/main/docs/development_guide.md this tutorial and used the "sudo make debug" command to use Docker to get Anubis running,

  1. After running "sudo make debug" I got database connection error in the logs as follows docker compose -p anubis exec api alembic upgrade head mysqladmin: connect to server at '127.0.0.1' failed error: 'Access denied for user 'root'@'172.20.0.1' (using password: NO)' Starting with DATABASE_URI: mysql+pymysql://anubis:anubis@db/anubis Starting with CACHE_TYPE: RedisCache Starting with SECRET_KEY: DEBUG Starting with MINDEBUG: False Starting with DEBUG: True INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. make startup-links make[1]: Entering directory '/home/user/Projects/Anubis'

Then logs ended like this seed: http://localhost/api/admin/seed/ auth: http://localhost/api/admin/auth/token/superuser auth: http://localhost/api/admin/auth/token/professor auth: http://localhost/api/admin/auth/token/ta auth: http://localhost/api/admin/auth/token/student site: http://localhost/ make[1]: Leaving directory '/home/user/Projects/Anubis'

and when i tried going to site from browser I am getting 404 error

image

need to understand why this is happening

github-actions[bot] commented 12 months ago

Thank you for submitting an issue to Anubis! Please make sure that your issue is consistent with our contribution guidelines.

wabscale commented 12 months ago

You should not use sudo to do the make debug. It should just work without root permissions.

Would you happen to be on a mac, or a windows WSL machine?

divatemangesh commented 12 months ago

I am using mac to ssh in another Linux machine which in my local network. so it is linux machine only

wabscale commented 12 months ago

Ah ok, I didnt notice the url you have in the address bar. The end router traefik is configured to use the domain localhost. Not the 192.168.0.246 you have there. You can go into the docker-compose.yml file and change all the Rule lines to be the ip address you are accessing it from if you want to just hack it (like this line).

A slightly more eligant solution would be to ssh port forward. You can just do ssh -L 80:localhost:80 ... when you ssh to do that port forward. That will map your local port 80 (http) to your remote machines 80. Then you can just use the standard localhost startup links.