Giter Site home page Giter Site logo

azure-samples / iot-edge-samples Goto Github PK

View Code? Open in Web Editor NEW
30.0 25.0 27.0 553 KB

Sample modules written in different languages running on Azure IoT Edge v1.

Home Page: https://github.com/Azure/iot-edge-v1

License: MIT License

JavaScript 27.98% C# 47.79% Java 19.74% PowerShell 4.49%

iot-edge-samples's Introduction

Azure IoT Edge Module Samples

This tutorial shows how to setup your IoT Edge module development environment (Windows/Ubuntu Linux), write a module, customize and initialize the IoT Edge instance. It includes samples for JavaScript, Java, and .NET modules.

If you encounter an issue related to these samples please submit a new issue. For issues related to the IoT Edge or the packages please go to the IoT Edge repo and submit an issue.


How to run the JavaScript module sample (Windows 10/Ubuntu 14+/Debian/Raspbian)

Prerequisites

  1. Install latest Git Client.
  2. Install latest Node LTS (v6.11.2).

Raspbian:

  1. Install Raspbian-jessie.

Quick Start

  1. git clone https://github.com/Azure-Samples/iot-edge-samples.git
  2. cd iot-edge-samples/js/simple
  3. npm install to install pre-built core runtime of IoT Edge.
  4. npm run local to start the IoT Edge with pre-defined modules (sensor and printer).

How to run the Java module sample (Windows 10/Ubuntu 14+)

Prerequisites

  1. Install latest Git Client.
  2. Install latest x64 version of JRE.
  3. Install latest Maven.

Quick Start

  1. git clone https://github.com/Azure-Samples/iot-edge-samples.git
  2. cd iot-edge-samples/java/timer
  3. mvn package to build your module with all dependencies.
  4. mvn exec:exec to start the IoT Edge with pre-defined module.

How to run the .NET module sample (Windows 10)

Prerequisites

  1. Install latest Git Client.
  2. Install Visual Studio 2015 with Update 3.

Quick Start

  1. git clone https://github.com/Azure-Samples/iot-edge-samples.git
  2. cd iot-edge-samples\dotnet\nuget_sample\src
  3. Open the DotnetModuleSample.sln solution file.
  4. In the Visual Studio 2015 IDE Solution Explorer right click the DotnetModuleSample and select properties from the context menu.
  5. Click Debug and update the Executable text box with the location and name of the executable to run by typing "<path to your output directory>\gw.exe" and update the Application arguments: to module_dev_sample.json.
  6. Build the DotnetModuleSample project (Ctrl + Shift + B).
  7. Click the Start button in the Visual Studio 2015 IDE or press the F5 key.
  8. Press the Enter key to exit the Azure IoT Edge gateway process.

How to run .NET Standard v1.3 module sample (Windows 10)

Prerequisites

  1. Install latest Git Client.
  2. Install Visual Studio 2017.

Quick Start

  1. git clone https://github.com/Azure-Samples/iot-edge-samples.git
  2. cd iot-edge-samples\dotnetcore\nuget_sample\src
  3. Open the NetstandardModuleSample.sln solution file.
  4. In the Visual Studio 2017 IDE Solution Explorer right click the NetstandardModuleSample and select properties from the context menu.
  5. Click Debug and update the Executable option to $(OutDir)gw.exe and the Application arguments: to module_dev_sample.json.
  6. Build the NetstandardModuleSample project (Ctrl + Shift + B).
  7. Click the Start button in the Visual Studio 2017 IDE or press the F5 key.
  8. Press the Enter key to exit the Azure IoT Edge gateway process.

iot-edge-samples's People

Contributors

fedeoliv avatar furqanmm avatar jseb225 avatar microsoftopensource avatar msftgits avatar sandervandevelde avatar snaheth avatar wodansson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iot-edge-samples's Issues

libcurl error when running JS sample on Ubuntu 16.04

Hello,

The JS sample works when I'm on a Windows box, but on Ubuntu 16.04 I'm getting the following error:

