[英]Fiware-quantumleap has issues getting and changing the updated values
The values sent to the Fiware IoT-agent-json are being successfully updated in CB.发送到 Fiware IoT-agent-json 的值正在 CB 中成功更新。 But, quantumleap 0.7.6 won't get them anymore (It was working just fine and cratedb was storing the recieved data normally)..the sanity check shows that It's healthy..I think something is going wrong with the DB.但是,quantumleap 0.7.6 将不再获得它们(它工作得很好,并且 cratedb 正在正常存储接收到的数据)..健全性检查表明它很健康..我认为数据库出了点问题。 The logs shows something like this..日志显示这样的东西..
ERROR:app:Exception on /v2/notify [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/decorator.py", line 48, in wrapper
response = function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/uri_parsing.py", line 144, in wrapper
response = function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/validation.py", line 184, in wrapper
response = function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/validation.py", line 384, in wrapper
return function(request)
File "/usr/local/lib/python3.8/site-packages/connexion/decorators/parameter.py", line 121, in wrapper
return function(**kwargs)
File "/src/ngsi-timeseries-api/src/reporter/reporter.py", line 189, in notify
trans.insert(payload, fiware_s, fiware_sp)
File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 179, in insert
res = self._insert_entities_of_type(et,
File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 273, in _insert_entities_of_type
self._update_metadata_table(table_name, original_attrs)
File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 414, in _update_metadata_table
self._store_medatata(table_name, persisted_metadata)
File "/src/ngsi-timeseries-api/src/translators/crate.py", line 157, in _store_medatata
self.cursor.execute(stmt, (table_name, persisted_metadata))
File "/usr/local/lib/python3.8/site-packages/crate/client/cursor.py", line 53, in execute
self._result = self.connection.client.sql(sql, parameters,
File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 331, in sql
content = self._json_request('POST', self.path, data=data)
File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 458, in _json_request
_raise_for_status(response)
File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 187, in _raise_for_status
raise ProgrammingError(error.get('message', ''),
crate.client.exceptions.ProgrammingError: SQLActionException[InvalidColumnNameException: "5.9" contains a dot]
DEBUG:urllib3.connectionpool:http://crate-db:4200 "POST /_sql?error_trace=true HTTP/1.1" 400 6596
DEBUG:connexion.apis.abstract:Getting data and status code
DEBUG:connexion.apis.abstract:Prepared body and status code (500)
DEBUG:connexion.apis.abstract:Getting data and status code
DEBUG:connexion.apis.abstract:Got framework response
The orion logs shows the following:猎户座日志显示以下内容:
logInfoRequestWithPayload | msg=Request received: POST /v2/entities/station:2/attrs?type=WeatherObserved, request payload (338 bytes): {"temperature":{"type":"Integer","value":19,"metadata":{"TimeInstant":{"type":"DateTime","value":"2021-03-08T10:23:34.295Z"}}},"location":{"type":"geo:point","value":"36.59389,10.30212","metadata":{"TimeInstant":{"type":"DateTime","value":"2021-03-08T10:23:34.295Z"}}},"TimeInstant":{"type":"DateTime","value":"2021-03-08T10:23:34.295Z"}}, response code: 204
time=2021-03-08T10:23:34.327Z | lvl=WARN | corr=56645b84-7ff8-11eb-b242-0242ac120006; cbnotif=1 | trans=1615196386-384-00000000093 | from=172.18.0.8 | srv=smartwater | subsrv=/weatherstation | comp=Orion | op=httpRequestSend.cpp[583]:httpRequestSendWithCurl | msg=Notification response NOT OK, http code: 500
time=2021-03-08T10:23:34.327Z | lvl=INFO | corr=56645b84-7ff8-11eb-b242-0242ac120006; cbnotif=1 | trans=1615196386-384-00000000093 | from=172.18.0.8 | srv=smartwater | subsrv=/weatherstation | comp=Orion | op=logTracing.cpp[63]:logInfoNotification | msg=Notif delivered (subId: 601aabeb96fce3b0209b8aa8): POST quantumleap:8668/v2/notify, response code: 500
time=2021-03-08T10:23:34.327Z | lvl=WARN | corr=56645b84-7ff8-11eb-b242-0242ac120006; cbnotif=2 | trans=1615196386-384-00000000094 | from=172.18.0.8 | srv=smartwater | subsrv=/weatherstation | comp=Orion | op=httpRequestSend.cpp[583]:httpRequestSendWithCurl | msg=Notification response NOT OK, http code: 500
Does anyone have an idea what's the problem here?有谁知道这里有什么问题? Thank you!谢谢!
The error is clearly an attribute name as reported by the message: InvalidColumnNameException: "5.9" contains a dot
该错误显然是消息报告的属性名称: InvalidColumnNameException: "5.9" contains a dot
Try using 5_9
as attribute name.尝试使用5_9
作为属性名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.