Stuck in Network azure-iot-edge-dev is external, skipping - azure-iot-hub

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.

Related

lb4 command is not found in Windows 10

I have install loopback 4 framework in my system by this command npm i -g #loopback/cli. But after installation by terminal I, can't create loopback application because it showing lb4 command not found. I also search through web and do many changes in environment variables but got same problem. I have executed this command with different terminal and same problem is getting.
I have attachments which will help you to understand the problem
I am running this command on command prompt in windows 10 system
This can occur for several reasons; Typically, it's caused by a misconfigured PATH variable or a stale "cache" of the terminal. A quick solution is to use npx #loopback/cli instead.

ADF pipelines not able to run on self hosted integration runtime

We have Azure Data Factory V2 pipeline, consuming data from on-prem SQL Server, Pipelines was running perfectly fine until 2 weeks. 2 weeks back it started running very slow (15min vs 2h:15min).
So today we tried to restart the machine which installed IR. After that pipeline started giving an error:
Unable to load DLL 'jvm.dll': The specified module could not be found.
We have verify everything mentioned in post.
Then we have reinstalled the Integration Runtime on the machine and now pipelines keep running without transferring data. All the pipelines lies in the queue. There is no activity we can see on IR Monitor. Pipelines are not sending any request to IR.
Sharing the answer as per the comment by the original poster:
Able to resolve the issue by reinstalling JRE and integration runtime.
Try a clean install. Uninstall the IR and the JRE, then install JRE, then IR.

Azure Iot edge tempSensor module displaying old data

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.

Apache Tomcat 8.5 . Error: Service terminated with service specific error incorrect function

