LDP drop issue
I created a small shellscripts for the drop operations
This throws an error, which I believe is due to the --drop-database
statement, i.e.:
2019-09-27 11:48:25,518 [luftdatenpumpe.commands ] INFO : Will publish data to ['postgresql://luftdatenpumpe@localhost/weatherbase']
2019-09-27 11:48:25,721 [luftdatenpumpe.target.rdbms ] INFO : PostGIS version: POSTGIS="2.5.2 r17328" [EXTENSION] PGSQL="110" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 1.11.4, released 2016/01/25" LIBXML="2.9.1" LIBJSON="0.11" RASTER
2019-09-27 11:48:25,762 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,763 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,783 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,783 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,813 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,813 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,834 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,834 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,853 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,853 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,872 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,872 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,891 [alembic.runtime.migration ] INFO : Context impl PostgresqlImpl.
2019-09-27 11:48:25,892 [alembic.runtime.migration ] INFO : Will assume transactional DDL.
2019-09-27 11:48:25,906 [luftdatenpumpe.target.rdbms ] INFO : Deleting data from table ldi_osmdata
2019-09-27 11:48:25,906 [luftdatenpumpe.target.rdbms ] INFO : Deleting data from table ldi_stations
2019-09-27 11:48:25,907 [luftdatenpumpe.target.rdbms ] INFO : Deleting data from table ldi_sensors
2019-09-27 11:48:25,908 [luftdatenpumpe.target.rdbms ] INFO : Dropping views and tables in database <Database(postgresql://luftdatenpumpe@localhost/weatherbase)>
2019-09-27 11:48:25,924 [luftdatenpumpe.commands ] ERROR : Database operation failed. Reason: (psycopg2.OperationalError) FATAL: no pg_hba.conf entry for host "::1", user "luftdatenpumpe", database "postgres", SSL off
When I check our /var/data/luftdaten/pgdata/pg_hba.conf it contains:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all all peer
local all postgres peer
# IPv4 local connections:
#host all all 127.0.0.1/32 trust
# IPv6 local connections:
#host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 trust
host replication all ::1/128 ident
# Custom authentication permissions
host weatherbase grafana 127.0.0.1/32 trust
host weatherbase grafana ::1/128 trust
local weatherbase grafana trust
host weatherbase luftdatenpumpe 127.0.0.1/32 trust
host weatherbase luftdatenpumpe ::1/128 trust
local weatherbase luftdatenpumpe trust
I suspect this might be a permission issue?