Score:0

unable to allow TCP connection to PostgreSQL from Draco (Apache Nifi)

in flag

I am trying to use NGSIToPostgreSQL processor to stream data to PostgreSQL-9.6 (on CentOS 7.4). But I keep getting this:

Cannot create PoolableConnectionFactory (Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

I prepared firewall to accept TCP connections on 5432 port:

sudo firewall-cmd --zone=public --add-port=5432/tcp --permanent

and

sudo firewall-cmd --reload

Then I updated PostgreSQL files:

pg_hba.conf like this:

host    all             all             127.0.0.1/32            trust

and postgresql.conf like this:

listen_addresses='*'

and finally restart the server like this:

sudo service postgresql-9.6.service restart #restart_psql

However I still get this error.

Draco (Apache NiFi) runs through Docker if that means something.

Also

When I try to curl I get this:

$ curl -X GET 127.0.0.1:5432

$ curl: (52) Empty reply from server

Which I guess it means that the server is not responding.

What am I missing?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.