As part of the tutorials, I first did Azure iot edge deployment on Linux, it is working fine.
But, after this, I deployed tempSensor filter module with python from Visual Studio code, PythonModule is deployed but the D2C messages are still old and there is no filtering happening.
I see the old image for tempSensor keeps poping up showing up old created date on EdgeVM.
I did these below to remove old image, but still it it the same.
In Iothub, I removed module through set modules page
I removed (using purge) the entire iotedge runtime and re-installed
it
Removed container and image from docker with no luck
I want the old image to be removed and when I deploy from Visual studio code, the new filtered messages should be appearing
I did these below to remove old image, but with no luck.
With what you have tried, remove module from azure portal or remove local resources using purge. You need show steps you did or error message or what you see that are not expected, so we can do further investigation.
About how to troubleshoot and get log information you can reference "Common issues and resolutions for Azure IoT Edge".
Here I will show information about how to delete module from azure portal and from local command line. You can compare with what you have done and have a try again. If still not working, feel free post error message etc here.
Delete module from azure portal:
Click on device
Click on Set Modules button
Check checkbox next to module
Click Delete Button
Click Next
Click Next Again
Click Submit
You will then see Pending removal
If your Edge runtime is running on a device, then the module will be removed
Delete from local:
If you want to remove the IoT Edge runtime and related resources from your device, use the following commands.
Remove the IoT Edge runtime.
sudo apt-get remove --purge iotedge
When the IoT Edge runtime is removed, the containers that it created are stopped, but still exist on your device. View all containers.
sudo docker ps -a
Delete the runtime containers that were created on your device.
docker rm -f edgeHub
docker rm -f edgeAgent
Delete any additional containers that were listed in the docker ps output by referring to the container names.
Remove the container runtime.
sudo apt-get remove --purge moby
Add new module to previous deployment:
If you have edgeAgent, edgeHub and tempSensor modules running. When you want to add a new module like temp sensor filter module you have tried, you can create and build the new module via VS Code and select the edge device and select Create Deployment for IoT Edge device. To view the edge device in VS Code you need install Azure IoT Edge extension for Visual Studio Code and then sign in azure. More information and steps you can reference "deploy and monitor modules from within Visual Studio Code".
View modules on your device from VS Code:
Once you've deployed modules to your device, you can view all of them in the Azure IoT Hub Devices section. Select the arrow next to your IoT Edge device to expand it. All the currently running modules are displayed.
If you recently deployed new modules to a device, hover over the Azure IoT Hub Devices section header and select the refresh icon to update the view.
Related
Runing the Build and Run Iot Edge Solution in Simulator stopped working suddenly, and the log builds the containers and stops at this message Network azure-iot-edge-dev is external, skipping Everything was working fine 5mins ago, tried rebooting, restarting docker, iotedgehubdev, but in vain. Do you know how can I get more logs and/or resolve this problem ?
This is a generic error that is thrown for a variety of reasons.
Possible causes can be:
Proxy blocking pulling images of edgeHub and edgeAgent
A problem in the deployment.template.json (or debug template), e.g. missing brackets
Ports of edgeHub that are in use
Docker configured for Windows containers when targeting Linux or visa-versa
The Build output or IoT hub output in Visual Studio usually gives a bit more information.
Do you know how can I get more logs and/or resolve this problem ?
Are you trying to debug/simulate it locally on windows 10 machine?
When you need to gather logs from an IoT Edge device, the most convenient way is to use the support-bundle command. By default, this command collects module, IoT Edge security manager and container engine logs, iotedge check JSON output, and other useful debug information. It compresses them into a single file for easy sharing. The support-bundle command is available in release 1.0.9 and later.
Run the support-bundle command with the --since flag to specify how long from the past you want to get logs. For example 6h will get logs since the last six hours, 6d since the last six days, 6m since the last six minutes and so on. Include the --help flag to see a complete list of options.
sudo iotedge support-bundle --since 6h
By default, the support-bundle command creates a zip file called support_bundle.zip in the directory where the command is called. Use the flag --output to specify a different path or file name for the output.
Incase if you are looking to debug the modules locally on VS2019, VS Code below documentations will be useful.
Use Visual Studio 2019 to develop and debug modules for Azure IoT Edge and
Use Visual Studio Code to develop and debug modules for Azure IoT Edge
Please share the complete logs if the above doesn't help.
I have this issue when trying to start a project from within Visual Studio when it's not running in administrator mode. I always forget and end up with this error. Same goes for if I run "iotedgehubdev.exe setup" from a command prompt. It only works when the command prompt is running in administrator mode.
Ok so I want to get a virtual machine with Windows so I can download applications only on Windows (Not on OSX (I'm on Big Sur 11.2.3 by the way)), so I downloaded VirtualBox, then downloaded the Windows thing which apparently I have to (as seen in one of the pics) (you can tell I have hardly any experience with vms), then I created a new vm in the VirtualBox app, and left all the default settings except for the type of hard drive (which is also in one of the pictures), then I clicked Start and it asked me to add a 'virtual optical disk file', so I clicked on the folder button then clicked add in the top left, and it gave me this error code:
Failed to open a session for the virtual machine w10.
The VM session was aborted.
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: SessionMachine
Interface: ISession {c0447716-ff5a-4795-b57a-ecd5fffa18a4}
as you can also see in one of the pictures below. Also, when I leave the screen for a couple of minutes right before I click on the previously mentioned add button, this appears:
but I tried just leaving it to load, and nothing happened. I have tried uninstalling using the uninstall tool twice, rebooting my Mac, etc etc, and yes I have allowed everything I need to in the Security settings. I'm not installing it on a moderator account, but the Windows 10 virtual optical disk file is in Documents which the account I'm on has read and write access to, and obviously the actual VM is in applications.
Thanks so much!
Here's the previously mentioned image of the one changed setting:
And here's the pic of the Win10 64-bit I had to install:
thanks everyone!
VirtualBox Version: 6.1.22 r144080 (Qt5.6.3)
Host Operating System: MacOS BigSur
I came across exactly same issue, where clicking on add to choose image was crashing the dialog. This issue persists in the latest version of Virtual Box for Mac.
I could figure out couple of ways to avoid clicking on Add button to choose image.
First Option:
Steps:
Click on Settings to open settings window for your VM.
Choose Storage
Select Empty disc and choose Disk image by clicking small disc icon in the Attributes section. Please follow the image to have visual instructions.
Second Option:
Steps:
Click on VM's Normal start
Once you get the option to choose image, simply cancel the dialog.
Now click on the small disc icon in the bottom of VM's dialog to choose the image.
Hope this helps. Feel free to comment if you find this post useful.
I had the same message because of permissions at directories where the hard disks were stored in. So, just execute VirtualBox 'As Administrator' and all run well.
I was getting the same error on Ubuntu 22.04 machine while trying to start an existing or a new VM-
Failed to open a session for the virtual machine NuacareRocky.
The VM session was aborted.
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: SessionMachine
Interface: ISession {c0447716-ff5a-4795-b57a-ecd5fffa18a4}
I tried a few things as suggested on youtube, but nothing worked. finally, I just upgraded the extension and it worked.
I am trying to create an Azure IoT Edge device on a Windows host, but running a module built as a Linux container. In a previous experiment, I was able to successfully create an Azure IoT Edge device on a Linux host, and successfully running this same Linux container module.
However, when I deploy the module onto the Windows host, the module shows that it is not running, and when I view the module's log using "iotedge logs camera-capture" I get the following error:
<6> 2019-12-02 13:32:56.016 -08:00 [INF] - Executing command: "Create module camera-capture"
<3> 2019-12-02 13:33:11.674 -08:00 [ERR] - Executing command for operation ["create"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling Create module camera-capture: Could not create module camera-capture
caused by: Could not pull image localhost:5000/camera-capture-opencv:1.1.128-amd64
caused by: image operating system "linux" cannot be used on this platform, StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2019_01_30.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in C:\agent\_work\4\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Edgelet\version_2019_01_30\ModuleManagementHttpClient.cs:line 194
I have found no results online, or through Microsoft forums, regarding this particular error that was able to resolve my problem. For the record, I have ensured:
I am running a compatible Windows 10 host (17763)
I have Hyper-V and Containers installed
I have VT enabled in the BIOS
I have configured my deployment.template.json to build as "amd64" platform
I have configured my Docker Desktop to run using Linux Containers (and also enabled Experimental mode)
I have tested the basic "hello-world" ubuntu example online, and it works when I run it from Powershell, which proves that a Linux container will run on my Windows host
Any help would be greatly appreciated!
After spending a few days stuck on this issue, I finally found the solution. The problem was with the IoT Edge runtimes on Windows were not configured to handle Linux containers!
As of this writing, the solution is documented here by Microsoft: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-windows-with-linux
But in case of a future dead link, you basically have to add additional flags when you install your Azure IoT Edge runtimes to handle linux containers.
. {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Deploy-IoTEdge -ContainerOs Linux
. {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Initialize-IoTEdge -ContainerOs Linux
I changed Docker Desktop to Linux container mode and compiled in VSCode. It worked like magic.
I am using PhantomJS on Windows and would like to know if it is possible to install this program on Qnap ts-231?
Someone has already done? Thank you
You can use the QNAP app: "container-station" (=Docker) to install "phantomJS" on your TS-231.
As already has been suggested you can use the QNAP container-station app.
The container station is a lightweight tool that will allow you to use Docker to spin up instances of lightweight Linux Operation Systems and other App virtualizations. Have a good read of of the container-station documentation for a better understanding.
To install an instance of phantomJS via the container-station app, just open up the container-station application by clicking on the icon on the main dashboard.
Once Container Station has opened up you will be opened up to the Container Station Overview page. On the left hand side you will have a menu.
From this menu select the <create> option.
In the main search box at the top of the new window enter phantomJS
If any dockerized applications are found the results will appear here. All you need to do is look for an instance that suits your needs and click on the <install> on the right hand side for the instance that you want.
Once you click on <install> you will need to choice the version that you want, I'd suggest just choosing the latest.
You will then need to fill in the Create Container window. You can allocate the max CPU and max Memory here, and if you want to the volumes paths to local folders instead of folders within the container this can be done here as well. Once you have filled everything in that you want to fill in, you can click <Create> and this will start downloading and installing your new Container for PhantomJS.
This is pretty much the same for almost every other Docker app that can be installed via the Container-Station app.
Please note that you may have additional setup for the application you are installing.
You can install a Docker Container through Container Station or a VM through Virtualization Station with phantomJS.
I've installed a VM with firefox, geckodriver and PhantomJS to develop some scrappers in Python.
I have installed the MobileFirst Platform CLI developer edition from https://developer.ibm.com/mobilefirstplatform/install/#clui
I am trying to investigate the analytics of the application, but this doesn't seem to be properly installed from here.
I am able to create a MFP server, start it and access the console. It doesn't have a link to the analytics in the top-right of the console as it does in the developer edition provided by Eclipse. Is this behaviour as expected or is there something missing?
I have tried installing this package twice. I am running on OSX 10.10
In the Liberty servers directory, /Users//.ibm/mobilefirst/6.3.0/server/wlp/usr/servers, I can see the Worklight folder. It has an _analytics.war file in it (which is different from my Eclipse install which has a worklight-analytics.war and worklight-analytics-service.war)
And in the messages.log file, I am getting messages saying that the web application _analytics is available.
But I then a number of messages with
com.worklight.analytics.api.AnalyticsHttpService.sendDataToURL target server response code: 404
Going directly to http://localhost:10080/_analytics responds with an "Authorization failed" message.
Update - Got it working
I uninstalled the dev edition CLI and downloaded the CLI from Passport Advantage and installed it from there. The analytics feature now seems to work. Although the link to it is still not available in the top right of the console.
I don't know if it's a different install package, or an issue on my Mac that I inadvertently resolved, but the analytics feature is now working
The issue here was that the version you originally downloaded was not up-to-date.
This will be corrected soon.
Proper mechanisms will be put in place so that this will not happen again.
Yesterday I downloaded and installed the publically available MobileFirst Platform 6.3 CLI from https://developer.ibm.com/mobilefirstplatform/install/#clui. I created a simple app which connects to the MFP server.
Result: Analytics works without any problem.
So you do not have to buy the product just to use the CLI with analytics.