Open
Description
i am running postgre by WSL2 in ubuntu 24.04, and i am using docker desktop for windows.
when i run wasp start db
, it report below error. but i do not on any process on wsl2 or windows for port 5432.
± |master ?:2 ✗| → 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-bba774dce6
ℹ 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-bba774dce6
...
docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5432 -> 0.0.0.0:0: listen tcp 0.0.0.0:5432: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
wasp-bin: callCommand: docker run --name wasp-dev-db-OpenSaaS-bba774dce6 --rm --publish 5432:5432 -v wasp-dev-db-OpenSaaS-bba774dce6:/var/lib/postgresql/data --env POSTGRES_PASSWORD=postgresWaspDevPass --env POSTGRES_USER=postgresWaspDevUser --env POSTGRES_DB=OpenSaaS-bba774dce6 postgres (exit 125): failed
i try run bare docker command directly, it works this time.
2024-12-22 03:03:37 ⌚ ming-r7000 in ~/github/feitian124/wearit/app
± |master ?:2 ✗| → sudo docker run --name wasp-dev-db-OpenSaaS-bba774dce6 --rm --publish 5432:5432 -v wasp-dev-db-OpenSaaS-bba774dce6:/var/lib/postgresql/data --env POSTGRES_PASSWORD=postgresWaspDevPass --env POSTGRES_USER=postgresWaspDevUser --env POSTGRES_DB=OpenSaaS-bba774dce6 postgres
PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-21 19:03:43.907 UTC [1] LOG: starting PostgreSQL 17.2 (Debian 17.2-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-12-21 19:03:43.911 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-12-21 19:03:43.922 UTC [1] LOG: listening on IPv6 address "::", port 5432
2024-12-21 19:03:43.932 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-21 19:03:43.943 UTC [29] LOG: database system was shut down at 2024-12-21 18:24:50 UTC
2024-12-21 19:03:43.958 UTC [1] LOG: database system is ready to accept connections
but later steps report error too:
± |master ?:2 ✗| → wasp db migrate-dev
🐝 --- Setting up database... -----------------------------------------------------
[ Db !] Error: P1001
[ Db !]
[ Db !] Can't reach database server at `localhost:5432`
[ Db !]
[ Db !] Please make sure your database server is running at `localhost:5432`.
[ Db !]
[ Db ] Environment variables loaded from .env
[ Db ] Prisma schema loaded from ../db/schema.prisma
[ Db ]
[ Db ] ✔ Generated Prisma Client (v5.19.1) to ./../../../node_modules/@prisma/client in 116ms
❌ --- [Error] Can not connect to database: ---------------------------------------
The database needs to be running in order to execute this command. You can easily start a managed dev database with `wasp start db`.
i run wasp db studio
, i can see my database are runing and can see studio page,
obviously my database is running on 5432, not sure why wasp db migrate-dev
and wasp start
not work.
does anyone met same problem?
and also, does this repo support sqlite?
thank you.
Metadata
Metadata
Assignees
Labels
No labels