-2

My localhost is Apache Tomcat. The server is not accepting connections and I am getting error message

connection to localhost refused

on GeoServer and PostgreSQL 9.5 on port 5432. I used the postgresql.conf editor that is built into pgAdminIII to edit the postgresql.conf configuration file to change the 'listen_addresses' parameter where it was already set to "*" for listening to all available IP addresses.

This is the error message displayed on PostgreSQL:

image

alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14
Humaira
  • 1
  • 2
  • Exactly what change did you make to `listen_addresses`? – Michael Hampton Sep 26 '18 at 17:23
  • I used * for all IP addresses. Initially I tried 0.0.0.0 that allows listening for all IPv4 addresses and then :: that allows listening for all IPv6 addresses. It didn't work so I set it back to *. – Humaira Sep 26 '18 at 17:29
  • 2
    Hmm. Unless you need to connect remotely, you should leave `listen_addresses` unset, so that it [only listens to localhost](https://www.postgresql.org/docs/9.5/static/runtime-config-connection.html#GUC-LISTEN-ADDRESSES). – Michael Hampton Sep 26 '18 at 17:31

1 Answers1

0

Try use the local IP of machine.

A similar error happen to me when i use PostgreSQL in a Docker machine, and just works when i use the local IP of machine.

Tom
  • 289
  • 3
  • 13