I’ve an EC2 occasion of timescaledb operating on AWS. For safety functions, my group members and I are utilizing OpenVPN in order that now we have entry to it and the identical IP tackle has been outlined within the inbound guidelines of Safety group of the EC2 occasion
Sort Protocol Port vary supply Postgreqsl TCP 5432 <my vpn ip tackle> Postgreqsl TCP 5432 172.31.32.0/20 SSH TCP 22 <my vpn ip tackle>
and there aren’t any outbound guidelines.
Now, I enter into the VPN and launch the occasion and do
sudo su postgresql adopted by
psql -h ec2-xx-xxx-xxx-xxx.eu-central-1.compute.amazonaws.com -d mydb -U myuser
I get the next error:
psql: couldn’t hook up with server: Connection refused Is the server
operating on host
(172.31.40.110) and accepting TCP/IP connections on port 5432?
I’m checking the
postgresql.conf file and it has the next:
# CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------ # - Connection Settings - listen_addresses = '*' # what IP tackle(es) to hear on; # comma-separated listing of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) port = 5432 # (change requires restart) max_connections = 100 # (change requires restart) #superuser_reserved_connections = 3 # (change requires restart) unix_socket_directories = '/var/run/postgresql' # comma-separated listing of directories # (change requires restart) #unix_socket_group = '' # (change requires restart) #unix_socket_permissions = 0777 # start with Zero to make use of octal notation # (change requires restart) #bonjour = off # promote server through Bonjour # (change requires restart) #bonjour_name = '' # defaults to the pc identify # (change requires restart)
# Database administrative login by Unix area socket native all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "native" is for Unix area socket connections solely native all all peer # IPv4 native connections: host all all 127.0.0.1/32 md5 # IPv6 native connections: host all all ::1/128 md5 # Enable replication connections from localhost, by a consumer with the # replication privilege. native replication all peer host replication all 127.0.0.1/32 md5 host replication all ::1/128 md5 host all all 0.0.0.0/0 md5 #ipv4 vary host all all ::0/0 md5 #ipv6 vary host all all all md5 #all ip
Can anybody please inform me what’s the mistake i’m commiting right here and if i’m lacking one thing?