You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the tutorial https://github.com/FIWARE/tutorials.Historic-Context-NIFI/tree/NGSI-LD, I cannot store data into PostgreSQL.
Added the template for the tutorial: POSTGRESQL-TUTORIAL, enter the password and changed the NGSI Version to ld. next subscribing to Context Changes and orion-ld is running
The following log is from the PostgreSQL
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2021-07-19 16:51:41.389 UTC [48] LOG: starting PostgreSQL 13.3 (Debian 13.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-07-19 16:51:41.394 UTC [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-07-19 16:51:41.409 UTC [49] LOG: database system was shut down at 2021-07-19 16:51:40 UTC
2021-07-19 16:51:41.416 UTC [48] LOG: database system is ready to accept connections
done
server started
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2021-07-19 16:51:41.573 UTC [48] LOG: received fast shutdown request
waiting for server to shut down....2021-07-19 16:51:41.582 UTC [48] LOG: aborting any active transactions
2021-07-19 16:51:41.583 UTC [48] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1
2021-07-19 16:51:41.584 UTC [50] LOG: shutting down
2021-07-19 16:51:41.675 UTC [48] LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
2021-07-19 16:51:41.804 UTC [1] LOG: starting PostgreSQL 13.3 (Debian 13.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-07-19 16:51:41.804 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2021-07-19 16:51:41.804 UTC [1] LOG: listening on IPv6 address "::", port 5432
2021-07-19 16:51:41.815 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-07-19 16:51:41.833 UTC [67] LOG: database system was shut down at 2021-07-19 16:51:41 UTC
2021-07-19 16:51:41.844 UTC [1] LOG: database system is ready to accept connections
2021-07-19 16:56:30.298 UTC [80] ERROR: column "recvtime" of relation "urn_ngsi_ld_device_tractor003" already exists
2021-07-19 16:56:30.298 UTC [80] STATEMENT: Alter table openiot.urn_ngsi_ld_Device_tractor003 ADD COLUMN recvtime text, ADD COLUMN entityid text, ADD COLUMN entitytype text, ADD COLUMN controllingasset text, ADD COLUMN supportedprotocol text, ADD COLUMN supportedprotocol_observedat text, ADD COLUMN statusdescription text, ADD COLUMN statusdescription_observedat text, ADD COLUMN temperature text, ADD COLUMN temperature_unitcode text, ADD COLUMN description text, ADD COLUMN description_observedat text, ADD COLUMN controlledproperty text, ADD COLUMN controlledproperty_observedat text, ADD COLUMN location text, ADD COLUMN category text, ADD COLUMN category_observedat text, ADD COLUMN status text, ADD COLUMN status_observedat text
2021-07-19 16:56:30.307 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.307 UTC [80] STATEMENT: create schema if not exists openiot
2021-07-19 16:56:30.312 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.312 UTC [80] STATEMENT: create schema if not exists openiot
2021-07-19 16:56:30.315 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.315 UTC [80] STATEMENT: create schema if not exists openiot
2021-07-19 16:56:30.318 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.318 UTC [80] STATEMENT: Insert into openiot.urn_ngsi_ld_Device_tractor003 (recvTime,entityId,entityType,controllingAsset,supportedProtocol,supportedProtocol_observedAt,statusDescription,statusDescription_observedAt,temperature,temperature_unitCode,description,description_observedAt,controlledProperty,controlledProperty_observedAt,location,category,category_observedAt,status,status_observedAt) values ('07/19/2021 16:56:29','urn:ngsi-ld:Device:tractor003','Tractor','urn:ngsi-ld:Building:tower003','ul20','2021-07-19T16:56:29.000Z','IDLE','2021-07-19T16:56:29.000Z','{"@value":null,"@type":"Intangible"}','CEL','Temperature Sensor','2021-07-19T16:56:29.000Z','temperature','2021-07-19T16:56:29.000Z','{"coordinates":[13.3598,52.5165],"type":"Point"}','sensor','2021-07-19T16:56:29.000Z','0','2021-07-19T16:56:29.000Z')
2021-07-19 16:56:30.327 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.327 UTC [80] STATEMENT: Insert into openiot.urn_ngsi_ld_Device_tractor002 (recvTime,entityId,entityType,controllingAsset,supportedProtocol,supportedProtocol_observedAt,statusDescription,statusDescription_observedAt,temperature,temperature_unitCode,description,description_observedAt,controlledProperty,controlledProperty_observedAt,location,category,category_observedAt,status,status_observedAt) values ('07/19/2021 16:56:29','urn:ngsi-ld:Device:tractor002','Tractor','urn:ngsi-ld:Building:barn002','ul20','2021-07-19T16:56:29.000Z','IDLE','2021-07-19T16:56:29.000Z','{"@value":null,"@type":"Intangible"}','CEL','Temperature Sensor','2021-07-19T16:56:29.000Z','temperature','2021-07-19T16:56:29.000Z','{"coordinates":[13.3698,52.5163],"type":"Point"}','sensor','2021-07-19T16:56:29.000Z','0','2021-07-19T16:56:29.000Z')
2021-07-19 16:56:30.328 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.328 UTC [80] STATEMENT: Insert into openiot.urn_ngsi_ld_Device_tractor004 (recvTime,entityId,entityType,controllingAsset,supportedProtocol,supportedProtocol_observedAt,statusDescription,statusDescription_observedAt,temperature,temperature_unitCode,description,description_observedAt,controlledProperty,controlledProperty_observedAt,location,category,category_observedAt,status,status_observedAt) values ('07/19/2021 16:56:29','urn:ngsi-ld:Device:tractor004','Tractor','urn:ngsi-ld:Building:farm002','ul20','2021-07-19T16:56:29.000Z','IDLE','2021-07-19T16:56:29.000Z','{"@value":null,"@type":"Intangible"}','CEL','Temperature Sensor','2021-07-19T16:56:29.000Z','temperature','2021-07-19T16:56:29.000Z','{"coordinates":[13.3127,52.4893],"type":"Point"}','sensor','2021-07-19T16:56:29.000Z','0','2021-07-19T16:56:29.000Z')
2021-07-19 16:56:30.329 UTC [80] ERROR: current transaction is aborted, commands ignored until end of transaction block
2021-07-19 16:56:30.329 UTC [80] STATEMENT: Insert into openiot.urn_ngsi_ld_Device_tractor001 (recvTime,entityId,entityType,controllingAsset,supportedProtocol,supportedProtocol_observedAt,statusDescription,statusDescription_observedAt,temperature,temperature_unitCode,description,description_observedAt,controlledProperty,controlledProperty_observedAt,location,category,category_observedAt,status,status_observedAt) values ('07/19/2021 16:56:29','urn:ngsi-ld:Device:tractor001','Tractor','urn:ngsi-ld:Building:farm001','ul20','2021-07-19T16:56:29.000Z','IDLE','2021-07-19T16:56:29.000Z','{"@value":null,"@type":"Intangible"}','CEL','Temperature Sensor','2021-07-19T16:56:29.000Z','temperature','2021-07-19T16:56:29.000Z','{"coordinates":[13.3505,52.5144],"type":"Point"}','sensor','2021-07-19T16:56:29.000Z','0','2021-07-19T16:56:29.000Z')
It seems for some reason Draco did not create the schema to store the data
Running \dn with postgresql-client returns:
List of schemas
Name | Owner
--------+----------
public | postgres
(1 row)
Following the tutorial https://github.com/FIWARE/tutorials.Historic-Context-NIFI/tree/NGSI-LD, I cannot store data into PostgreSQL.
Added the template for the tutorial: POSTGRESQL-TUTORIAL, enter the password and changed the NGSI Version to ld. next subscribing to Context Changes and orion-ld is running
The following log is from the PostgreSQL
It seems for some reason Draco did not create the schema to store the data
Running \dn with postgresql-client returns:
curl -X GET 'http://localhost:9090/nifi-api/system-diagnostics'
The text was updated successfully, but these errors were encountered: