Geographic Information Systems Asked on August 28, 2021
I am using GeoNode with connection to Geoserver through Docker.(from here: https://github.com/GeoNode/geonode).
I am now trying to connect to a PostGIS database. I have indicated the host ip address 172.17.0.1 on docker network, using the "ip addr show" in Terminal. The port stays same: 5432.
When trying to connect I get the error message: "Error creating data store, check the parameters. Error message: Unable to obtain connection: Cannot create PoolableConnectionFactory (Connection to 172.17.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)".
What could be the solution?
Assuming that you have both the PostGIS and the Geoserver together in one docker-compose.yaml file, they are already in the same network. That said you don't need an IP address to connect a new PostGIS store in Geoserver to the PostGIS database running in the second docker. If your PostGIS Docker is up and running and you can connect to it via e.g. DBeaver or QGIS with your credentials e.g.:
host: localhost
host: 5432
database: test
username: postgis
password: secret
then your solution might be, that you need to change the hostname to the container_name
you assigned to your PostGIS in the docker-compose.yaml since this is how the PostGIS is known in the docker-compose network.
Answered by The dude on August 28, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP