-
Notifications
You must be signed in to change notification settings - Fork 42
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
Internal Server error response for POST /sensors/:id and GET /sensors/:id/data methods in sensorResource #4
Comments
I guess it failed to create the correspending Cassandra table in 'ioe' keyspace. Can you check through web interface whether the created sensor is shown? |
Yes, the created sensor with id 1 is shown in the web interface under sensors tab. When I was creating new sensor I got 'Internal server error' when clicked on 'Save'. But the created sensor is shown in the sensors list after a refresh. |
It's better if you can confirm in the keyspace in Cassandra has been created successfully using a client (ex DataStax client). Can you try to create another sensor with Store type field as NORMAL ? In the new sensor UI, ideally |
The problem was with the StoreType field value. The table data_x is getting created when a new sensor is created. I am able to perform POST /sensors/:id and GET /sensors/:id/data methods in sensorResource now. But there are no other tables created in keyspace for device and sensor data entries done using the interface. |
Cassandra data store only handles sensor data because of its scalability properties. Details about sensor and device information are stored in MySQL DB in the docker setup. This is done because relation DB does a better job of keeping these data compared to NoSQL. |
I used the following command for retrieving the data using REST endpoint
curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer <access_token>' 'http://127.0.0.1:8080/api/sensors/1/data'
I got the following response {
"message": "error.internalServerError",
"description": "Internal server error",
"fieldErrors": null
}
The same error occurs for POST http://127.0.0.1:8080/api//sensors/:id. The sensor with id 1 is present.
The text was updated successfully, but these errors were encountered: