iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection. mqtt_client timed out waiting for CONNACK - azure-iot-sdk

OS:Linux
SDK Version : 2018-12-13
Description of the issue:
iothub_ll_telemetry_sample.c
when i placed 60000 in the function ThreadAPI_Sleep(60000) works well but Tried with 120000 facing the timeout error.
cd ~/azure-iot-sdk-c/cmake/iothub_client/samples/iothub_ll_telemetry_sample
$ ./iothub_ll_telemetry_sample
Console log of the issue:
Creating IoTHub Device handle
Sending message 1 to IoTHub
Sending message 2 to IoTHub
Error: Time:Fri Dec 21 11:12:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Sending message 3 to IoTHub
Sending message 4 to IoTHub
Error: Time:Fri Dec 21 11:16:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Sending message 5 to IoTHub
Error: Time:Fri Dec 21 11:18:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Dec 21 11:20:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Dec 21 11:22:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Dec 21 11:24:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Error: Time:Fri Dec 21 11:26:19 2018 File:/home/test/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2229 mqtt_client timed out waiting for CONNACK
Note:
In previous version you said it's resolved but here it's not working form me. Please Explain me where is the problem.

The "LL" version of SDK functions are single threaded. When modify the code to sleep for two minutes the SDK is unable to service the socket and hence does not receive the CONNACK packet in time. The function call that services the socket is IoTHubDeviceClient_LL_DoWork. This function should be called at a bare minimum every 100 ms and preferably more quickly than that. If you only want to send a message every two minutes the onus is upon you to keep track of the time and send your message every time it has been two minutes since your last message. You cannot simply put the thread to sleep for two minutes.

Related

local smtp mail server could not send mail(Connection timed out)

ERORR:
Feb 14 14:09:04 es1 postfix/smtp[16443]: connect to mx3.hotmail.com[65.54.188.94]:25: Connection timed out
Feb 14 14:09:34 es1 postfix/smtp[16443]: connect to mx1.hotmail.com[104.44.194.231]:25: Connection timed out
Feb 14 14:10:04 es1 postfix/smtp[16443]: connect to mx1.hotmail.com[207.46.8.167]:25: Connection timed out
Feb 14 14:10:34 es1 postfix/smtp[16443]: connect to mx2.hotmail.com[65.55.37.104]:25: Connection timed out
Feb 14 14:11:04 es1 postfix/smtp[16443]: connect to mx1.hotmail.com[65.55.92.136]:25: Connection timed out
Feb 14 14:11:04 es1 postfix/smtp[16443]: 228D519C06D: to=<xxxx#hotmail.com>, relay=none, delay=395818, delays=395668/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx1.hotmail.com[65.55.92.136]:25: Connection timed out)
I've host Mail Server on CentOS 6 with Postfix/Dovecot, I can receive mail from outside, but can't not sending mail to outside.
Things I've done:
Add spf record to dns, also validate successfully from http://www.kitterman.com/spf/validate.html?
v=spf1 ip4:x.x.x.x -all
Note:
I've change the default port 25 to 26 due to ISP block issue by adding etc/postfix/master.cf
26 inet n - n - - smtpd
Your ISP is probably blocking outbound port 25. Its very common. Your SPF record and inbound SMTP port makes no difference. I suggest you contact your ISP.

Xcode 8 SiriKit Extension - Could not attach to pid

Almost every time I try to run my SiriKit Extension, I get "Sorry, you'll need to continue in the app" along with "Could not attach to pid : '####'" on Xcode. I have Siri capability enabled. Weirdly, 1 out of 10 times when I clean and rebuild, the extension works. Does anyone know how to deal with this?
Edit:
In console.app I'm getting this:
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Info>: preparing plug-in <private>(<private>)
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Notice>: connection to plug-in <private>(0DDA43D4-A588-4478-8405-C219EAA7F591) lost
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Error>: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Info>: beginUsing of 0DDA43D4-A588-4478-8405-C219EAA7F591 concludes with error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}
Aug 15 11:43:43 iPhone assistantd(Foundation)[12442] <Notice>: PlugInKit error in beginUsing:
Aug 15 11:43:43 iPhone assistantd[12442] <Error>: __52-[ADExtensionService handleCommand:forDomain:reply:]_block_invoke_2.154 Error with extension request Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}
Aug 15 11:43:43 iPhone assistantd(Foundation)[12442] <Notice>: killing invalid plugIn
Aug 15 11:43:43 iPhone assistantd[12442] <Error>: -[ADCommandCenter _handleServiceReply:error:forCommand:] Handling service error Error Domain=kAFAssistantErrorDomain Code=1301 "(null)" UserInfo={NSUnderlyingError=0x1005d1eb0 {Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}}} for command <private>
Fixed the problem after weeks of debugging.
My problem was that SiriKit was running on armv7 architecture. Changing it to arm64 or the default setting of armv7 + arm64 will fix this problem.
I hope this helps someone!

What do these Xcode simulator system errors mean?

