Giter VIP home page Giter VIP logo

iot-edge-sqlite's Issues

Special characters issue at received result message from SQLite

Characters like ö and ü are received from SQLite messages as question mark characters. I checked the hex value that is received in the message payload that contains these special characters and it seems to be 3F (which is decimal 63 which is ascii character '?').
Any special characters I tested are received from SQLite as question marks.
I checked and can confirm that all characters are correctly stored in SQLite (no question mark characters there).
Is there any way to correctly store, send & receive special characters?

How to run the module on Windows 10 IoT Enterprise (Win 10)

I want to run the sqlite module with Windows 10 IoT Enterprise (Win 10 1809 LTS). I make use of Windows containers.

I tried with URI:

mcr.microsoft.com/azureiotedge/sqlite:1.0.5-win10-amd64-1809

Container create options:

{
  "HostConfig": {
    "Binds": [
      "C:\\iotsqlite:c:\\app"
    ]
  }
}

(With full access for everyone to the exiting folder on host)

and desired properties:

"properties": {
  "desired": {
    "SQLiteConfigs": {
      "Db01": {
        "DbPath": "test.db",
       ....

(so there is no path in here)

But this set of settings (and many other combinations) all failed.

Can you provide the correct Windows containers on Windows LTS 1809 setup for the sqlite module which is also available in the iot edge module store?

Regards,

Sander

Filter for a specific ID

I'm trying to make a query where I need to select a specific Id, is it possible? Or when I filter data from a table I receive everything?

Something like in SQL:
select Id , Value from test where Id is 123;

Is there any documentation where I can see the commands I can make besides insert and filter? Maybe a "update" or "delete"....

what is the real-world use-case for this module

This is to confirm my understanding of this modules(sorry if this is naive). What I understand from the devdoc folder, this module basically offers an SQLite database to other modules. Other modules could execute SQL queries on need. To rephrase, this module avoids the need to link to SQLite library in other modules. Other modules still need to frame the appropriate SQL queries. Nothing more. Nothing less.

I was looking for a module which offers disk persistence( azure-iot-sdk-c offers in-memory network retries, but data is lost on power loss ). If I have to re-use the functionality in this module, then my Modbus module should have SQL queries to INSERT and my iothub module must have queries to SELECT/DELETE(cleanup) from this module. Is that a fair understanding?

Sending incorrect SQL query to SQLite causes infinite crash loop

Sending an incorrect SQL query message crashes SQLite before it can send a message received confirmation to the edgeHub. The edge agent then restarts the SQLite module and the edgeHub (not having received any message confirmation) resends the same incorrect SQL query message to SQLite, making it crash again. This makes the SQLite module end up in an infinite crash loop unless the messages are cleared from edgeHub.

In my case I had a typo in the select query table name and forgot to add ';' at the end of the query.

See below image with error in edgehub
afbeelding

Default deployment using Marketplace fails

I try to deploy the module as created by the Azure IoT Edge MArketplace deployment. This is the result:

uno2271gsv@uno2271g2sv-UNO-2271G-E2xAE:/app/db$ sudo iotedge logs -f SQLite
IoT Hub module client initialized.
Desired property change:
{"SQLiteConfigs":{"Db01":{"DbPath":"/app/db/test.db","Table01":{"TableName":"test","Column01":{"ColumnName":"Id","Type":"numeric","IsKey":"true","NotNull":"true"},"Column02":{"ColumnName":"Value","Type":"numeric","IsKey":"false","NotNull":"true"}}}},"$version":1}
Attempt to load configuration: {"SQLiteConfigs":{"Db01":{"DbPath":"/app/db/test.db","Table01":{"TableName":"test","Column01":{"ColumnName":"Id","Type":"numeric","IsKey":"true","NotNull":"true"},"Column02":{"ColumnName":"Value","Type":"numeric","IsKey":"false","NotNull":"true"}}}},"$version":1}
Exception while opening database, err message: SQLite Error 14: 'unable to open database file'.
Check if the database file is created or being mounted into the conainter correctly

I tried to create the /app/db folder using sudo rights but this did not change a thing. Neither did giving the folder more rights or creating an empty file with the right filename.

What is happening?

Jetson_Nano: Could not pull image mcr.microsoft.com/azureiotedge/sqlite:1.0

Hi
I am trying to run a sqlite module on the Jetson Nano & it's failing with the following msg. Need some directions on how to resolve this.

<6> 2021-01-29 13:29:09.439 +00:00 [INF] - Executing command: "Command Group: (\n [Create module SQLiteJetson]\n [Start module SQLiteJetson]\n)"
<6> 2021-01-29 13:29:09.439 +00:00 [INF] - Executing command: "Create module SQLiteJetson"
<3> 2021-01-29 13:29:26.735 +00:00 [ERR] - Executing command for operation ["create"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling Create module SQLiteJetson: Could not create module SQLiteJetson
caused by: Could not pull image mcr.microsoft.com/azureiotedge/sqlite:1.0
caused by: no matching manifest for linux/arm64/v8 in the manifest list entries, StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2020_07_07.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2020_07_07/ModuleManagementHttpClient.cs:line 232
at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning.ModuleManagementHttpClientVersioned.Execute[T](Func1 func, String operation) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/versioning/ModuleManagementHttpClientVersioned.cs:line 143 at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2020_07_07.ModuleManagementHttpClient.CreateModuleAsync(ModuleSpec moduleSpec) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2020_07_07/ModuleManagementHttpClient.cs:line 100 at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 59 <3> 2021-01-29 13:29:26.740 +00:00 [ERR] - Executing command for operation ["Command Group: (\n [Create module SQLiteJetson]\n [Start module SQLiteJetson]\n)"] failed. Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling Create module SQLiteJetson: Could not create module SQLiteJetson caused by: Could not pull image mcr.microsoft.com/azureiotedge/sqlite:1.0 caused by: no matching manifest for linux/arm64/v8 in the manifest list entries, StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2020_07_07.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2020_07_07/ModuleManagementHttpClient.cs:line 232 at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning.ModuleManagementHttpClientVersioned.Execute[T](Func1 func, String operation) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/versioning/ModuleManagementHttpClientVersioned.cs:line 143
at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2020_07_07.ModuleManagementHttpClient.CreateModuleAsync(ModuleSpec moduleSpec) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2020_07_07/ModuleManagementHttpClient.cs:line 100
at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 59
at Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken token) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands/GroupCommand.cs:line 35
at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 59
<3> 2021-01-29 13:29:26.744 +00:00 [ERR] - Step failed in deployment 56, continuing execution. Failure when running command Command Group: (
[Create module SQLiteJetson]
[Start module SQLiteJetson]
). Will retry in -03s.

Also, tried the docker pull
$ docker pull mcr.microsoft.com/azureiotedge/sqlite
Using default tag: latest
latest: Pulling from azureiotedge/sqlite
no matching manifest for linux/arm64/v8 in the manifest list entries

OS info
Jetpack: 4.4.1 [L4T 32.4.4]

Your help is highly appreciated.

Pull of mcr.microsoft.com/azureiotedge/sqlite:1.0 fails

When deploying the module using the Azure IoT Edge Marketplace the pull of 'mcr.microsoft.com/azureiotedge/sqlite:1.0' fails (No such image... 404).

I tried to pull it by hand:

C:\Users\sande>docker pull mcr.microsoft.com/azureiotedge/sqlite:1.0
1.0: Pulling from azureiotedge/sqlite
no matching manifest for unknown in the manifest list entries

And the Docker Hub refers to 'docker pull mcr.microsoft.com/azureiotedge/sqlite' which is failing too.

Is this module still available?
If so, what is the right container address?
If so, will it work on Windows 10 IoT Enterprise 1809 with Windows containers?

I think this needs to be fixed both in the Marketplace and on Hub.docker.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.