i have installed apache tomcat 8.5 one month ago with java 1.8 on Windows Server 2008 and it works ok.
now the service is stopped and i'm not able to restart it from apache configuration or Windows Services . It is always stopped.
i got the following error: "service terminated with service specific error incorrect function".
ther error in Windows Event viewer does not saying nothing more:
even its details tab:
What can i do?
I was trying to install Apache Tomcat/8.5.31 as Windows service and i was also facing the same error.
For me what finally worked was following these steps. Go to Tomcat installation directory's bin folder. You will see two EXEs (tomcat8.exe and tomcat8w.exe). tomcat8w.exe is a GUI application for monitoring and configuring Tomcat services. Double-click it and then go to Java tab
1) Enable the check box for Use default
2) In Java Classpath: section, specify the path to bootstrap.jar and tomcat-juli.jar. These should be present in your tomcat installation's bin directory itself:
<path_to_tomcat_installation>\bin\bootstrap.jar;<path_to_tomcat_installation>\bin\tomcat-juli.jar
To get more help, you may check the log at the following location provided you installed your Tomcat as Windows service using default LogPath option as described in the documentation: %SystemRoot%\System32\LogFiles\Apache
UPDATE: In another recent installation, i noticed that despite having configuration settings exactly similar to another working setup, i was still getting Incorrect function error under System log in Event Viewer. This time, i had to uncheck the Use default option and had to explicitly provide path to jvm.dll as shown below:
Java Classpath setting was still required as explained above.
Currently I have a Windows Server 2012 R2 Datacenter running Tomcat 9 & had the same problem. This happened after I ran Windows updates & restarted the Server.
Error messages below. (The blanked out text is my private data.)
Error showed when attempting to start the service.
Error in System Event Log
The following steps fixed the issue...
Navigate to your tomcat9w.exe Location: \Tomcat9\bin\
Right click your tomcat9w.exe and select Run as administrator.
Select the Java tab. Select Use default, Apply, & OK
Start your service.
Note: I unchecked the "Use default" box after I was able to get the service running correctly. Because I wanted to retain my existing configuration. Going forward the service has continued to work correctly.
Hope this helps!
I was also facing some issue with Tomcat 9 and Java 13 (tried all previously mentioned solutions but nothing worked). When I downgraded it to Java 11 and Pointed the jvm.dll from JDK 11 my issue got fixed (or Use Default if JAVA_HOME is set to Java 11).
In my case the only way I could get it to work, was to go to the "Startup" tab and change "Mode" from "JVM" to "Java". After that, it started fine and was able to confirm that by visiting the localhost.
(Definitely not an expert)
I fixed this issue by (re)installing Java. I was using the Java SDK downloaded by IntelliJ. Although I was able to direct Tomcat to that download during installation, it returned this "error service terminated" message at runtime. Instead I installed Java SDK directly from Oracle, Tomcat found the installation immediately during installation (I didn't need to point it), and this error disappeared.
It's possible the Java installation by IntelliJ was incomplete somehow and is the underlying cause of the problem, but I am definitely not an expert.
I fixed the issue by reinstalling Tomcat:
Search the Command Prompt icon
Right-click on it
Select Run as administrator
Change the folder to the bin folder of Tomcat
Execute appserver uninstall
Execute appserver install
It solved my problem.
I followed the below steps to fix the the above issue. it may help if someone still face the same.
Step 1. opened the installation directory : tomcat9w.exe Location: \Tomcat9\bin\
Step 2. Browsed the Jvm.dll path under "Java Tab" in Tomcat where it has installed
Step 3. Run the service but still faced same.
Step 4. then, Opened ""C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\bin>startup.bat --> entered.
Finally it got fixed .

Timeout when running xcodebuild tests under Xcode 6 via SSH

I seem to be having issues with integrating Xcode6 with jenkins, I currently have this setup and working with Xcode 5.
With xcode 6 running remotely via SSH the simulator time-out, when I run locally it succeeds.
Command
xcodebuild -workspace PROJECTNAME.xcworkspace -scheme BGO_Tests -destination 'platform=iOS Simulator,name=iPhone 5s' -derivedDataPath ./Build clean test
2014-08-19 10:46:36.591 xcodebuild[33966:381f] iPhoneSimulator: Timed out waiting 120 seconds for >simulator to boot, current state is 1.
Testing failed:
Test target BGO_Tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1
Tested with recent Xcode 6 beta 6
Note: the device names changed in Xcode 7, so you no longer specify them using iPhone 5 (9.1 Simulator) but rather iPhone 5 (9.1).
Use xcrun instruments -s to get the current list of devices and then you can pre-launch it using:
xcrun instruments -w "iPhone 5 (9.1)" || echo "(Pre)Launched the simulator."
Prelaunching
I got to a point where what I proposed down there wasn't working anymore. In addition to making the changes mentioned here, you need to launch the simulator xcodebuild is expecting BEFORE xcodebuild is ran:
# First get the UDID you need
xcrun instruments -s
# Then launch it
open -a "iOS Simulator" --args -CurrentDeviceUDID <sim device UDID>
# and wait some time....
sleep 5
# Then launch your unit tests
xcodebuild [...] -destination 'platform=iOS Simulator,name=<device name matching the UDID>'
Old post
This bug is fixed in Xcode 6.3 and above. If you are experiencing similar problems in newer Xcode, it's likely another bug.
Apple follow up regarding Bug ID# 18001199:
The context provided by LaunchDaemons is not supported for running GUI
applications. The SSH service, and the default setup for Jenkins, are
both implemented as LaunchDaemons. In earlier versions of Xcode 5
xcodebuild could run tests on the iOS simulator in this context, but
that was never a supported configuration, and as you have noted that
is no longer working as of Xcode 6.
Unlike LaunchDaemons, LaunchAgents provide a context where you can run
GUI applications - if the user is logged in at the time, with a window
server / Aqua session. Converting your Jenkins configuration from
being a LaunchDaemon to being a LaunchAgent would avoid the reported
issue. You can also use launchd for running tests on the iOS simulator
from a SSH session, either by crafting a LaunchAgent and manually
loading / starting that, or by using "launchctl submit”.
Ok, after some more digging around the comments around here (many thanks to Opal), I found out that launching the slave via JNLP instead works.
As many people mentioned, it is not currently possible to run the unit test over SSH, so you might want to turn towards the JNLP agent for now until Apple fixes it.
If connecting with JNLP still does not solve it, try the solution mentioned in this comment.
i.e.: Run these on command line:
DevToolsSecurity -enable
sudo dscl . -append /Groups/_developer GroupMembership "user-that-runs-the-sim"
security authorizationdb write system.privilege.taskport is-developer
See References here and here.
I've recently found out that if you install a new version of Xcode and do not launch it. The simulator might start timing out again. To solve this, I've had to manually launch Xcode, and install the additional tools it requested.
I ended up solving this on Xcode 5 by doing the steps here, essentially running:
sudo security authorizationdb write system.privilege.taskport allow
This will eliminate one class of these authentication popups. You’ll also need to run:
sudo DevToolsSecurity -enable
However, once I upgraded to Xcode 6, I now get an infinite hang when trying to run xcodebuild tests over SSH. They continue to run just fine as long as I'm logged into the console, and running them from the keyboard.
I ran into the same issue. My working theory is that SSH on OSX is started as a LaunchDaemon, and LaunchDaemons are not allowed to present a UI; Reference.
I was able to work around the issue by using Java Web Start to launch the Jenkins slave. I then installed the Jenkins slave as a launchd service.
Unfortunately the Jenkins slave then installs itself as a -you've guessed it- LaunchDaemon, leading to the exact same problem of not being able to launch the tests; Reference.
I worked around that issue by moving the Jenkins Slave LaunchDaemon plist and jar files in /System/Library/LaunchDaemons into ~/Library/LaunchAgents, and updated the paths inside the plist file.
That finally allowed me to run XCode6 (Beta6) tests on an OSX jenkins slave.
I finally managed to find a good simple solution. JNLP was causing numerous issues with our jenkins server.
Workaround for SSH timeout via https://corner.squareup.com/2015/07/ios-build-infrastructure.html
"Mavericks (10.9) and Yosemite (10.10) determine if a process can access accessibility hooks via the parentage of the accessing process. By putting launchd in the list of allowed processes, processes launched via SSH or Jenkins have access to the accessibility hooks across the system. To do this you can modify the TCC database, per this gist. A reboot is required to make the change take effect."
#!/bin/bash
# This will add lauchd to the list of allowed processes for accessibility access
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','/sbin/launchd',1,1,1,NULL)"
# This outputs the rows in the TCC database
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access'
echo "Restart is required for these changes to take effect"
Update 8/02/2016
This is now fixed in Xcode 7.2.1 ("Command line tool ‘xcodebuild test’ will no longer time out waiting for Simulator.app to launch")
I've seen this error before, one possibility is that since you probably downloaded the Xcode6 Beta from the internet (not the appstore as its not available yet), the machine you are trying to run it on will show a pop up asking you if you really want to open this app as its from the internet.
The same will happen when xcodebuild tries to launch the iPhone simulator app.
One thing you might want to try is to share screen with the machine and click "Open" in that pop up.
If that still doesn't work, I would try to:
Reset the Content & Settings of the simulator
Reboot the machine and make sure no simulator is running on start up (you can just choose not to re-open any app when restarting)