Im getting this error with postgre in my centos vps
Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host '::1', user 'xxx', database 'xxx_xxx', SSL off in
Here is my pg_hba.conf
Everything seems right, but always get this error, no matter what user i create and set.
quanta43.9k1515 gold badges117117 silver badges197197 bronze badges
AndreAndre
1 Answer
Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host '::1', user 'xxx', database 'xxx_xxx', SSL off in
'::1'
means that you're connecting via IPv6.Either specify
quantaquanta-h 127.0.0.1
or add/uncomment an entry to/in pg_hba.conf
:43.9k1515 gold badges117117 silver badges197197 bronze badges
Not the answer you're looking for? Browse other questions tagged centosvpspostgresqldedicated-server or ask your own question.
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave 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
Comments
commented Oct 2, 2018
Following the README instructions to get sentry running for the first time under Docker for Windows I ran step 4 docker-compose run --rm web upgrade and got the following output: |
commented Oct 2, 2018
Please use other resources like our forums or stack overflow for general support questions. |
commented Oct 4, 2018
Not convinced that 'I followed your precise instructions and they fall apart' is a general support question. It's certainly not a programming question for stack overflow. |
commented Oct 4, 2018
The file referenced is part of Postgres and it’s a permission error. It’s not a bug in Sentry and there’s an expectation that if you run a Sentry installation you understand the core services running, how to configure them, and how to manage them. That’s all I can tell you unless there’s something fundamentally broken in our docker container which seems unlikely given its use. |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
I'm trying to build a Postgres HA Cluster with Postgres 11, patroni and etcd.I have it pretty much working other than the error in the title.
The patroni config section for the pg_hba.conf looks like this,
No other entries appear to be needed as the ETCD cluster takes care of the configuration and role of each node.I have tested this with the node entries of the servers in the pg_hba section but still get the same error.I built an example of a patroni PG cluster on one server running 2 instances of Postgres 11 and it worked fine. No issues when switching.
I have 2 nodes so when I restart the master and it becomes the secondary, it throws this error
'my private ip' being the IP of the node it is throwing the error on.
Databases replicate across ok so the DB switching works despite this error.
My investigations now suspect its something to do with the ETCD cluster which reports back as healthy and the entries for the nodes appear to be ok.
Has anyone come across this before?
inkedinked
migrated from superuser.comDec 20 '18 at 18:16
This question came from our site for computer enthusiasts and power users.
Browse other questions tagged linux or ask your own question.
Eu4 custom nation map. Hello I am trying to run a website sent to me but after doing so this error appeared
after Googling it it says that i just need to add an entry in the pg_hba.conf file for that particular user.this is my pg_hba.conf file.
but after doing so, the error still persist. I restarted my XAMPP server several times but no changes appears.Thanks in advance
Colin 't Hart6,81388 gold badges2626 silver badges3434 bronze badges
JinJin
11 Answers
Add or edit the following line in your
postgresql.conf
:Add the following line as the first line of
pg_hba.conf
. It allows access to all databases for all users with an encrypted password:Restart Postgresql after adding this with
Jérôme RadixJérôme Radixservice postgresql restart
or the equivalent command for your setup.2,20611 gold badge77 silver badges22 bronze badges
This solution works for IPv4 / IPv6
nano /var/lib/pgsql/data/pg_hba.conf
and then restart postgresql service
Community♦
Jose NobileJose Nobile
The way I solved this was:
Added the line as below in
pg_hba.conf
:and this was modified in
postgresql.conf
, as shown:I had this instance running on a Centos 7.3 and Postgres 9.5 in a VM in Azure, given this was a POC (proof of concept) you won't want to connect without SSL in your actual prod environment.
To connect to the instance I was using pgAdmin 4 on macOS Sierra.
joanolo9,92344 gold badges2222 silver badges5454 bronze badges
Roberto LopezRoberto Lopez
Fresh Postgres 9.5 install, Ubuntu.
The key was the local connection type, since psql uses domain socket connection.
pg_hba.conf
willianptswillianpts
I had the same error when I tried to connect to a local database using an SSH tunnel. I solved it by changing the host name from
localhost
to 127.0.0.1
.FinesseFinesse
- Add the following line in the bottom of
pg_hba.conf
:hostnossl all all 0.0.0.0/0 md5
- Add/modify the line in
postgresql.conf
:listen_addresses = '*'
- MAKE SURE THAT the user that is connecting has a password: (Example connect user named
postgres
)a. Run the followingpsql
command with thepostgres
user account:sudo -u postgres psql postgres
b. Set the password:# password postgres
nguyênnguyên
In my case, I had to add the exact line as suggested by the error information. Cannot bypass it by adding 'all' users with all IPs as rule. Now it is like:
PosgreSQL 10.5 on CentOS 7.
WesternGunWesternGun
This below worked for me: (pg_hba.conf)
trust
Allow the connection unconditionally. This method allows anyone that can connect to the PostgreSQL database server to login as any PostgreSQL user they wish, without the need for a password or any other authentication.
md5
Require the client to supply a double-MD5-hashed password for authentication.
refer for more here
RavistmRavistm
Instructions for Debian users.
Login as posgres user:
Get the location of pg_hba.conf by quering the database:
Open pg_hba.conf: Wrath of the machine walkthrough.
Add configuration where it says 'Put your actual configuration here':
Oct 13, 2018 - He isn’t a special operative or part of a highly trained anti-alien task force. But Issac does have a trump card: his trusty, powerful plasma cutter. Last night, we started a playthrough of Visceral Games’ 2008 sci-fi horror game Dead Space on Kotaku’s Twitch channel. For Dead Space on the PlayStation 3, a GameFAQs message board topic titled 'Plasma cutter only run - A few questions.' Jonn777 10 years ago#1. Can I use melee and my kinesis and throw stuff at them and stil qualify for the the trophy? For Dead Space on the Xbox 360, a GameFAQs message board topic titled. How about 'beat the game without using the Plasma Cutter'? Fight is over and the 1-3 extra shots you'll find in the locker will be little consolation. Feb 16, 2013 - Ad Plasma Cutters, also known as Cutters, are a family of similar improvised weapons that have commonly been used by survivors during. Dead space 1 plasma cutter.
Logout to your user:
Restart your postgres server for changes to take effect:
Eugene KulabuhovEugene Kulabuhov
It works for me only adding the below configuration:
peterh1,16555 gold badges1616 silver badges3333 bronze badges
navjyot vermanavjyot verma
Just write the following sequence in the configuration file:
This is all.The file
db-config
contains the specification data of the host, user, password and database. With this small change it works perfectly both locally and in a pass service (Heroku). Fully tested.No Pg_hba.conf Entry For Host Postgresql
ypercubeᵀᴹ79.7k1111 gold badges139139 silver badges225225 bronze badges
Jose ArredondoJose Arredondo
Not the answer you're looking for? Browse other questions tagged postgresqlphppg-hba.conf or ask your own question.
Introduction
This document describes how to resolve 'FATAL: no pg_hba.conf entry for host' error when login to CloudCenter Manager Postgres standalone server with the use of PGAdmin tool.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
- PostgreSQL
- PGAdmin tool
Components Used
The information in this document is based on these software versions:
- CloudCenter version 4.8.2
- MGMTPOSTGRES_STANDALONE
- Posrgres9.6
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Problem
When you try to connect the CloudCenter Postgres server with the use of pgAdmin, it fails with the 'UNAUTHORIZED' error as shown in the image.
Solution
This authentication issue happens when you try to connect to the Postgres SQL server remotely other than the CloudCenter Manager server. In order to resolve this error, follow these steps:
1. Log in to Postgres SQL server with the use of ssh console.
2. cd to /var/lib/pgsql/9.6/data/.
3. Open pg_hba.conf file in an editor.
4. Add an entry of the host IP address from which you try to connect. You can input the entry of the host which you would like to provide access to as shown in the image.
5. Restart the postgres SQL server.
6. Try again in order to connect with the use of pgAdmin tool and you should be able to connect without any errors as shown in the image.