Azure Sphere logging - azure-sphere

For Sphere devices, we can vscode/cli to deploy, debug and see logs of the application [1]. But later (say I kept it running for 24 hours and comes back), if I wish to see application logs, it looks like, I don't have a way. Is there a way to see application logs on Sphere development boards without initiating the debugger?
To be clear, this is not about monitoring applications deployed in production [2]. This is only about development logs on Azure Sphere development boards. An example is logcat in Android [3]. The intention is to analyse long running application on Azure Sphere. We cannot keep the debugger attached forever.

This is a late response and you've probably figured it out by now but if your Azure Sphere device is connected to a network, you can send debug logs over a UDP socket without the need for the device to be attached to the Visual Studio debugger or even a PC.
Here's an example application that modifies the Log_Debug library to send the output over UDP to a receiver application that writes the output to a "deviceLog.txt" file.

Related

Azure IoT Edge Module Twin Settings Set to Empty

I have a number of devices deployed with edge modules running on them. I created a deployment in Azure Portal that targets all devices which sets the environment variables and docker settings. The deployment does not set the twin settings.
I then went into the Azure portal, clicked on the individual devices, clicked "Set modules" and set specific twin module settings for each device.
The problem now is after a period of time some of the devices are receiving an transient network error to Azure Hub which causes them to reload the module twin configuration, however some of the devices load a totally empty twin config, It will continue to periodic auto refresh twin settings with the empty twin settings. If i restart the iotedge service it refreshes the twins and will pull down the correct twin config again and continue to run as expected for a period.
This is a major issue because the modules are basically hung until I log in and manually restart the iotedge service.
Is this the correct way to configure edge modules? or am I missing something?
Thanks
After reading the following post it appears we did not properly implement a handler for twin patches. I think the edge runtime calling the twin update hook with no properties after a connection interruption is a bug however we were able to write logic to handle it based on the examples provided in the post.
https://github.com/Azure/iotedge/issues/1654#issuecomment-551258642

Why does my virtual machine stop conducting blueprism automated processes when I minimize or close it?

