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

"Tortoise-ORM shutdown" error #230

Closed
AngerRandom opened this issue Apr 3, 2024 · 7 comments
Closed

"Tortoise-ORM shutdown" error #230

AngerRandom opened this issue Apr 3, 2024 · 7 comments

Comments

@AngerRandom
Copy link

Hey! I was tried to host Ballsdex without Docker. I was almost done but when I try to start the bot it fails to connect to database and gives this error (I cannot copy paste the full message there so I'll only send the error message):
[2024-04-03 17:14:48] INFO tortoise: Tortoise-ORM shutdown
Is there any way to fix it? I was found an issue similiar to this but I cannot found any solution and the support server in the readme says you end the support of self hosting.

@laggron42
Copy link
Member

Hi, we indeed stopped supporting custom instances because it was too much of a drain, so you're mostly on your own unless you have problems that are legit and/or poorly documented.

The line of log you have included doesn't help at all, it's always displayed to indicate that the bot is shutting down. The relevant error is probably above. Feel free to include all the logs, or if you don't want to pollute too much you could use https://gist.github.com

@AngerRandom
Copy link
Author

ballsdex.log
Okay then I'll send the log file itself then. (Don't mind the first logs, only check the last 2 log entries.)

@laggron42
Copy link
Member

The error is printed in your console when this happens. I'm not sure where the other error comes from, but you should see this message in red which explains the issue
image

You need to export the BALLSDEXBOT_DB_URL environment variable when running the bot, to tell it how to connect to the postgres server.
For example, you could provide it with this value: BALLSDEXBOT_DB_URL=postgres://ballsdex:defaultballsdexpassword@localhost:5432/ballsdex (which is what is being used for the docker config). It attempts to connect to the database ballsdex with user ballsdex and the associated password.

You need to run a PostgreSQL server yourself, and learn to configure a user and database such that Ballsdex can connect to it. I can't help further with those issues, as this is out of scope of our code.

@AngerRandom
Copy link
Author

AngerRandom commented Apr 3, 2024

Actually that error was logged before I set up the PostgreSQL server correctly I think. I have that already. Probably you checked the first error message.

@laggron42
Copy link
Member

Well, you need to setup the postgres server first, eventually use psql to see if you can connect to it, then try to run Ballsdex. Closing as this is on you to figure out this part

@AngerRandom
Copy link
Author

AngerRandom commented Apr 6, 2024

I think it finally connected to database after setting up my own database. But I probably cannot run commands anymore in my panel so I can't start the admin panel.

Update: I got this error when running python3 -m ballsdex after starting over (i got the text with an tool so some things may be weird):
error1.txt

@laggron42
Copy link
Member

This is an error with your config file. I'm closing at this point because this is stuff you can find in the docs, or by using a YAML validator.

@laggron42 laggron42 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2024
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

2 participants