W
Wasp5mo ago
Mitu

when im runnig wasp start db, db is not connecting, just this happens and that's it endlessly

wasp start db ✨ Starting a PostgreSQL dev database (based on your Wasp config) ✨ Additional info: ℹ Connection URL, in case you might want to connect with external tools: postgresql://postgresWaspDevUser:postgresWaspDevPass@localhost:5432/OpenSaaS-0ac1e6b787 ℹ Database data is persisted in a docker volume with the following name (useful to know if you will want to delete it at some point): wasp-dev-db-OpenSaaS-0ac1e6b787 ...
2 Replies
kapa.ai
kapa.ai5mo ago
Hi @Mitu. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The wasp start db command is used to start a PostgreSQL dev database for your Wasp app. If it's not connecting, there could be a few reasons for this: 1. Docker is not installed or not running: The dev database runs in a Docker container, so you need to have Docker installed and running on your machine. You can check if Docker is installed with docker -v and if it's running with docker info. 2. Port 5432 is already in use: The dev database uses port 5432. If another application is using this port, the database won't be able to start. You can check if the port is in use with the instructions provided here (https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/). 3. Docker daemon is not running: If the Docker daemon is not running, you won't be able to start the dev database. You can check if the Docker daemon is running with docker info. If you've checked all of these and you're still having issues, it might be helpful to share the exact error message you're seeing. This could provide more information about what's going wrong. If you want to connect to an existing database instead of using the dev database, you can do this by setting the DATABASE_URL environment variable to the connection string of your database. You can set this variable in the .env.server file in the root directory of your Wasp project, or you can set it inline when running a wasp command. For example:
DATABASE_URL=<my-db-url> wasp ...
DATABASE_URL=<my-db-url> wasp ...
This will tell Wasp to use the specified database instead of the dev database. For more information, you can refer to the Wasp documentation on connecting to a database (https://wasp-lang.dev/docs/data-model/backends#connecting-to-a-database). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Mitu, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho5mo ago
Did you try what the bot suggested? 🙂
Want results from more Discord servers?
Add your server