The Xcode simulator disconnects from Xcode which will no longer show information in the console of Xcode. Xcode then provided the following error: "DTAssetProviderService could not start DTXConnection with Simulator 'iPhone 6'. Check the system log for errors."
I've tried quitting and restarting both the simulator and Xcode but still no luck. Here are the system log errors:
Jun 25 15:49:34 --- last message repeated 1 time ---
Jun 25 15:49:34 Laurences-MBP diagnosticd[8123]: System mode client started - Console (8117) - mode: 0x8
Jun 25 15:49:48 Laurences-MBP sandboxd[10550] ([318]): useractivityd(318) deny mach-lookup com.apple.PowerManagement.control
Jun 25 15:49:53 --- last message repeated 1 time ---
Jun 25 15:49:53 Laurences-MBP cloudd[10528]: notify name "com.apple.cloudkit.pcs.flushCaches" has been registered 20 times - this may be a leak
Jun 25 15:50:05 Laurences-MBP sandboxd[10550] ([318]): useractivityd(318) deny mach-lookup com.apple.PowerManagement.control
Jun 25 15:50:05 Laurences-MBP syslogd[47]: ASL Sender Statistics
Jun 25 15:50:08 Laurences-MBP sandboxd[10550] ([318]): useractivityd(318) deny mach-lookup com.apple.PowerManagement.control
Jun 25 15:50:11 Laurences-MBP diagnosticd[8123]: System mode client started - Console (8117) - mode: 0x8
Jun 25 15:50:44 Laurences-MBP sandboxd[10550] ([10647]): lsd(10647) System Policy: deny system-privilege 1013
Jun 25 15:51:00 --- last message repeated 1 time ---
Jun 25 15:51:00 Laurences-MBP DTServiceHub[10677]: DTServiceHub[10677]: [error] 'mach_msg_send' failed: (ipc/send) invalid destination port (268435459)
Jun 25 15:51:09 Laurences-MBP Xcode[7692]: Xcode[7692]: [error] 'mach_msg_send' failed: (ipc/send) invalid destination port (268435459)
Jun 25 15:51:09 Laurences-MBP Xcode[7692]: +[DTServiceHubClient localConnectionWithAuthorization:returningServerPid:]: failed to establish connection with DTServiceHub service '/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/DTServiceHub'
Jun 25 15:51:09 Laurences-MBP Xcode[7692]: Xcode[7692]: [error] 'mach_msg_send' failed: (ipc/send) invalid destination port (268435459)
You're using Xcode 7.3.1 on macOS Sierra Beta which is not supported. This question has been discussed in more detail in XCode "DTAssetProviderService could not start.." error, How fix this?
Use Xcode 8 beta or Xcode 7.3.1 the .dmg image downloaded from the Developer Portal https://developer.apple.com/download/more/ which doesn't exhibit this problem like the Mac App Store version.

Maximo Anywhere 7.6 - iOS - Error during Login - "errorCode":"UNRESPONSIVE_HOST"