steven@iotvm:~/azure-iot-gateway-samples/js$ npm run local

> [email protected] local /home/steven/azure-iot-gateway-samples/js
> node app.js local

/home/steven/azure-iot-gateway-samples/js/node_modules/azure-iot-gateway-lin/bin/gw: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
Gateway child process exited with code = 127

Reproduction steps

  • Provisioned a new VM on Azure with az vm create -n iotvm -g IOT --image UbuntuLTS
  • Installed Node v6.10.2 via the official steps
  • Ran the Quick Starts steps from this repo's readme (git clone, npm install, npm run local)

Thanks!

.Net sample relies on msbuild magic to work.

Any gateway requires some native dlls to run that are supplied in the dependent nuget package:
Microsoft.Azure.Devices.Gateway.Native.Windows.x64. For example, the first interop call is to instantiate the gateway itself from gateway.dll, and that works fine in the sample. However, if one creates a new .net executable to replicate the sample, it will fail because gateway.dll and its dependencies won't get copied to the output directory after adding the package Microsoft.Azure.IoT.Gateway.Module (which confers the dependency on Microsoft.Azure.Devices.Gateway.Native.Windows.x64.) It looks like the way the sample addresses this is by manually adding a msbuild blurb to the .csproj file which in turn invokes a file copy target from the nuget package:

<Import Project="..\packages\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.1.1.0\build\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.targets" Condition="Exists('..\packages\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.1.1.0\build\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\packages\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.1.1.0\build\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.1.1.0\build\Microsoft.Azure.Devices.Gateway.Native.Windows.x64.targets'))" /> </Target>
If this is strictly necessary and is a manual step, this should be clearly documented...

[V1] Message Delivery Receipt

How do I get a delivery confirmation from the IoT Hub? I would like to store a message locally to disk until I have confirmed it has arrived at the IoT Hub.

Issues running dotnet core version

Hello,

I am testing the NetstandardModuleSample project targeted at the .net standard framework 2.0. When running from inside of VS 2017, it will launch and act normal. When I switch to command line, I begin to have issues.

When running using: "dotnet gateway.dll" I get following issues:
-A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found. I can resolve this by adding the file: gateway.runtimeconfig.json with the data:
{
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "2.0.0"
}
}
}

After this is fixed, I get this issue:
-Unhandled Exception: System.BadImageFormatException: Could not load file or assembly iot-edge-samples\dotnetcore\nuget_sample\src\NetstandardModuleSample\bin\Debug\netstandard1.3\gateway.dll'. The module was expected to contain an assembly manifest.

Any help is much appreciated. Thanks!

Looking for REST api to send messages to iot edge hub

I'm using iot edge modules. I need to send messages to the hub from the edge module.
Per my understanding, I need to send it first to the iot edge hub, the edge hub will take care of transferring it to the cloud iot hub. I can consume it from there.

If that's supported, I'm looking for a REST sample on how to do that (or just REST documentation)

build script not working in ubuntu 14.04

Hi, I am using Azure IoT edge, and follow this link https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-linux-iot-edge-get-started to start working on it. But, while running build.sh script it gives me error.

