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

Web not connecting to the db on docker #92

Open
pjmoura577 opened this issue Jan 11, 2024 · 5 comments
Open

Web not connecting to the db on docker #92

pjmoura577 opened this issue Jan 11, 2024 · 5 comments

Comments

@pjmoura577
Copy link

image
image

@Xiphoseer
Copy link
Contributor

Are there more logs? In theory this only happens if a previous migration crashed after creating the notes column

@PlatinPython
Copy link

PlatinPython commented Jan 27, 2024

I've run into the same error. The following steps are what I did to arrive there:

  1. Install Docker Desktop and move the client to the client subfolder
  2. Download docker-compose.yml and .env.example (renamed to .env)
  3. Set ACCOUNT_MANAGER_SECRET to a "SHA 256-bit Key" and MARIADB_PASSWORD to a passphrase containing only a-z and -
  4. Run docker compose up -d in the folder containing client, docker-compose.yml and .env
  5. Start the dlu-darkflameserver-1 container again (It stops for some reason)
  6. Run docker exec -it dlu-darkflameserver-1 /app/MasterServer -a
  7. Try to log in via the Nexus Dashboard (This leads to an internal server error)
  8. Try to manually run flask db upgrade in the dlu-darkflameweb-1 container.

Logs: https://gist.github.com/PlatinPython/59a8c9c14d7904c1424cc377a003f789

Running Windows 10 Pro 22H2 and using the WSL 2 backend in docker.

@Xiphoseer
Copy link
Contributor

Xiphoseer commented Jan 27, 2024

Hi @PlatinPython thank you very much for the detailed report. Based on the errors in the logs, I think you may be hitting MariaDB/mariadb-docker#331 (aka https://jira.mariadb.org/browse/MDEV-24189, aka microsoft/WSL#8443), which explains why I can't reproduce it on linux. Can you check whether the reproduction in microsoft/WSL#8443 (comment) applies to you?

EDIT: Can you share more details on your docker setup? Are you on windows? Are you using the WSL-2 or the Hyper-V backend for docker / docker-desktop? Can you try the other one?

@PlatinPython
Copy link

As far as I can tell, the reproduction linked does not apply to me, as I don't get error on fstat errno 2 anywhere in my output.
I had already added the details of my docker setup to my original comment. I'll give the Hyper-V backend a try and report back.

@PlatinPython
Copy link

Docker with the Hyper-V backend seems to work fine. Login works and flask db upgrade also runs without errors.

Xiphoseer added a commit to DarkflameUniverse/DarkflameServer that referenced this issue Apr 28, 2024
I initially used the bind mount because it's arguably easier to back up and move around than a volume, but turns out with DarkflameUniverse/NexusDashboard#92 it's nothing we can recommend for Docker Desktop on WSL, which unfortunately is the primary setup newcomers will try this with. So changing the default to be a volume should address that (presumably by hosting the volume within the WSL Docker VM, as opposed to the host NTFS filesystem)
Xiphoseer added a commit to DarkflameUniverse/DarkflameServer that referenced this issue Apr 29, 2024
I initially used the bind mount because it's arguably easier to back up and move around than a volume, but turns out with DarkflameUniverse/NexusDashboard#92 it's nothing we can recommend for Docker Desktop on WSL, which unfortunately is the primary setup newcomers will try this with. So changing the default to be a volume should address that (presumably by hosting the volume within the WSL Docker VM, as opposed to the host NTFS filesystem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants