PGboss error on Linux server
Hello everyone,
does anyone what is this problem when I want to run PGBoss on my server but it is working well on my local, I get this error:
pg-boss failed to start! error: no pg_hba.conf entry for host 10.1.143.190 , user octopus , database wasp_f994d74c_2fa3_4b4c_b3a6_bdaeee9f1ff8_40dd0d3a_28a9_4ea9_a2 , no encryption
20 Replies
Hi @amin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The error message you're seeing suggests that there's an issue with the
pg_hba.conf
file, which is a PostgreSQL configuration file. It seems like the host 10.1.143.190
is not allowed to connect to the database wasp_f994d74c_2fa3_4b4c_b3a6_bdaeee9f1ff8_40dd0d3a_28a9_4ea9_a2
with the user octopus
.
This could be due to a variety of reasons, such as incorrect configuration of the pg_hba.conf
file, network issues, or firewall settings. It's also possible that there's a discrepancy between your local and server environments that's causing this issue.
Unfortunately, the provided knowledge sources do not contain specific information on how to resolve this issue. I would recommend checking the PostgreSQL documentation or relevant forums for more information on how to configure the pg_hba.conf
file correctly.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @amin, 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?Are you able to connect to the database with
psql
to test it out or when you disable pg boss
?the backend will connect to DB psql via DATABASE_URL well. so when I disable pg boss it connect correctly. only PGboss can't connect
So, the app works without PG Boss and the psql connects successfully. Hmmm. That quite strange. I'll look into it and report back π
It seems to be related to using/not using SSL [0]. Maybe try adding
?sslmode=require
at the end of you DATABASE_URL connection string?
Others suggest that it might be an issue of DB and user name differing. Try making them the same or specify the user/db name explicitly. [1]
And some other answers suggest you might need to allow the 10.1.143.190
host to connect to the DB. [2]
[0]: https://stackoverflow.com/a/59922411
[1]: https://serverfault.com/questions/1105921/why-does-postgres-tell-me-no-pg-hba-conf-entry-for-host-when-i-have-already
[2]: https://dba.stackexchange.com/a/314445Stack Overflow
Node.js, PostgreSQL error: no pg_hba.conf entry for host
I am following this article ((http://nodeexamples.com/2012/09/21/connecting-to-a-postgresql-database-from-node-js-using-the-pg-module/). I have already deployed my app to heroku and currently using
Server Fault
Why does Postgres tell me "no pg_hba.conf entry for host..." when I...
The story so far:
I have installed Postgres on my Linux based desktop (HOST).
I have created a test database, with test data, on HOST.
I have added to the end of the pg_hba.conf file on HOST: host
Database Administrators Stack Exchange
Trouble connecting to a PostgreSQL Database? no pg_hba.conf entry f...
I have a computer I was just given that is hosting a PostgreSQL 14 database on it. On my local computer I have just freshly installed PgAdmin 4.
On PgAdmin, I made a new server group named after the
TBH I'm not a PostgreSQL expert but it seems your config might be off and needs a bit of adjusting π
Thanks for your guide, we have a system that it deploy some instance with different config DATABASE_URL, so I think it does't read DATABASE_URL or something like that
Wohooo @amin, you just became a Waspeteer level 2!
These two statements are conflicting then:
so I think it does't read DATABASE_URL or something like thatand
the backend will connect to DB psql via DATABASE_URL well. so when I disable pg boss it connect correctly. only PGboss can't connectπ
Yes, I meant when I comment PGboss completely, it connects and doesn't crash the backend app
so when I uncomment PGboss, it can't connect to DB. I think I have to set DB on different config for itself or something like that. or it can't at least read DATABASE_URL
this is what I get
You can debug this yourself if you go to
.wasp/out/sdk/wasp/dist/server/jobs/core/pgBoss/pgBoss.js
and add this on the line 8:
You shold see:
It's really strange! because WASP app automatically will pass the connection string to PGboss!
Have you tried any of the 3 things I mentioned here?
Hmm, do you mean stackoverflow?