--------------- Error -------------
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- CMake Install Prefix is /usr/local
-- Looking for x86_64
-- Looking for x86_64 - found
-- AIG architecture: x86_64
-- ctest not found...
-- Building ctest...
Submodule 'deps/ctest' (https://github.com/azure/azure-ctest) registered for path 'deps/ctest'
Cloning into 'deps/ctest'...
remote: Counting objects: 250, done.
remote: Total 250 (delta 0), reused 0 (delta 0), pack-reused 250
Receiving objects: 100% (250/250), 164.34 KiB | 0 bytes/s, done.
Resolving deltas: 100% (121/121), done.
Checking connectivity... done.
fatal: reference is not a tree: 037e318716e37eba358424380659dd1cd6d0554e
Unable to checkout '037e318716e37eba358424380659dd1cd6d0554e' in submodule path 'deps/ctest'
CMake Error at gatewayFunctions.cmake:122 (message):
Error pulling submodules: 1
Call Stack (most recent call first):
dependencies-test.cmake:9 (findAndInstall)
CMakeLists.txt:207 (include)

-- Configuring incomplete, errors occurred!

Kindly tell me what am I doing wrong.
Thanks

openssl 1.0.2 not found

Hi team,

I'm trying to run the Node.js sample in Docker, but I'm getting this error:

/usr/src/app/node_modules/azure-iot-gateway-lin/bin/gw: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0: version 'OPENSSL_1.0.2' not found (required by /usr/src/app/node_modules/azure-iot-gateway-lin/bin/libaziotsharedutil.so) Gateway child process exited with code = 1

This is my Dockerfile:

FROM node:boron

RUN apt-get update
RUN apt-get -y install curl

# the setup_7.x specifies the version of node to be pulled from github
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash
RUN apt-get install nodejs

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install

# Bundle app source
COPY . /usr/src/app

ENTRYPOINT [ "node", "app.js", "local"]

Does anyone know how to solve this issue?

Thanks

No "start" in iothub_writer and what parmemeters for "Broker.publish()"?

In https://github.com/Azure-Samples/iot-edge-samples/blob/master/js/simple/README.md it says

"Each module (sensor/printer/iothub_writer) needs to implement callbacks for different events:
create - module is created
start - module starts
receive - receive message from broker
destroy - modules is destroyed"

Yet in iothub_writer has no start. When is start required?

Also, in sensor.js, we have the function "this.broker.publish" with a second parameter of 500. I assume this is 500 milliseconds, where can I find the object model for the Broker?

Unable to run java sample on windows

I am trying to run the java samples by carrying out the 4 steps described here:

https://github.com/Azure-Samples/iot-edge-samples#how-to-run-the-java-module-sample-windows-10ubuntu-14

but run into these errors when running the exec command. I am running windows 10 64-bit with JDK 8 (also 64-bit).

  1. timer sample:
mvn exec:exec
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.microsoft.gateway:gateway-sample >----------------
[INFO] Building gateway-sample 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @ gateway-sample ---
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\adapters\dynamic_library_windows.c Func:DynamicLibrary_LoadLibrary Line:17 Error Loading Library. Error code is:  126
Info: Path is C:\Program Files\azure_iot_gateway_sdk-1.0.0\lib\modules\java_module_host.dll
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\adapters\dynamic_library_windows.c Func:DynamicLibrary_LoadLibrary Line:17 Error Loading Library. Error code is:  126
Info: Path is C:\Program Files (x86)\azure_iot_gateway_sdk-1.0.0\lib\modules\java_module_host.dll
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\adapters\dynamic_library_windows.c Func:DynamicLibrary_LoadLibrary Line:17 Error Loading Library. Error code is:  126
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\module_loaders\java_loader.c Func:JavaModuleLoader_LoadBindingModule Line:75 The Java binding module could not be located.
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\module_loaders\java_loader.c Func:JavaModuleLoader_Load Line:120 JavaModuleLoader_LoadBindingModule returned NULL
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\gateway_internal.c Func:gateway_addmodule_internal Line:400 Failed to add module because the module could not be loaded.
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\gateway_createfromjson.c Func:Gateway_CreateFromJson Line:78 Failed to create gateway using lower level library.
Error: Time:Wed Jun 27 12:27:31 2018 File:C:\agent\_work\6\s\src\gw\src\main.c Func:main Line:50 An error occurred while creating the gateway.

The folder C:\Program Files (x86)\azure_iot_gateway_sdk-1.0.0\lib\modules does not exist: is there a maybe a step missing from the description?

  1. simulated_ble sample:
mvn exec:exec
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< com.microsoft.azure.gateway:ble-converter >--------------
[INFO] Building ble-converter 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:exec (default-cli) @ ble-converter ---
Error: Time:Wed Jun 27 12:28:06 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\adapters\dynamic_library_windows.c Func:DynamicLibrary_LoadLibrary Line:17 Error Loading Library. Error code is:  126
Error: Time:Wed Jun 27 12:28:06 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\module_loaders\dynamic_loader.c Func:DynamicModuleLoader_Load Line:72 DynamicLibrary_LoadLibrary() returned NULL for module simulated_device
Error: Time:Wed Jun 27 12:28:06 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\gateway_internal.c Func:gateway_addmodule_internal Line:400 Failed to add module because the module could not be loaded.
Error: Time:Wed Jun 27 12:28:06 2018 File:C:\agent\_work\6\s\azure-iot-gateway-sdk\core\src\gateway_createfromjson.c Func:Gateway_CreateFromJson Line:78 Failed to create gateway using lower level library.
Error: Time:Wed Jun 27 12:28:06 2018 File:C:\agent\_work\6\s\src\gw\src\main.c Func:main Line:50 An error occurred while creating the gateway.

Sample Failed on Ubuntu 14.04

Hi, I was trying out the nodejs sample on Ubuntu 14.04. However, I see the following error while running the application:

Error: Time:Wed May 10 06:56:12 2017 File:/home/vsciot/agent/_work/4/s/azure-iot-gateway-sdk/core/src/module_loaders/node_loader.c Func:NodeModuleLoader_Load Line:79 NodeModuleLoader_LoadBindingModule returned NULL
Error: Time:Wed May 10 06:56:12 2017 File:/home/vsciot/agent/_work/4/s/azure-iot-gateway-sdk/core/src/gateway_internal.c Func:gateway_addmodule_internal Line:400 Failed to add module because the module could not be loaded.
Error: Time:Wed May 10 06:56:12 2017 File:/home/vsciot/agent/_work/4/s/azure-iot-gateway-sdk/core/src/gateway_createfromjson.c Func:Gateway_CreateFromJson Line:78 Failed to create gateway using lower level library.
Error: Time:Wed May 10 06:56:12 2017 File:/home/vsciot/agent/_work/4/s/src/gw/src/main.c Func:main Line:50 An error occurred while creating the gateway.

Gateway child process exited with code = 1

Can anyone suggest what the issue might be ?

How to build the docker image for a java IoT Edge module?

Hello,

I create this issue to ask for help to build the docker image for a java IoT Edge module.
Firstly, I take the timer sample from this repository. The sample runs correctly on my windows laptop. Then, I build the project with the linux profile, mvn clean install -P linux_profile, to generate the linux executable and its dependencies, and create the docker image with them. However, it does not work and the error message reports, "./gw: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.2' not found (required by /app/libaziotsharedutil.so)". In this case, I use the base image, 'microsoft/dotnet:2.0-runtime-jessie', because it at least contains the necessary dependency, 'libssl.so.1.0.0'. Still, I feel like that it is not the correct base image.
Therefore, I would like to ask that, what would be the correct base image in this case? To be more general, how to build the docker image for a java IoT Edge module?

Best Regards,
x19chen

Issue installing IoT Edge samples (Javascript) on Windows and LInux

I am following: https://github.com/Azure-Samples/iot-edge-samples.

On windows I am getting:

`C:\Users\kevinsay\Desktop>mkdir gateway

C:\Users\kevinsay\Desktop>cd gateway

C:\Users\kevinsay\Desktop\gateway> git clone https://github.com/Azure-Samples/iot-edge-samples.git
Cloning into 'iot-edge-samples'...
remote: Counting objects: 590, done.
remote: Compressing objects: 100% (175/175), done.
Receiving objects: 91% (537/590) d 219 (delta 66), pack-reused 328
Receiving objects: 100% (590/590), 553.60 KiB | 0 bytes/s, done.
Resolving deltas: 100% (249/249), done.

C:\Users\kevinsay\Desktop\gateway>cd iot-edge-samples

C:\Users\kevinsay\Desktop\gateway\iot-edge-samples>npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\kevinsay\Desktop\gateway\iot-edge-samples\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\kevinsay\Desktop\gateway\iot-edge-samples\package.json'
npm WARN iot-edge-samples No description
npm WARN iot-edge-samples No repository field.
npm WARN iot-edge-samples No README data
npm WARN iot-edge-samples No license field.

up to date in 0.112s

C:\Users\kevinsay\Desktop\gateway\iot-edge-samples>npm run local
npm ERR! path C:\Users\kevinsay\Desktop\gateway\iot-edge-samples\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\kevinsay\Desktop\gateway\iot-edge-samples\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kevinsay\AppData\Roaming\npm-cache_logs\2017-06-28T20_11_27_777Z-debug.log

C:\Users\kevinsay\Desktop\gateway\iot-edge-samples>`

On Ubuntu I am getting:

`kevinsay@kevinsayUbunto:$ git clone https://github.com/Azure-Samples/iot-edge-samples.git
Cloning into 'iot-edge-samples'...
remote: Counting objects: 590, done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 590 (delta 103), reused 219 (delta 66), pack-reused 328
Receiving objects: 100% (590/590), 553.21 KiB | 0 bytes/s, done.
Resolving deltas: 100% (249/249), done.
Checking connectivity... done.
kevinsay@kevinsayUbunto:
$ cd iot-edge-samples/
kevinsay@kevinsayUbunto:/iot-edge-samples$ npm install
npm WARN enoent ENOENT: no such file or directory, open '/home/kevinsay/iot-edge-samples/package.json'
npm WARN iot-edge-samples No description
npm WARN iot-edge-samples No repository field.
npm WARN iot-edge-samples No README data
npm WARN iot-edge-samples No license field.
kevinsay@kevinsayUbunto:
/iot-edge-samples$ npm run local
npm ERR! Linux 4.4.0-81-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "local"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! path /home/kevinsay/iot-edge-samples/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/home/kevinsay/iot-edge-samples/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/home/kevinsay/iot-edge-samples/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /home/kevinsay/iot-edge-samples/npm-debug.log
kevinsay@kevinsayUbunto:~/iot-edge-samples$
Doc1.docx
`

What am I missing?

Unterminated quoted string" error running Node.js converter sample on Raspberry Pi 3.

Repo:

  1. Running on Raspbian:
$ uname -a
Linux edgepi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
  1. Updated node on the Raspberry Pi to latest (v8.2.1)
  2. Cloned the https://github.com/Azure-Samples/iot-edge-samples repo
  3. Changed into /js/converter folder
  4. ran npm install
  5. ran npm start

Get the following errors.

pi@edgepi:~/edgenode/iot-edge-samples/js/converter $ node --version
v8.2.1
pi@edgepi:~/edgenode/iot-edge-samples/js/converter $ npm start

> [email protected] start /home/pi/edgenode/iot-edge-samples/js/converter
> node app.js

/home/pi/edgenode/iot-edge-samples/js/converter/node_modules/azure-iot-gateway-lin/bin/gw: 23: /home/pi/edgenode/iot-edge-samples/js/converter/node_modules/azure-iot-gateway-lin/bin/gw: Syntax error: Unterminated quoted string
Gateway child process exited with code = 2

node-grovepi npm is not supported in node projects

in the project js/simple: After Adding the following line to the sensor.js file:
var grovepi = require('node-grovepi');

i'm getting the following error:
"pi@dex:~/dev/iot-samples/iot-edge-samples/js/simple $ node app.js local
ERROR: Error: /home/pi/dev/iot-samples/iot-edge-samples/js/simple/node_modules/i2c-bus/build/Release/i2c.node: undefined symbol: node_module_register
Error: Time:Sun Oct 15 07:22:23 2017 File:/vso/VSIoTGW/iot-edge/bindings/nodejs/src/nodejs.cpp Func:on_module_start Line:943 Expected registerModule to return 'true' but it returned 'false'Error: Time:Sun Oct 15 07:22:23 2017 File:/vso/VSIoTGW/iot-edge/bindings/nodejs/src/nodejs.cpp Func:NODEJS_Create Line:135 Node process failed to start

Error: Time:Sun Oct 15 07:22:23 2017 File:/vso/VSIoTGW/iot-edge/core/src/gateway_internal.c Func:gateway_addmodule_internal Line:446 Module_Create failed.
printer.destroy
Error: Time:Sun Oct 15 07:22:23 2017 File:/vso/VSIoTGW/iot-edge/core/src/gateway_createfromjson.c Func:Gateway_CreateFromJson Line:78 Failed to create gateway using lower level library.
Error: Time:Sun Oct 15 07:22:23 2017 File:/vso/VSIoTGW/src/gw/src/main.c Func:main Line:50 An error occurred while creating the gateway.

Gateway child process exited with code = 1;"

Simple Node.js sample on Raspbian fails to find libssl.so.1.0.0

I have completed the steps under the "How to run the JavaScript module sample (Windows 10/Ubuntu 14+/Debian/Raspbian)" Quickstart, when I try npm run local I get the following error regarding libssl.so.1.0.0:

pi@raspberrypi:~/iot-edge-samples/js/simple $ npm run local

> [email protected] local /home/pi/iot-edge-samples/js/simple
> node app.js local

/home/pi/iot-edge-samples/js/simple/node_modules/azure-iot-gateway-raspbian/bin/gw: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
Gateway child process exited with code = 127

Any advice on how to resolve the issue?

.Net Core Managed Gateway on Raspberry Pi

As per the issue here

I have created a .Net Core Console application with a manged Gateway inside it, using this nuget

I use Microsoft.Azure.Devices.Gateway.GatewayInterop to create the gateway, this works fine on a Windows machine but when i build and publish it for linux-arm and deploy it on Raspberry Pi it gives me following error[please note all the other .net core code works fine]:
image
The code looks like below:
image
PublishOutput.zip is the zip file containing all the files in the Published output.

Can you advise on what is that i'm doing wrong?

Thank you,
Ali

Running into a issue while running iot-edge-samples for JS.

I get the following error when I try to run the samples for JS after following the steps mentioned in the README -

[email protected] cloud C:\Users\hrishikesh\Desktop\Azure IOT edge trials\iot-edge-samples\js
node app.js cloud

Error: Time:Wed Jun 28 18:37:32 2017 File:C:\agent_work\2\s\iot-edge\core\adapters\dynamic_library_windows.c Func:DynamicLibrary_LoadLibrary Line:17 Error Loading Library. Error code is: 126
Error: Time:Wed Jun 28 18:37:32 2017 File:C:\agent_work\2\s\iot-edge\core\src\module_loaders\node_loader.c Func:NodeModuleLoader_Load Line:79 NodeModuleLoader_LoadBindingModule returned NULL
Error: Time:Wed Jun 28 18:37:32 2017 File:C:\agent_work\2\s\iot-edge\core\src\gateway_internal.c Func:gateway_addmodule_internal Line:400 Failed to add module because the module could not be loaded.
Error: Time:Wed Jun 28 18:37:32 2017 File:C:\agent_work\2\s\iot-edge\core\src\gateway_createfromjson.c Func:Gateway_CreateFromJson Line:78 Failed to create gateway using lower level library.
Error: Time:Wed Jun 28 18:37:32 2017 File:C:\agent_work\2\s\src\gw\src\main.c Func:main Line:50 An error occurred while creating the gateway.

Gateway child process exited with code = 1

python samples

Is there any python samples we could use to integrate with IoT edge?

Examples that work on Mac?

Are there plans for iot-edge-samples that operate on Macs?
Many developers today work from Macs. Even those who develop Microsoft software.
Should this repo work on a Mac within VMware Fusion? Vagrant? Docker?
When I run mvn package within java on my Mac I am getting errors.

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.artifactId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.name}' does not match a valid id pattern. @ line 26, column 19
[ERROR] 'dependencies.dependency.groupId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.group}' does not match a valid id pattern. @ line 25, column 16
[ERROR] 'dependencies.dependency.version' for ${dependency.runtime.group}:${dependency.runtime.name}:jar must be a valid version but is '${dependency.runtime.version}'. @ com.microsoft.azure.gateway:gateway-module-base:1.0.1, /Users/mac/.m2/repository/com/microsoft/azure/gateway/gateway-module-base/1.0.1/gateway-module-base-1.0.1.pom, line 49, column 18
[ERROR] 'dependencyManagement.dependencies.dependency.artifactId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.name}' does not match a valid id pattern. @ com.microsoft.azure.gateway:gateway-module-base:1.0.1, /Users/mac/.m2/repository/com/microsoft/azure/gateway/gateway-module-base/1.0.1/gateway-module-base-1.0.1.pom, line 48, column 21
[ERROR] 'dependencyManagement.dependencies.dependency.groupId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.group}' does not match a valid id pattern. @ com.microsoft.azure.gateway:gateway-module-base:1.0.1, /Users/mac/.m2/repository/com/microsoft/azure/gateway/gateway-module-base/1.0.1/gateway-module-base-1.0.1.pom, line 47, column 18
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.microsoft.gateway:gateway-sample:1.0 (/Users/mac/Azure/iot-edge-samples/java/pom.xml) has 5 errors
[ERROR]     'dependencies.dependency.artifactId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.name}' does not match a valid id pattern. @ line 26, column 19
[ERROR]     'dependencies.dependency.groupId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.group}' does not match a valid id pattern. @ line 25, column 16
[ERROR]     'dependencies.dependency.version' for ${dependency.runtime.group}:${dependency.runtime.name}:jar must be a valid version but is '${dependency.runtime.version}'. @ com.microsoft.azure.gateway:gateway-module-base:1.0.1, /Users/mac/.m2/repository/com/microsoft/azure/gateway/gateway-module-base/1.0.1/gateway-module-base-1.0.1.pom, line 49, column 18
[ERROR]     'dependencyManagement.dependencies.dependency.artifactId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.name}' does not match a valid id pattern. @ com.microsoft.azure.gateway:gateway-module-base:1.0.1, /Users/mac/.m2/repository/com/microsoft/azure/gateway/gateway-module-base/1.0.1/gateway-module-base-1.0.1.pom, line 48, column 21
[ERROR]     'dependencyManagement.dependencies.dependency.groupId' for ${dependency.runtime.group}:${dependency.runtime.name}:jar with value '${dependency.runtime.group}' does not match a valid id pattern. @ com.microsoft.azure.gateway:gateway-module-base:1.0.1, /Users/mac/.m2/repository/com/microsoft/azure/gateway/gateway-module-base/1.0.1/gateway-module-base-1.0.1.pom, line 47, column 18
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

BTW, I'm running with name of Darwin macs-MacBook-Pro-4.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
sw_vers = ProductName: Mac OS X, ProductVersion: 10.12.5, BuildVersion: 16F73

Microsoft.Azure.Devices.Gateway.Native nuget package for any Linux?

This is moved from Azure/iot-edge-v1#258 because I was taught that the NuGet package issues should be open here by IoT Edge team.

As far as I know, there are no reason to limit native IoT Edge modules (.so) for Ubuntu 16.04, but Microsoft.Azure.Devices.Gateway.Native.Ubuntu.x64 currently only supports Ubuntu as its name suggests. I think it is better to support any Linux distros.

So, I have three questions about it:

  1. Is there any problem to use above .so in other distros such as debian 8 or centos 7 in x64 architecture?
  2. Is there any plan to support other distros? I think it is better to support broader distros unless there are any technical problems. As far as I tried locally, changing folder name in nupkg from runtimes/ubuntu.16.04-x64 to runtimes/linux-x64 looks fine to support other distros including debian, open SUSE, centos, etc.
  3. Is there any plan to distribute .so for ARM linux when the .net core 2.0 released?

Thanks!

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.