I have tried using both xcode simulator and install the .ipa file directly to the device (through iTunes) and got the connection error. This is the detail:
Mar 27 20:33:30 --- last message repeated 5 times ---
Mar 27 20:33:30 myMBPro Inspection[10213]: ERROR: {"textMsg":"Your user name and password could not be validated. Connect to the server and try again."}
Mar 27 20:33:30 myMBPro Inspection[10213]: nw_interface_create_with_index refusing to create an interface with index 4294967295 too high (>=2147483647)
Mar 27 20:33:30 myMBPro Inspection[10213]: CFNetwork SSLHandshake failed (-9806)
Mar 27 20:33:30 myMBPro Inspection[10213]: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)
Mar 27 20:33:30 myMBPro Inspection[10213]: Cancel processing requested
Mar 27 20:33:31 myMBPro Inspection[10213]: ERROR: {"invocationContext":null,"errorCode":"UNRESPONSIVE_HOST","errorMsg":"The service is currently not available."}
I did install SSL on the app server that hosts Appcenter & MaximoAnywhere (https://maximodev:9443/MaximoAnywhere https://maximodev:9443/appcenteradmin/installers.html)
I follow this IBM documentation:
www.ibm.com/support/knowledgecenter/#!/SSHS8R_6.3.0/com.ibm.worklight.appadmin.doc/appcenter/t_installing_the_client_on_a_ios_mob.html
Is there any other configuration files need to be set?
Thanks!
I suspect your device doesn't trust the certificate that you're using on the MobileFirst server. Can you check your certificate trust list on the iOS device?

Ionic app won't log in Xcode

Running an Ionic app that works fine on browser and used to work on Xcode simulator and iPhones. I'm watching the log file and something strange is happening.
Once I hit 'Login' on my app, it freezes and here is the output:
Mar 12 15:03:21 C02QJA6VG8WP SpringBoard[37882]: Weekly asset update check did fire (force=NO)
Mar 12 15:03:21 C02QJA6VG8WP SpringBoard[37882]: Beginning check for asset updates (force: 0
Mar 12 15:03:21 C02QJA6VG8WP SpringBoard[37882]: Did not complete check for asset updates (force: 0, isVoiceOverRunning: 0
Mar 12 15:03:22 C02QJA6VG8WP assertiond[37886]: assertion failed: 14F1605 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
Mar 12 15:03:23 --- last message repeated 3 times ---
Mar 12 15:03:23 C02QJA6VG8WP kbd[37935]: table drop: 101
Mar 12 15:03:31 C02QJA6VG8WP assertiond[37886]: assertion failed: 14F1605 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
Mar 12 15:03:31 --- last message repeated 4 times ---
Mar 12 15:03:31 C02QJA6VG8WP assertiond[37886]: Could not create or rename power assertion for <BKNewProcess: 0x7fd0bac01930; com.ionicframework.sameboat491544; pid: 37934; hostpid: -1>: 0xe00002c9
Mar 12 15:03:31 C02QJA6VG8WP assertiond[37886]: assertion failed: 14F1605 13C75: assertiond + 12188 [8CF1968D-3466-38B7-B225-3F6F5B64C552]: 0x1
Mar 12 15:03:40 C02QJA6VG8WP lsd[37908]: LaunchServices: Currently 0 installed placeholders: (
)
Mar 12 15:03:53 C02QJA6VG8WP mstreamd[37871]: (Note ) PS: Media stream daemon stopping.
Mar 12 15:03:53 C02QJA6VG8WP mstreamd[37871]: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x7f9c42f07b20>: Shared Streams daemon has shut down.
Mar 12 15:03:53 C02QJA6VG8WP mstreamd[37871]: (Warn ) mstreamd: mstreamd shutting down.
Mar 12 15:04:11 C02QJA6VG8WP ids_simd[37874]: (Error) IDSSimulatorSupport: <IDSSimSupportLocalServer.m __68-[IDSSimSupportLocalServer setNetworkSimulation:enabled:completion:]_block_invoke:561> message send of data {
ControlCmd = SetNetSimulationEnabledCmd;
Enabled = 0;
ServiceName = "com.apple.private.alloy.sockpuppet.classd";
} failed with error Error Domain=com.apple.idssimualtorsupport.errors Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fc34e2027e0 {Error Domain=NSMachErrorDomain Code=268435459 "(ipc/send) invalid destination port"}}
Mar 12 15:04:11 C02QJA6VG8WP companionappd[37879]: (Error) WatchKit: <SPTransport.m __67-[SPTransport service:account:identifier:didSendWithSuccess:error:]_block_invoke:430> __67-[SPTransport service:account:identifier:didSendWithSuccess:error:]_block_invoke identifier (B67A5D73-36B1-4B1C-B7EF-952300B137C6), serviceName ((null)), success: 0 error, domain: com.apple.identityservices.error, code: 23
Mar 12 15:04:11 C02QJA6VG8WP companionappd[37879]: (Error) WatchKit: <SPCompanionAppServer.m __75-[SPCompanionAppServer sendProtobuf:sender:timeOut:allowInsecureTransport:]_block_invoke:900> sendProtobuf failed, error : Error Domain=com.apple.identityservices.error Code=23 "Timed out" UserInfo={NSLocalizedDescription=Timed out, NSUnderlyingError=0x7fd5722058e0 {Error Domain=com.apple.ids.idssenderrordomain Code=12 "(null)"}}
Mar 12 15:04:11 C02QJA6VG8WP sharingd[37884]: 15:04:11.601 : Failed to send SDURLSessionProxy startup message, error Error Domain=com.apple.identityservices.error Code=23 "Timed out" UserInfo={NSLocalizedDescription=Timed out, NSUnderlyingError=0x7feb4c913460 {Error Domain=com.apple.ids.idssenderrordomain Code=12 "(null)"}}
Mar 12 15:04:11 C02QJA6VG8WP companionappd[37879]: (Error) WatchKit: <SPTransport.m __67-[SPTransport service:account:identifier:didSendWithSuccess:error:]_block_invoke:430> __67-[SPTransport service:account:identifier:didSendWithSuccess:error:]_block_invoke identifier (E24D19D0-9B54-4A4A-8261-0E12C329B3D9), serviceName ((null)), success: 0 error, domain: com.apple.identityservices.error, code: 23
Mar 12 15:04:11 C02QJA6VG8WP companionappd[37879]: (Error) WatchKit: <SPCompanionAppServer.m __75-[SPCompanionAppServer sendProtobuf:sender:timeOut:allowInsecureTransport:]_block_invoke:900> sendProtobuf failed, error : Error Domain=com.apple.identityservices.error Code=23 "Timed out" UserInfo={NSLocalizedDescription=Timed out, NSUnderlyingError=0x7fd572205490 {Error Domain=com.apple.ids.idssenderrordomain Code=12 "(null)"}}
Any help would be greatly appreciated.
Turns out the Cordova plugin I was using is not compatible with the latest version of cordova-ios. I had to manually remove my platforms/ios directory and recreate it.
ionic platform add ios#3.9.2
ionic build ios
The plugin I was using was https://github.com/Telerik-Verified-Plugins/NativePageTransitions

Resources