I automate processes on a remote computer. When I start a process from the control room, that works totally fine. But as soon as I minimize or close the remote computer (I don't shut it down, I just close the window), the remote computer crashes. The log contains entries like that elements cannot be found. The reason is, that the remote computer does not even open the applications.
So, what's the reason for that? The computers state is on desktop, so there is no screensaver or logon screen.
Expected result: The robot should work finely even when the remote desktop session is not on screen, like in production environment.
You haven't specified, but the below answer extrapolates your statements regarding how you've "[minimized] or [closed]" your "remote computer" to assume you're leveraging Microsoft's Remote Desktop Connection utility/protocol.
Blue Prism specifically discourages the use of Remote Desktop to manipulate remote Runtime Resources within a Blue Prism-based environment, as the use of the protocol itself causes the methodologies Blue Prism uses to locate elements in the Windows desktop environment to stop working entirely. This is explicitly spelled out in Blue Prism's official documentation on Remote Access Tools:
The following tools have been deemed to be specifically unsuitable for
providing remote access to Blue Prism environments:
Remote Desktop Connection (RDP)
The way that this Windows tool (and other tools that
use the RDP protocol) handle session management is not compatible with
Blue Prism:
The underlying operating system is aware as a connection is established which can, subject to the automation techniques being
applied, result in the executing automation being interupted.
It requires the remote access credentials to be aligned with the credentials used to authenticate the target system against the network
which presents a potential security risk.
As a user authenticates any previously connected users are locked out.
Each connection creates a separate desktop session.
The connection is not maintained throughout a system reboot.

IBM Worklight - push notifications from standalone server take longer to arrive compared to development server

I'm using Worklight 6.1 on Liberty profile 8.5.5 in Windows XP in a VMWare in a Mac.
I have an Android app that receives notifications. I'm using an adapter to send the notifications.
It is my own app but the adapter is the same as in the push notifications sample project provided by IBM.
For sending the notification I'm directly calling the adapter from a browser using the REST call (protocol://server:port/app/[dev/]invoke?adapter=myAdapter&procedure...)
When I execute the application in the development server the notifications arrives almost immediately, but when I test the application in the test server (mentioned above) the notifications takes a lot of time to arrive, if they arrive.
However, when the notification does arrive, the next notifications arrives in seconds.
It is something I have experienced in the past also with previous Worklight versions.
I do not know what is the difference between the servers or if the problem is related to the server.
Any hints for debugging this?
I have enabled the trace:
<logging traceSpecification="*=audit=enabled:com.worklight.integration.notification.*=finest=enabled" />
I can see the trace:
com.worklight.integration.notification.gcm.GCMSender 1 sendNoRetry Sending JSON to GCM server: {"collapse_key":"myPush","data":{"alert":"Hay una nueva ficha","payload":"{\n \"alias\": \"myPush\",\n \"identificador\": \"a035\",\n \"nombre\": \"aName35\"\n}","badge":"1"},"registration_ids":["APA91bG03cXkyVM6pA2-CO1g-tZUQL6FwJgugaa68YngIyGbbR_oDzVNn-1RULpoktvMUKwF3D1qK4bx-4OVeAbUzBqNpqO3m_1hwz0Z6I0B_DS_Jvc0wzI_fjKpJ9vqPNO58Bdt40ms"]} [project DemoM]
But I do not know if that trace means that everything has gone ok and the message is now in the GCM servers.
I have also enabled sniffers (WireShark in Mac and SmartSniff in XP) in dev server and stand alone server but I have not been able to detect any pattern. Everything is under https so I only see some traces for google hosts but I can not take any conclusions. Although it is valid to see a trace for google gcm immediately after the server trace that takes less than 500ms
Anyway now it is taking time to the notification to arrive in both servers so I guess everything is working fine in the worklight side.

Can't remote debug onto Surface (Win RT) Tablet from VS2012-Express - "Unable to resolve the specified computer name"

I am developing windows store apps for the surface tablet.
I am remote debugging onto a surface tablet via the local network. At first I had no issues with this, and then occasionally about one out of every four times it would fail to deploy, and I would get the message:
Error: Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'my_debugging_tablet'. The debugger cannot connect to the remote computer. The debugger was unable to resolve the specified computer name.
Initially when this happened, I would simply deploy the project again and the error would not occur again, or, occasionally, I would close and then re-open the Remote Debugging Monitor on the tablet, but generally this would happen seemingly randomly and not re-occur.
However, lately, it has been happening more and more often (with no changes to my code) and now I have been unable to deploy at all, ever, for a couple of days now (and thus I cannot debug on my tablet.)
The same error message listed above is what displays every time I try to deploy or debug.
I verified in project properties that the target device and remote machine name were set correctly, and each time verified that the connection on both the surface tablet and my host computer were fine (my host machine is Windows 8 on Oracle Virtualbox.)
From project properties, if I attempt to manually "Find" the target device (as it does when you deploy back when this used to work) it is unable to locate my tablet (or anything) on my local network. ("Found 0 connections on my subnet")
My MS developer license registration is up to date as well. Additionally, there doesn't seem to be an issue the local network, as both my host machine and the tablet can "see" other things on the network (printers, etc.)
I can't for the life of me figure this out, because, as I mentioned, there have not been any changes to anything such as developer license registration, network status, code, or anything else that should have affected this.
I originally read your question and thought you were saying the two devices could see each other, except through Visual Studio. I was scratching my head at that.
Visual Studio just uses the OS to resolve names and addresses. I recommend troubleshooting the connectivity problems outside of VS, as the problem is larger than just trouble with remote debugging.
Try nbtstat -n to verify you can see what you expect on your network.

Getting notified when a VPN connection disconnects

How can I, within my Cocoa app, get a notification when the currently running VPN connection disconnects? I'm running Snow Leopard.
You may be able to use the System Configuration framework for this. You can examine the System Configuration hierarchy with scutil(8), and you might have a look at HardwareGrowler's source code for examples of how to use the framework.
Also, documentation:
http://developer.apple.com/mac/library/documentation/Networking/Conceptual/SystemConfigFrameworks/
http://developer.apple.com/mac/library/documentation/Networking/Reference/SysConfig/