I am trying to implement a python module (say, my-module) on arm32v7 Raspberry Pi-3 model. The module is based on resin/rpi-raspbian:stretch (azure-iothub-device-client==1.4.0b0). I have the iothub_client python library then working fine inside the module.
However when I am trying to deploy and do the iotedgectl start in the Pi, I get the following error in docker logs -f <my-module> :
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516]
IoT Hub Client for Python
Adding TrustedCerts from: /mnt/edgemodule/edge-device-ca.cert.pem
set_option TrustedCerts successful
Converted audio file 2643035.wav in 5.67014288902 seconds
Payload: {"translatedutctime": "2018-06-23T14:56:59.972036", "filename": "2643035.wav"}
Sending Payload for 2643035.wav ...
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:56:59 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:57:00 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:57:02 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Converted audio file 4417734.wav in 4.16613197327 seconds
Payload: {"translatedutctime": "2018-06-23T14:57:04.059473", "filename": "4417734.wav"}
Sending Payload for 4417734.wav ...
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:701 Failure: connect failure 111.
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:751 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed opening the underlying I/O.
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:980 Error: io_open failed
Error: Time:Sat Jun 23 14:57:06 2018 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1932 failure connecting to address elderberrypi.
Converted audio file 4486452.wav in 4.94396114349 seconds
Payload: {"translatedutctime": "2018-06-23T15:32:28.491401", "filename": "4486452.wav"}
Sending Payload for 4486452.wav ...
Confirmation[0] received for message with result = MESSAGE_TIMEOUT
Properties: {}
Total calls confirmed: 1
Now this goes on for several messages, and only after the start (never in between, once it stabilizes). After several such message timeouts and errors, the scenario returns back to normal, with callback confirmation, and I am also, able to receive the messages in IoTHub. As a result I always miss the first 5-10 messages and am unable to see those messages in IotHub.
After much trouble shooting, I figured there is a consistent problem. The edgeHub module always seems to fully initialize several seconds after my-module already start sending messages. Since edgeHub is not fully initialized and TLS authentication and MQTT paths are not set, the first few messages of my-module are lost. Maybe this is because the raspberry pi is a slow device?
I have tried starting my-module manually, after the edgeHub is fully initialized, all messages are delivered without any issues in that case.
Question: Is there a way to wait for the edgeHub to fully initialize and then start sending messages? More importantly, is this the actual problem or something else altogether is the cause of the issue?
Please let me know if more information is needed to get the problem context. I have tried to keep my query concise :)
What you pointed out is an accurate description of current behavior! As of current implementation, all modules are started at the same time. Some of them are initialized faster than edgeHub, which caused the behavior you'd seen. This is a known problem and we are implementing a fix!
Related
When I check status of libvirtd using the cmd: sudo systemctl status libvirtd the o/p is as follows:
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2021-07-22 18:00:59 EDT; 1min 4s ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd.socket
● libvirtd-ro.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 1717 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, status=0/SUCCESS)
Main PID: 1717 (code=exited, status=0/SUCCESS)
Jul 22 18:00:59 eb2-2259-lin04 systemd[1]: Starting Virtualization daemon...
Jul 22 18:00:59 eb2-2259-lin04 systemd[1]: Started Virtualization daemon.
Jul 22 18:00:59 eb2-2259-lin04 libvirtd[1717]: libvirt version: 6.0.0, package: 0ubuntu8.11 (Christian Ehrhardt <christian.ehrhardt#canonical.com> Tue, 05 Jan 2021 13:48:48 +0100)
Jul 22 18:00:59 libvirtd[1717]: hostname: eb2-2259-lin04
Jul 22 18:00:59 eb2-2259-lin04 libvirtd[1717]: invalid argument: Failed to parse user 'libvirt-qemu'
Jul 22 18:00:59 eb2-2259-lin04 libvirtd[1717]: Initialization of QEMU state driver failed: invalid argument: Failed to parse user 'libvirt-qemu'
Jul 22 18:00:59 eb2-2259-lin04 libvirtd[1717]: Driver state initialization failed
Jul 22 18:00:59 eb2-2259-lin04 systemd[1]: libvirtd.service: Succeeded.
The status is always inactive(dead). And I get lines invalid argument: Failed to parse user 'libvirt-qemu' , Initialization of QEMU state driver failed: invalid argument: Failed to parse user 'libvirt-qemu' and Driver state initialization failed
I also tried sudo systemctl start libvirtd
and sudo systemctl status libvirtd but the issue doesn't get resolved.
I was actually installing KVM2 driver for GPU support within minikube following the link [https://help.ubuntu.com/community/KVM/Installation][1]. According to the link KVM2 is successfully installed in Ubuntu if virsh list --all cmd does not return an error. For me all the steps returned no error except for the virsh list --all returned the following error.
error: failed to connect to the hypervisor
error: Cannot recv data: Connection reset by peer
and sometimes returns the following error
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused
When I start minikube with kvm2 as the driver using the command minikube start --driver kvm2I get the following error
😄 minikube v1.15.1 on Ubuntu 20.04
💢 Exiting due to GUEST_DRIVER_MISMATCH: The existing "minikube" cluster was created using the "virtualbox" driver, which is incompatible with requested "kvm2" driver.
💡 Suggestion: Delete the existing 'minikube' cluster using: 'minikube delete', or start the existing 'minikube' cluster using: 'minikube start --driver=virtualbox'
Please suggest me how to start minikube with kvm2 as driver.
I cloned the newest version of the Azure C-SDK. One of the recent commit messages says that device twins over AMQP were added. I tried to switch the devicetwin_simplesample.c of the serializer samples to AMQP:
git diff devicetwin_simplesample/devicetwin_simplesample.c
diff --git a/serializer/samples/devicetwin_simplesample/devicetwin_simplesample.c b/serializer/samples/devicetwin_simplesample/devicetwin_simplesample.c
index 7da717c..d390a25 100644
--- a/serializer/samples/devicetwin_simplesample/devicetwin_simplesample.c
+++ b/serializer/samples/devicetwin_simplesample/devicetwin_simplesample.c
## -14,7 +14,7 ##
/*String containing Hostname, Device Id & Device Key in the format: */
/* "HostName=<host_name>;DeviceId=<device_id>;SharedAccessKey=<device_key>" */
-static const char* connectionString = "HostName=...";
+static const char* connectionString = "HostName=XXXX.azure-devices.net;DeviceId=XXXX;SharedAccessKey=XXXX";
// Define the Model - it is a car.
BEGIN_NAMESPACE(Contoso);
## -47,6 +47,7 ## DECLARE_DEVICETWIN_MODEL(Car,
WITH_REPORTED_PROPERTY(Maker, maker), /*this is a structured reported property*/
WITH_REPORTED_PROPERTY(CarState, state), /*this is a model in model*/
+ WITH_DESIRED_PROPERTY(CarSettings, settings) /*this is a model in model*/
WITH_DESIRED_PROPERTY(CarSettings, settings), /*this is a model in model*/
WITH_METHOD(getCarVIN)
);
## -101,7 +102,7 ## void device_twin_simple_sample_run(void)
else
{
/*create an IoTHub client*/
- IOTHUB_CLIENT_HANDLE iotHubClientHandle = IoTHubClient_CreateFromConnectionString(connectionString, MQTT_Protocol); // Change to AMQP_Procotol if desired.
+ IOTHUB_CLIENT_HANDLE iotHubClientHandle = IoTHubClient_CreateFromConnectionString(connectionString, AMQP_Protocol); // Change to AMQP_Procotol if desired.
if (iotHubClientHandle == NULL)
{
printf("Failure creating IoTHubClient handle");
It compiles. When I start it, however, I get the following error and the application quits immediately:
Info: IoT Hub SDK for C, version 1.1.21
Info: Retry policy set (5, timeout = 0)
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/iothub_client/src/iothubtransport_amqp_common.c Func:IoTHubTransport_AMQP_Common_Subscribe_DeviceMethod Line:1720 Not implemented
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/iothub_client/src/iothub_client_ll.c Func:IoTHubClient_LL_SetDeviceMethodCallback_Ex Line:1854 IoTHubTransport_Subscribe_DeviceMethod failed
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/iothub_client/src/iothub_client.c Func:IoTHubClient_SetDeviceMethodCallback Line:1619 IoTHubClient_LL_SetDeviceMethodCallback_Ex failed
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/serializer/inc/serializer_devicetwin.h Func:Generic_IoTHubClient_SetCallbacks Line:193 failure in IoTHubClient_SetDeviceMethodCallback
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/serializer/inc/serializer_devicetwin.h Func:IoTHubDeviceTwinCreate_Impl Line:261 failure in Generic_IoTHubClient_SetCallbacks
Failure in IoTHubDeviceTwin_CreateCarError: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/serializer/inc/serializer_devicetwin.h Func:IoTHubDeviceTwin_Destroy_Impl Line:306 invalid argument void* model=(nil)
Info: Transport state changed from AMQP_TRANSPORT_STATE_NOT_CONNECTED to AMQP_TRANSPORT_STATE_CONNECTING
Info: Transport state changed from AMQP_TRANSPORT_STATE_CONNECTING to AMQP_TRANSPORT_STATE_CONNECTED
Info: Transport state changed from AMQP_TRANSPORT_STATE_CONNECTED to AMQP_TRANSPORT_STATE_BEING_DESTROYED
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/uamqp/src/amqp_management.c Func:amqp_management_close Line:888 AMQP management instance not open
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/iothub_client/src/iothubtransport_amqp_connection.c Func:on_cbs_open_complete Line:149 CBS open failed
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/iothub_client/src/iothubtransport_amqp_cbs_auth.c Func:on_cbs_put_token_complete_callback Line:188 CBS reported status code 0, error: '(null)' for put-token operation for device ''
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/uamqp/src/saslclientio.c Func:saslclientio_send_async Line:1165 send called while not open
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/uamqp/src/connection.c Func:on_bytes_encoded Line:241 Cannot send encoded bytes
Info: Closing tlsio from a state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/uamqp/src/saslclientio.c Func:on_underlying_io_open_complete Line:178 Open complete received in unexpected state
-> [CLOSE]* {}
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/uamqp/src/saslclientio.c Func:saslclientio_close_async Line:1114 saslclientio_close called while not open
Error: Time:Fri Aug 18 17:15:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/uamqp/src/connection.c Func:connection_close Line:1339 xio_close failed
I also tried to remove the CarVIN from the model and comment the corresponding method which didn't help either.
As I see a "not implementd" in the error logs: Is it possible to used AMQP device twins already or will it be "completed" later?
Compiler/OS: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
This was working just Friday. No change in code. (Other than doing a time machine backup in Mac).
But since today react-native run-ios just does not seem to be working. The simulator comes up, but then the usual loading http://localhost:8081 does not show up any more. No errors or any indication on why this is failing. The simulator shows my App in home screen. Double clicking it just brings up and the app seems to crash immediately.
But react-native run-android works fine.
Am not sure where to even begin debugging this. (Am new to whole app development).
A few observations,
when I run npm start and then run react-native run-ios, it
usually "detects" that packager is running and skips launchPackager command, but today its not the case, the launchPackager opens regardless of whether a package is already running (Happens both with run-android and run-ios
There is usually below lines once the app begins loading. But today they only show up when I run react-native run-android
8:43:46 PM] find dependencies
transformed 728/728 (100%)
[8:43:46 PM] find dependencies (553ms)
[8:43:46 PM] request:/index.android.bundle?platform=android&dev=true&hot=false&minify=false (661ms)
And when I run react-native logs-ios, I get the below errors
Sep 12 20:53:15 sseshac-in-la com.apple.CoreSimulator.SimDevice.ADE00521-C04E-4EC5-8BE2-FE729523A0B9.launchd_sim[3812] (UIKitApplication:org.reactjs.native.example.X[0x3f02][4589]) <Notice>: Service exited due to signal: Abort trap: 6
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Error>: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Sep 12 20:53:15 sseshac-in-la Unknown[3832] <Error>:
Sep 12 20:53:15 sseshac-in-la SpringBoard[3828] <Warning>: Application 'UIKitApplication:org.reactjs.native.example.X[0x3f02]' crashed.
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Error>: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Sep 12 20:53:15 sseshac-in-la Unknown[3832] <Error>:
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Warning>: notify_suspend_pid() failed with error 7
Sep 12 20:53:15 sseshac-in-la assertiond[3832] <Error>: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Sep 12 20:53:15 sseshac-in-la Unknown[3832] <Error>:
Sep 12 20:53:15 sseshac-in-la SpringBoard[3828] <Warning>: Reply Error: Connection interrupted
Sep 12 20:58:36 sseshac-in-la routined[3817] <Error>: CoreLocation: Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104
UPDATE:
I think the root cause seems to below error
<Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bundleURL must be non-nil when not implementing loadSourceForBridge'
Note that I am using React native 0.32. I understood that now it "detects" rather than hardcoding the bundleUrl. If someone can throw light on where this "detection" is, will be helpful
Problem turned out to be I was missing an entry in /etc/hosts
127.0.0.1 localhost
I still don't have any clue why it would work before. But that solved it
Probably you have problem with the packager make sure your modules all built you can check by opening
http://localhost:8081/index.ios.bundle?platform=ios&dev=true
in the browser after the build you will get the error
I have a symfony 1.4 project that is continually putting the following warning in the Apache error log:
[Wed Sep 26 06:18:22 2011] [error] [client 192.168.100.12] PHP Warning: unlink(/var/cache/project-ttp/device/dev/config/config_autoload.yml.php): No such file or directory in /usr/share/project-ttp/lib/vendor/symfony/lib/autoload/sfAutoload.class.php on line 132
Any idea what may be causing this?
XCode4 just crash on me when I was testing my app without saying why. I put the crash log I found on the device below. The app runs fine in the simulation so I am thinking it's the memory problem? I check for leaks but there is nothing serious to it, also there is not memory warning call.
The log said "Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-06-01-154632.plist" but I can't find it anywhere on my mac.
Please help,
Pondd
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:3795 (24506):0
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:920 (24506):3
Jun 1 15:46:31 unknown com.apple.debugserver-50[412] <Warning>: 1 [019c/1503]: error: ::read ( 4, 0x2ff8a9f0, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:3794 (24506):3
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Bug: launchd_core_logic.c:3202 (24506):10
Jun 1 15:46:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.mondial.dva[0xd591]) Working around 5020256. Assuming the job crashed.
Jun 1 15:46:31 unknown SpringBoard[28] <Warning>: Unable to delete job with label UIKitApplication:com.mondial.dva[0xd591]. Error: No such process
Jun 1 15:46:32 unknown ReportCrash[418] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-06-01-154632.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Jun 1 15:46:32 unknown configd[25] <Notice>: jetsam: kernel termination snapshot being created
Jun 1 15:46:32 unknown SCHelper[148] <Notice>: active (but IDLE) sessions
Jun 1 15:46:37 unknown SpringBoard[28] <Notice>: MultitouchHID(1cd11840) uilock state: 0 -> 1
Jun 1 15:46:41 unknown ReportCrash[420] <Notice>: Not saving Jetsam log because no data from the kernel.
Jun 1 15:46:41 unknown configd[25] <Notice>: jetsam: kernel termination snapshot being created
Jun 1 15:46:51 unknown ReportCrash[421] <Notice>: Not saving Jetsam log because no data from the kernel.
I found my LowMemory generated files through the organizer -> devices -> the device you are running on -> console -> right click on any of the logs on the left and select "Reveal in Finder"