-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Realworld app returning Network Error #460
Comments
Hm it seems like Wasp can't reach the database. Can you somehow confirm
that your database is running on localhost:5432? The docker command - once
you run it, do you leave it running while you do other Wasp commands (if
not you should!)? It needs to keep running all the time, and you should see
logs on its screen about Wasp connecting and executing operations.
What is your OS? Are you running all of this in another Docker, or possibly
some other unusual setup?
…On Fri, 11 Feb 2022, 06:32 kalle3e, ***@***.***> wrote:
*Describe the bug*
Downloaded the code, wasp build and wasp start and on registering user it
returns "Network Error"
Error:
From wasp db migrate-dev ---
Environment variables loaded from .env
Prisma schema loaded from ../db/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at
"localhost:5432"
Error: P1001: Can't reach database server at localhost:5432
Please make sure your database server is running at localhost:5432.
Error: Migrate dev failed: Migrate (dev) failed with exit code: 1
***@***.***:~/realworld$
*To Reproduce*
Steps to reproduce the behavior:
Followed the README.md and run docker:
docker run --rm --publish 5432:5432 -v
postgresql-data:/var/lib/postgresql/data --env POSTGRES_PASSWORD=devpass
postgres
System message: 2022-02-11 04:21:48.570 UTC [1] LOG: database system is
ready to accept connections
.env in the project root
/home/kitt/realworld/.env
.env file
[image: Screenshot from 2022-02-11 16-23-08]
<https://user-images.githubusercontent.com/64237549/153541675-813b36c8-2f24-499f-95f3-bb0887476afc.png>
contains
SKIP_PREFLIGHT_CHECK=true;
***@***.***:5432/postgres";
*Expected behavior*
A clear and concise description of what you expected to happen.
Expected the system to create the user
*Screenshots*
If applicable, add screenshots to help explain your problem.
*Desktop (please complete the following information):*
Laptop, Ubuntu 20.04, Chrome V 97.0.4692
*Additional context*
Add any other context about the problem here.
Error: migrating database
Error: P1001: Can't reach database server at localhost:5432
Please make sure your database server is running at localhost:5432.
Error: Migrate dev failed: Migrate (dev) failed with exit code: 1
—
Reply to this email directly, view it on GitHub
<#460>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALXFB77FXLBB3KZNVJQ25TU2SNNZANCNFSM5ODEFIBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hmmmm, so it is not an issue related to Wasp, instead it seems to do with the Docker image for Postgresql. I found some possibly related issues here:
I also found others mentioning the issue on different places, but I can't seem to find one clear answer pointing to a well defined problem. I removed my local postgres docker image, to make sure I pull the latest one, hoping that will replicate the problem you are having, but no luck there - it works fine for me and I don't get any "invalid length of startup packet" messages - not when doing stuff via Wasp. One way I can get "invalid length of startup packet" messages is if I try opening So my question would be: when do you get that error? If when visiting |
Bravo, thanks very much Martin. I've got it working now thanks! I think I ran the db docker command outsite of the project dir and then I tried to fix problems running the localhost:5432 on the browser, but you said we don't do that. All good! Happy to have a look around with the code and wasp. It helps when you're more confident with working with a docker container to start with. |
@kalle3e great, I am glad we figured it out! Good luck with Wasp and feel free to reach out if you have any questions/feedback, either here or on our Discord server! |
can u plz explain how u solved this problem in a lil detail? |
It’s so long ago so it’s diff Otto remember exactly. I think o went back
and follow the step by step instructions again. Also take note of what
Martin says regarding the image, running using localhost. Also take care of
the database migration step. If required, delete the generated files and
start again. Hope it helps.
…On Wed, 17 Jan 2024 at 12:42 pm, kislaySinha1999 ***@***.***> wrote:
can u plz explain how u solved this problem in a lil detail?
—
Reply to this email directly, view it on GitHub
<#460 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APKC73LNH5QCZUPNA2OLZR3YO4UB7AVCNFSM5ODEFIBKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZGQ3TSOBRHA3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Are you experiencing similar issue? Let me know exactly what you are struggling with and I can try to help! |
Describe the bug
Downloaded the code, wasp build and wasp start and on registering user it returns "Network Error"
Error:
From wasp db migrate-dev ---
Environment variables loaded from .env
Prisma schema loaded from ../db/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:5432"
Error: P1001: Can't reach database server at
localhost
:5432
Please make sure your database server is running at
localhost
:5432
.Error: Migrate dev failed: Migrate (dev) failed with exit code: 1
kitt@x2:~/realworld$
To Reproduce
Steps to reproduce the behavior:
Followed the README.md and run docker:
docker run --rm --publish 5432:5432 -v postgresql-data:/var/lib/postgresql/data --env POSTGRES_PASSWORD=devpass postgres
System message: 2022-02-11 04:21:48.570 UTC [1] LOG: database system is ready to accept connections
.env in the project root
/home/kitt/realworld/.env
.env file
contains
SKIP_PREFLIGHT_CHECK=true;
DATABASE_URL="postgresql://postgres:devpass@localhost:5432/postgres";
Expected behavior
A clear and concise description of what you expected to happen.
Expected the system to create the user
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Laptop, Ubuntu 20.04, Chrome V 97.0.4692
Additional context
Add any other context about the problem here.
Error: migrating database
Error: P1001: Can't reach database server at
localhost
:5432
Please make sure your database server is running at
localhost
:5432
.Error: Migrate dev failed: Migrate (dev) failed with exit code: 1
The text was updated successfully, but these errors were encountered: