I have been struggling with implementing the Spotify iOS SDK in a simple music player app I’m working on with the intention of learning more about the streaming platform’s API. My app’s features are storyboard-based and have simple functionality (i.e. connect/disconnect, pause/play, fast forward/rewind, fetch album artwork)
I modeled my authorization method off of the demo project SPTLoginSampleAppSwift, and have been trying to troubleshoot the errors I’m getting (I’ll paste them below).
After a few weeks of struggling with this API, I decided to run the demo project on my device and realized that it does not seem to function properly either. Does anyone know how I can fix these errors and successfully initiate Spotify functionality in my app? I’m quite frustrated and would really appreciate any advice. I'm including my repo below as well.
https://github.com/dglaser2/SpotifyPlayer
ERRORS:
Upon clicking connect:
-canOpenURL: failed for URL: "spotify:" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
Upon returning to app after authorization screen:
2021-01-07 16:59:16.775788-0500 SpotifyPlayerDavid[39554:3692500] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-01-07 16:59:16.907970-0500 SpotifyPlayerDavid[39554:3688560] AppRemote: Connecting...
2021-01-07 16:59:16.921229-0500 SpotifyPlayerDavid[39554:3692500] [connection] nw_socket_handle_socket_event [C2.1:1] Socket SO_ERROR [61: Connection refused]
2021-01-07 16:59:16.923633-0500 SpotifyPlayerDavid[39554:3692500] [connection] nw_socket_handle_socket_event [C2.2:1] Socket SO_ERROR [61: Connection refused]
2021-01-07 16:59:16.926122-0500 SpotifyPlayerDavid[39554:3691493] [connection] nw_connection_get_connected_socket [C2] Client called nw_connection_get_connected_socket on unconnected nw_connection
2021-01-07 16:59:16.926941-0500 SpotifyPlayerDavid[39554:3691493] TCP Conn 0x600002b6c0b0 Failed : error 0:61 [61]
2021-01-07 16:59:16.928526-0500 SpotifyPlayerDavid[39554:3688560] AppRemote: Failed connection attempt with error: Error Domain=com.spotify.app-remote.transport Code=-2000 "Stream error." UserInfo={NSLocalizedDescription=Stream error., NSUnderlyingError=0x600001228f00 {Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSLocalizedRecoverySuggestion=Reconnect the transport to the Spotify app., NSLocalizedFailureReason=A stream error has occured in the transport.
Steps to reproduce:
Create a new app and call any API to the server to get data
immediately take the app to background
network get disconnects
below is the log:
2020-03-26 17:21:00.894598+0530 TestApp[783:152843] Connection 2: received failure notification
2020-03-26 17:21:00.895805+0530 TestApp[783:152843] Connection 2: failed to connect 1:53, reason -1
2020-03-26 17:21:00.895895+0530 TestApp[783:152843] Connection 2: encountered error(1:53)
2020-03-26 17:21:00.901375+0530 TestApp[783:152843] Task <36B9553A-99F2-42FE-8650-A5E5155EFCFD>.<1> HTTP load failed, 0/0 bytes (error code: -1005 [1:53])
2020-03-26 17:21:00.901831+0530 TestApp[783:152843] Connection 1: received failure notification
2020-03-26 17:21:00.902078+0530 TestApp[783:152843] [] nw_flow_add_write_request [C1.1 40.85.185.46:443 failed channel-flow (satisfied (Path is satisfied), interface: en0, ipv4, dns)] cannot accept write requests
2020-03-26 17:21:00.902200+0530 TestApp[783:152843] [] nw_write_request_report [C1] Send failed with error "Socket is not connected"
2020-03-26 17:21:00.905902+0530 TestApp[783:152870] Task <36B9553A-99F2-42FE-8650-A5E5155EFCFD>.<1> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x2824734e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://api.server.account, NSErrorFailingURLKey=https://api.server.account, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=53, NSLocalizedDescription=The network connection was lost.}
I bring up 4 peers using byfn.sh.
Everything comes up fine and I can see the orderer, peers, CA nodes, etc. running in docker containers
I then use a custom service layer application that uses the Fabric Node SDK to connect with this network.
I have no issues making the connection using byfn.sh generated TLS CA certificate (/usr/local/src/test_env/hlf_scripts/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem)
Here are the docker log messages for the call Gateway.getNetwork(“mychannel”):
2020-01-14 22:12:20.981 UTC [comm.grpc.server] 1 -> INFO 083 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=192.168.80.1:38858 grpc.code=OK grpc.call_duration=515.21µs
2020-01-14 22:12:21.012 UTC [comm.grpc.server] 1 -> INFO 084 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=192.168.80.1:38858 grpc.code=OK grpc.call_duration=552.801µs
I then bring up another client application, that uses pretty much the same code, for manipulating the network. The first step here is to ensure that the user’s (admin in this case) identity exists and can be imported into a wallet. The same piece of code is used to generate this identity, and using the same connection profile (connection_org1.json). The identity can be created and imported into the filesystem wallet.
I can connect to the network using the Gateway.connect(…) method and using the connection profile connection_org1.json. However, the moment I invoke Gateway.getNetwork(“mychannel”), my issues start. Here is the error returned by the Fabric SDK:
[nodemon] starting `node ./dist/server.js`
Express server listening on port 3050
Wallet path: /usr/local/src/fabric-network-code/wallet
E0114 17:16:47.872273165 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0114 17:16:48.873788447 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0114 17:16:50.368082218 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
2020-01-14T22:16:50.869Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051
2020-01-14T22:16:50.870Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051
E0114 17:16:50.877630619 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0114 17:16:51.876732084 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0114 17:16:53.263732590 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0114 17:16:53.303070959 1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
2020-01-14T22:16:53.875Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8051
2020-01-14T22:16:53.875Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8051
2020-01-14T22:16:53.875Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://localhost:8051
Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://localhost:8051
[nodemon] app crashed - waiting for file changes before starting...
And here is the log from the docker container log for peer0.org1.example.com
2020-01-14 22:16:47.872 UTC [core.comm] ServerHandshake -> ERRO 085 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38886
2020-01-14 22:16:48.874 UTC [core.comm] ServerHandshake -> ERRO 086 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38890
2020-01-14 22:16:50.368 UTC [core.comm] ServerHandshake -> ERRO 087 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38894
2020-01-14 22:16:53.303 UTC [core.comm] ServerHandshake -> ERRO 088 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38910
I have tried various permutations and combinations of using different certs but not getting anywhere. Online forums indicate this is an issue of communication between orderer and the peer. However, there are no error messages in the orderer.
I have asked this question in chat.hyperledger.org but no response yet.
So extremely foolish of me. I had a crypto-config directory sitting in my node project folder (I don't know when I may have copied it over....) and that was throwing off the tlscacert variable.
I have removed the offending directory and now it is reading the correct one under .../first-network/crypto-config/.../<tlsca file>.pem
Sometimes (and quite often :-) ) the answer is right there but one is too stupid to see it!!!
My OS is Yocto Rocko on i.MX6Q.
I used docker v17.06 to load three greengrass image version 1.7.1, 1.8.1 and 1.9.2.
I followed the README.md in each package to setup up and install step by step.
All images were failed to connect AWS greengrass group I created.
The following are logs about the error, I think the reason is MQTT setting has something wrong. I google mosquitto.conf about greengrass, and I couldn't find any solution.
Here is my mosquitto info.
root#imx6qsabresd:/etc/mosquitto# mosquitto -h
mosquitto version 1.4.14 (build date 2019-06-26 15:24:46+0800)
mosquitto is an MQTT v3.1.1/v3.1 broker.
Could anyone tell me how to setting mosquitto.conf for greengrass?
Or is the root cause another one?
greengrass v1.7.1 log
[2019-07-01T02:49:18.214Z][INFO]-===========================================
[2019-07-01T02:49:18.214Z][INFO]-Greengrass Root: /greengrass
[2019-07-01T02:49:18.214Z][INFO]-Greengrass Write Directory: /greengrass/ggc
[2019-07-01T02:49:18.214Z][INFO]-Group File Directory: /greengrass/ggc/deployment/group
[2019-07-01T02:49:18.214Z][INFO]-Default Lambda UID: 122 GID: 121
[2019-07-01T02:49:18.214Z][INFO]-===========================================
[2019-07-01T02:49:18.223Z][INFO]-The current core is using the AWS IoT certificates with fingerprint: 5da1e3eb3aefdc0c3adf0607284ea00debba05af257ba42b96c9c211f441f5bf
[2019-07-01T02:49:18.224Z][WARN]-worker process info: /greengrass/ggc/packages/1.7.1/var/worker/processes
[2019-07-01T02:49:18.225Z][WARN]-worker process info: /greengrass/ggc/packages/1.7.1/var/worker/processes
[2019-07-01T02:49:18.234Z][INFO]-Reloading registry
[2019-07-01T02:49:18.236Z][INFO]-The current core is using the AWS IoT certificates with fingerprint: 5da1e3eb3aefdc0c3adf0607284ea00debba05af257ba42b96c9c211f441f5bf
[2019-07-01T02:49:23.291Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.192.233.211:8883: i/o timeout
[2019-07-01T02:49:28.297Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.199.190.37:8883: i/o timeout
[2019-07-01T02:49:34.303Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.192.233.211:8883: i/o timeout
[2019-07-01T02:49:39.309Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.199.190.37:8883: i/o timeout
[2019-07-01T02:49:45.315Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.192.233.211:8883: i/o timeout
[2019-07-01T02:49:53.321Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.199.190.37:8883: i/o timeout
[2019-07-01T02:50:20.327Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.192.233.211:8883: i/o timeout
[2019-07-01T02:50:45.363Z][WARN]-Attempt to establish MQTT connection with a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883 failed and will be retried: Network Error : dial tcp 52.196.224.122:8883: i/o timeout
greengrass v1.8.1 log
[2019-07-01T03:28:02.096Z][INFO]-MQTT connection attempt: attemptId: ibGG, clientId: zohan_Core
[2019-07-01T03:28:17.102Z][WARN]-MQTT[client] dial tcp 52.192.233.211:8883: i/o timeout
[2019-07-01T03:28:17.102Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:28:33.097Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:28:33.097Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: ibGG, clientId: zohan_Core: operation timed out
[2019-07-01T03:29:07.098Z][INFO]-MQTT connection attempt: attemptId: qPeP, clientId: zohan_Core
[2019-07-01T03:29:22.159Z][WARN]-MQTT[client] dial tcp 13.231.29.48:8883: i/o timeout
[2019-07-01T03:29:22.159Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:29:38.099Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:29:38.099Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: qPeP, clientId: zohan_Core: operation timed out
[2019-07-01T03:30:00.1Z][INFO]-MQTT connection attempt: attemptId: tQVE, clientId: zohan_Core
[2019-07-01T03:30:15.105Z][WARN]-MQTT[client] dial tcp 52.196.81.83:8883: i/o timeout
[2019-07-01T03:30:15.105Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:30:31.101Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:30:31.101Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: tQVE, clientId: zohan_Core: operation timed out
[2019-07-01T03:30:34.102Z][INFO]-MQTT connection attempt: attemptId: bbZJ, clientId: zohan_Core
[2019-07-01T03:30:49.134Z][WARN]-MQTT[client] dial tcp 52.199.190.37:8883: i/o timeout
[2019-07-01T03:30:49.134Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:31:05.103Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:31:05.103Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: bbZJ, clientId: zohan_Core: operation timed out
[2019-07-01T03:31:49.103Z][INFO]-MQTT connection attempt: attemptId: QZad, clientId: zohan_Core
[2019-07-01T03:32:04.144Z][WARN]-MQTT[client] dial tcp 52.192.233.211:8883: i/o timeout
[2019-07-01T03:32:04.144Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:32:20.105Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:32:20.105Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: QZad, clientId: zohan_Core: operation timed out
[2019-07-01T03:32:54.105Z][INFO]-MQTT connection attempt: attemptId: RhWa, clientId: zohan_Core
[2019-07-01T03:33:09.14Z][WARN]-MQTT[client] dial tcp 52.196.81.83:8883: i/o timeout
[2019-07-01T03:33:09.14Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:33:25.107Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:33:25.107Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: RhWa, clientId: zohan_Core: operation timed out
[2019-07-01T03:33:52.107Z][INFO]-MQTT connection attempt: attemptId: RKLh, clientId: zohan_Core
[2019-07-01T03:34:07.113Z][WARN]-MQTT[client] dial tcp 13.231.29.48:8883: i/o timeout
[2019-07-01T03:34:07.113Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:34:23.108Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:34:23.108Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: RKLh, clientId: zohan_Core: operation timed out
[2019-07-01T03:35:22.109Z][INFO]-MQTT connection attempt: attemptId: cJQX, clientId: zohan_Core
[2019-07-01T03:35:37.186Z][WARN]-MQTT[client] dial tcp 52.196.224.122:8883: i/o timeout
[2019-07-01T03:35:37.186Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:35:53.11Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:35:53.11Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: cJQX, clientId: zohan_Core: operation timed out
[2019-07-01T03:36:25.111Z][INFO]-MQTT connection attempt: attemptId: tPkl, clientId: zohan_Core
[2019-07-01T03:36:40.176Z][WARN]-MQTT[client] dial tcp 52.196.224.122:8883: i/o timeout
[2019-07-01T03:36:40.176Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:36:56.112Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-07-01T03:36:56.112Z][WARN]-MQTT connection attempt failed and will be retried: attemptId: tPkl, clientId: zohan_Core: operation timed out
[2019-07-01T03:37:22.112Z][INFO]-MQTT connection attempt: attemptId: RJbR, clientId: zohan_Core
[2019-07-01T03:37:37.118Z][WARN]-MQTT[client] dial tcp 54.178.150.112:8883: i/o timeout
[2019-07-01T03:37:37.118Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-07-01T03:37:53.113Z][WARN]-MQTT[store] Trying to close memory store, but not open
greengrass v1.9.2 log
ogot#imx6qsabresd:/usr/aws/aws-greengrass-docker-1.9.2/log/system# cat runtime.lo
[2019-06-28T03:12:10.073Z][DEBUG]-Disconnecting client
[2019-06-28T03:12:10.073Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:12:10.073Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:12:10.073Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "RHeO", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:12:11.074Z][DEBUG]-MQTT connection attempt. {"attemptId": "LcQc", "clientId": "zohan_Core"}
[2019-06-28T03:12:11.074Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:12:11.074Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:12:11.074Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:12:26.128Z][WARN]-MQTT[client] dial tcp 52.196.224.122:8883: i/o timeout
[2019-06-28T03:12:26.128Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:06:24.813Z][INFO]-===========================================
[2019-06-28T03:06:24.813Z][INFO]-Greengrass Version: 1.9.2-RC4
[2019-06-28T03:06:24.813Z][INFO]-Greengrass Root: /greengrass
[2019-06-28T03:06:24.813Z][INFO]-Greengrass Write Directory: /greengrass/ggc
[2019-06-28T03:06:24.813Z][INFO]-Group File Directory: /greengrass/ggc/deployment/group
[2019-06-28T03:06:24.813Z][INFO]-Default Lambda UID: 122
[2019-06-28T03:06:24.813Z][INFO]-Default Lambda GID: 121
[2019-06-28T03:06:24.813Z][DEBUG]-Go version: go1.10.3
[2019-06-28T03:06:24.814Z][DEBUG]-CoreThing Connection Config:
{
"Region": "ap-northeast-1",
"ThingArn": "arn:aws:iot:ap-northeast-1:268205529033:thing/zohan_Core",
"IoTMQTTEndpoint": "a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883",
"IoTHTTPEndpoint": "a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8443",
"GGMQTTEndpoint": "greengrass-ats.iot.ap-northeast-1.amazonaws.com:8883",
"GGHTTPEndpoint": "greengrass-ats.iot.ap-northeast-1.amazonaws.com:8443",
"GGMQTTKeepAlive": 600,
"GGMQTTMaxConnectionRetryInterval": 60,
"GGMQTTConnectTimeout": 30,
"GGMQTTPingTimeout": 30,
"GGHTTPTimeout": 60,
"FIPSMode": false,
"CoreClientId": ""
}
[2019-06-28T03:06:24.814Z][DEBUG]-System Config:
{
"tmpDirectory": "",
"shadowSyncTimeout": 0
}
[2019-06-28T03:06:24.814Z][DEBUG]-Runtime Config:
{
"maxWorkItemCount": 1024,
"schedulingFrequency": 1000,
"maxConcurrentLimit": 25,
"lruSize": 25,
"cgroup": {
"useSystemd": true,
"mountPoint": null
},
"postStartHealthCheckTimeout": 60000,
"allowFunctionsToRunAsRoot": false,
"onSystemComponentsFailure": 0
}
[2019-06-28T03:06:24.814Z][INFO]-===========================================
[2019-06-28T03:06:24.814Z][DEBUG]-[3]Requested certificate load [file:///greengrass/certs/5da1e3eb3a.cert.pem] with error: [<nil>]
[2019-06-28T03:06:24.814Z][INFO]-The current core is using the AWS IoT certificates with fingerprint. {"fingerprint": "5da1e3eb3aefdc0c3adf0607284ea00debba05af257ba42b96c9c211f441f5bf"}
[2019-06-28T03:06:24.815Z][INFO]-Will persist worker process info. {"dir": "/greengrass/ggc/packages/1.9.2/var/worker/processes"}
[2019-06-28T03:06:24.816Z][INFO]-Will persist worker process info. {"dir": "/greengrass/ggc/packages/1.9.2/var/worker/processes"}
[2019-06-28T03:06:24.817Z][DEBUG]-loading subscriptions {"trie": "map[]"}
[2019-06-28T03:06:24.819Z][DEBUG]-[3]Requested certificate load [file:///greengrass/certs/root.ca.pem] with error: [<nil>]
[2019-06-28T03:06:24.823Z][DEBUG]-[3]Requested key load [file:///greengrass/certs/5da1e3eb3a.private.key] with error: [<nil>]
[2019-06-28T03:06:24.823Z][DEBUG]-[3]Requested certificate load [file:///greengrass/certs/5da1e3eb3a.cert.pem] with error: [<nil>]
[2019-06-28T03:06:24.826Z][INFO]-No proxy URL found.
[2019-06-28T03:06:24.827Z][DEBUG]-Reloading function registry.
[2019-06-28T03:06:24.828Z][DEBUG]-[3]Requested certificate load [file:///greengrass/certs/5da1e3eb3a.cert.pem] with error: [<nil>]
[2019-06-28T03:06:24.828Z][INFO]-The current core is using the AWS IoT certificates with fingerprint. {"fingerprint": "5da1e3eb3aefdc0c3adf0607284ea00debba05af257ba42b96c9c211f441f5bf"}
[2019-06-28T03:06:24.833Z][DEBUG]-[3]Requested certificate load [file:///greengrass/certs/root.ca.pem] with error: [<nil>]
[2019-06-28T03:06:24.836Z][DEBUG]-[3]Requested key load [file:///greengrass/certs/5da1e3eb3a.private.key] with error: [<nil>]
[2019-06-28T03:06:24.837Z][DEBUG]-[3]Requested certificate load [file:///greengrass/certs/5da1e3eb3a.cert.pem] with error: [<nil>]
[2019-06-28T03:06:24.84Z][INFO]-Started Deployment Agent to listen for updates.
[2019-06-28T03:06:24.841Z][INFO]-Connecting with MQTT. {"endpoint": "a3ha96wpso16t3-ats.iot.ap-northeast-1.amazonaws.com:8883", "clientId": "zohan_Core"}
[2019-06-28T03:06:24.841Z][DEBUG]-MQTT connection attempt. {"attemptId": "sbXW", "clientId": "zohan_Core"}
[2019-06-28T03:06:24.841Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:06:24.841Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:06:24.841Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:46:09.317Z][WARN]-MQTT[client] dial tcp 52.196.81.83:8883: i/o timeout
[2019-06-28T03:46:09.317Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:46:25.26Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:46:25.26Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:46:25.26Z][DEBUG]-Disconnecting client
[2019-06-28T03:46:25.261Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:46:25.261Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:46:25.261Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "sbXW", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:46:25.261Z][DEBUG]-MQTT connection attempt. {"attemptId": "nTLn", "clientId": "zohan_Core"}
[2019-06-28T03:46:25.261Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:46:25.261Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:46:25.261Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:46:40.266Z][WARN]-MQTT[client] dial tcp 13.231.29.48:8883: i/o timeout
[2019-06-28T03:46:40.266Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:46:56.262Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:46:56.262Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:46:56.262Z][DEBUG]-Disconnecting client
[2019-06-28T03:46:56.262Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:46:56.262Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:46:56.263Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "nTLn", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:46:57.263Z][DEBUG]-MQTT connection attempt. {"attemptId": "qkJH", "clientId": "zohan_Core"}
[2019-06-28T03:46:57.263Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:46:57.264Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:46:57.264Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:47:12.307Z][WARN]-MQTT[client] dial tcp 54.178.150.112:8883: i/o timeout
[2019-06-28T03:47:12.308Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:47:28.264Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:47:28.264Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:47:28.264Z][DEBUG]-Disconnecting client
[2019-06-28T03:47:28.265Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:47:28.265Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:47:28.265Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "qkJH", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:47:28.265Z][DEBUG]-MQTT connection attempt. {"attemptId": "DTsS", "clientId": "zohan_Core"}
[2019-06-28T03:47:28.265Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:47:28.265Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:47:28.265Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:47:43.27Z][WARN]-MQTT[client] dial tcp 52.196.224.122:8883: i/o timeout
[2019-06-28T03:47:43.27Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:47:59.266Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:47:59.266Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:47:59.266Z][DEBUG]-Disconnecting client
[2019-06-28T03:47:59.266Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:47:59.266Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:47:59.266Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "DTsS", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:48:02.267Z][DEBUG]-MQTT connection attempt. {"attemptId": "EkzV", "clientId": "zohan_Core"}
[2019-06-28T03:48:02.267Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:48:02.267Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:48:02.267Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:48:17.325Z][WARN]-MQTT[client] dial tcp 52.199.190.37:8883: i/o timeout
[2019-06-28T03:48:17.325Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:48:33.268Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:48:33.268Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:48:33.268Z][DEBUG]-Disconnecting client
[2019-06-28T03:48:33.268Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:48:33.268Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:48:33.268Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "EkzV", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:48:45.269Z][DEBUG]-MQTT connection attempt. {"attemptId": "bRjP", "clientId": "zohan_Core"}
[2019-06-28T03:48:45.269Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:48:45.269Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:48:45.269Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:49:00.275Z][WARN]-MQTT[client] dial tcp 52.192.233.211:8883: i/o timeout
[2019-06-28T03:49:00.275Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:49:16.27Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:49:16.27Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:49:16.27Z][DEBUG]-Disconnecting client
[2019-06-28T03:49:16.27Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:49:16.27Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:49:16.27Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "bRjP", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:49:16.271Z][DEBUG]-MQTT connection attempt. {"attemptId": "HyAU", "clientId": "zohan_Core"}
[2019-06-28T03:49:16.271Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:49:16.271Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:49:16.271Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:49:31.333Z][WARN]-MQTT[client] dial tcp 52.192.233.211:8883: i/o timeout
[2019-06-28T03:49:31.333Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:49:47.271Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:49:47.271Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:49:47.271Z][DEBUG]-Disconnecting client
[2019-06-28T03:49:47.272Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:49:47.272Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:49:47.272Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "HyAU", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:50:14.272Z][DEBUG]-MQTT connection attempt. {"attemptId": "suqf", "clientId": "zohan_Core"}
[2019-06-28T03:50:14.273Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:50:14.273Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:50:14.273Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:50:29.278Z][WARN]-MQTT[client] dial tcp 52.199.190.37:8883: i/o timeout
[2019-06-28T03:50:29.278Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:50:45.274Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:50:45.274Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:50:45.274Z][DEBUG]-Disconnecting client
[2019-06-28T03:50:45.274Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:50:45.274Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:50:45.274Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "suqf", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:51:29.275Z][DEBUG]-MQTT connection attempt. {"attemptId": "YfqT", "clientId": "zohan_Core"}
[2019-06-28T03:51:29.275Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:51:29.275Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:51:29.275Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:51:44.314Z][WARN]-MQTT[client] dial tcp 52.199.190.37:8883: i/o timeout
[2019-06-28T03:51:44.315Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:52:00.276Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:52:00.276Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:52:00.276Z][DEBUG]-Disconnecting client
[2019-06-28T03:52:00.276Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:52:00.276Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:52:00.276Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "YfqT", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:52:56.277Z][DEBUG]-MQTT connection attempt. {"attemptId": "DIBy", "clientId": "zohan_Core"}
[2019-06-28T03:52:56.277Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:52:56.277Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:52:56.277Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:53:11.338Z][WARN]-MQTT[client] dial tcp 52.196.81.83:8883: i/o timeout
[2019-06-28T03:53:11.338Z][WARN]-MQTT[client] Failed to connect to a broker
[2019-06-28T03:53:27.278Z][DEBUG]-Marking connection request as invalid
[2019-06-28T03:53:27.278Z][DEBUG]-Disconnect client {"force": true}
[2019-06-28T03:53:27.278Z][DEBUG]-Disconnecting client
[2019-06-28T03:53:27.278Z][WARN]-MQTT[store] Trying to close memory store, but not open
[2019-06-28T03:53:27.278Z][DEBUG]-Releasing lock for connection attempt
[2019-06-28T03:53:27.278Z][WARN]-MQTT connection attempt failed and will be retried. {"attemptId": "DIBy", "clientId": "zohan_Core", "errorString": "operation timed out"}
[2019-06-28T03:53:38.279Z][DEBUG]-MQTT connection attempt. {"attemptId": "RAeH", "clientId": "zohan_Core"}
[2019-06-28T03:53:38.279Z][DEBUG]-New MQTT connection attempt
[2019-06-28T03:53:38.279Z][DEBUG]-Acquired lock for connection attempt
[2019-06-28T03:53:38.279Z][DEBUG]-Disconnect client {"force": false}
[2019-06-28T03:53:53.285Z][WARN]-MQTT[client] dial tcp 13.231.29.48:8883: i/o timeout
[2019-06-28T03:53:53.285Z][WARN]-MQTT[client] Failed to connect to a broker
You can use AWS MQTT on port 443 which is usually available. To use this port http header value "application protocol name" needs to be set to “x-amzn-mqtt-ca”. Please read more on this here:
https://aws.amazon.com/blogs/iot/mqtt-with-tls-client-authentication-on-port-443-why-it-is-useful-and-how-it-works/
Greengrass has its own MQTT broker.
If you want to connect MQTT clients to AWS Greengrass, you have to follow their
directions at
https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-gs.html
We have FAILED to connect mosquitto client to Greengrass as documented at
https://forums.aws.amazon.com/thread.jspa?threadID=305032&tstart=0
(which you will likely only see if you login to AWS).
VPN connection created successfully on iOS 10 and also API request executes successfully.
Also, VPN connection created successfully on iOS 11.3 and 11.4 but API request get failed and showing below error:
2018-06-06 15:50:42.366512+0800 myAPP[555:197322] [] nw_path_evaluator_request_nexus_and_stats NECP_CLIENT_ACTION_REQUEST_NEXUS_INSTANCE [65: No route to host]
2018-06-06 15:50:42.366629+0800 myAPP[555:197322] [] nw_endpoint_flow_setup_channel [33 192.168.0.1:8000 in_progress channel-flow (satisfied)] failed to request nexus instance: Error Domain=kNWErrorDomainPOSIX Code=65 "No route to host" UserInfo={NSDescription=No route to host}
2018-06-06 15:50:42.366734+0800 myAPP[555:197322] TIC TCP Conn Failed [18:0x1d0374580]: 1:65 Err(65)
2018-06-06 15:50:42.366808+0800 myAPP[555:197322] Task <2FDCE10C-8CB4-469D-AAE6-E9307A68069D>.<1> HTTP load failed (error code: -1004 [1:65])
2018-06-06 15:50:42.367049+0800 myAPP[555:197506] Task <2FDCE10C-8CB4-469D-AAE6-E9307A68069D>.<1> finished with error - code: -1004
Error-Optional(Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x1d0650f80
{Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=65, _kCFStreamErrorDomainKey=1}}
Thanks