Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sink postgis/postgres bad destination using DM_BY_ENTITY_DATABASE and several clients #2004

Closed
AlvaroVega opened this issue Mar 22, 2021 · 1 comment
Milestone

Comments

@AlvaroVega
Copy link
Member

AlvaroVega commented Mar 22, 2021

time=2021-03-22T07:51:42.687Z | lvl=ERROR | corr=713732c4-8ae3-11eb-96f0-fa163e83ea20; cbnotif=1 | trans=e88d632d-9a1f-4963-9e82-31eb41c67f3c | srv= | subsrv=/ | op=processNewBatches | comp=Cygnus | msg=com.telefonica.iot.cygnus.sinks.NGSISink[610] : BadContextData (SQLException). POSTGRESQL Data insertion error. Query: insert into sensor_any_noiselevelobserved (recvTime,fiwareServicePath,entityId,entityType,LAeq,LAeq_md,dateObserved,dateObserved_md,name,name_md,location,location_md,source,source_md) values ('2021-03-22 07:51:40.913','/sonometros','T248670','NoiseLevelObserved','061.4','[]','2021-03-22T07:51:18Z','[]','Sensor2 ','[]',ST_SetSRID(ST_MakePoint(-0.38288599999999406::double precision , 32.4613005::double precision ), 4326),'[]','CESVA','[]') (ERROR: relation ".sensor_any_noiselevelobserved" does not exist

Probably wrong destination is selected:

jdbcUrl = "jdbc:" + sqlInstance + "://" + sqlHost + ":" + sqlPort + "/" + defaultSQLDataBase;

postgresql/postgis is using destination for schemaname and dbname, but both should be spltited and propagated from https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/sinks/NGSIPostgisSink.java#L432

Logs should print all dbname, schema, tablename
https://github.com/telefonicaid/fiware-cygnus/blob/master/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/sinks/NGSIPostgisSink.java#L442

PostgreSQL databases naming, schemas, tablename conventions
https://github.com/telefonicaid/fiware-cygnus/blob/master/doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_postgresql_sink.md#postgresql-databases-naming-conventions

@fgalan fgalan added this to the release/2.8.0 milestone Mar 29, 2021
@fgalan
Copy link
Member

fgalan commented Mar 29, 2021

Having merged PR #2007, should this issue be closed?

@fgalan fgalan closed this as completed Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants