This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Failed to connect to cloud, error -7

Hi!

Running the Asset-Tracker routine will fail to connect to the cloud(ncs1.3.0). The serial port displays an error say Failed to connect to cloud, error -7.

[13:59:54.870]←◆[00:01:13.570,983]  <dbg> nrf_cloud_transport.nct_mqtt_evt_handler: MQTT_EVT_CONNACK: result -111 
[00:01:13.580,261]  <dbg> nrf_cloud.nfsm_set_current_state_and_notify: state: 1 
[00:01:13.587,921]  <dbg> nrf_cloud.api_event_handler: NRF_CLOUD_EVT_ERROR: -111 
[00:01:13.595,672]  <inf> asset_tracker: CLOUD_EVT_ERROR 

[13:59:55.399]←◆[00:01:14.101,501]  <dbg> nrf_cloud.nrf_cloud_run: Socket error: POLLNVAL 
[00:01:14.108,642]  <dbg> nrf_cloud.nrf_cloud_run: The cloud socket was unexpectedly closed. 
[00:01:14.117,401]  <inf> asset_tracker: CLOUD_EVT_DISCONNECTED: 2 
[00:01:14.123,931]  <inf> asset_tracker: Cloud connection closed. 
[00:01:14.130,371]  <inf> asset_tracker: This can occur during initial nRF Cloud provisioning. 
[00:01:14.139,312]  <inf> asset_tracker: Attempting reconnect in 10 seconds... 
[00:01:14.146,881]  <dbg> nrf_cloud_transport.nct_disconnect: nct_disconnect 

[14:00:05.444]←◆[00:01:24.146,942]  <inf> asset_tracker: Connecting to cloud, attempt 2 of 8 
[00:01:24.154,388]  <inf> asset_tracker: Cloud connection request sent. 
[00:01:24.161,346]  <inf> asset_tracker: Connection response timeout is set to 30 seconds. 
[00:01:24.169,982]  <inf> asset_tracker: CLOUD_EVT_CONNECTING 

[14:00:06.527]←◆[00:01:25.228,881]  <dbg> nrf_cloud_transport.nct_connect: IPv4 address: 3.223.232.82 

[14:00:35.146]←◆+CSC
[14:00:35.178]←◆ON: 0
[00:01:53.849,548]  <dbg> lte_lc.at_handler: +CSCON notification 

[14:02:51.144]←◆[00:0
[14:02:51.170]←◆4:09.852,294]  <dbg> nrf_cloud_transport.nct_mqtt_connect: mqtt_connect failed -22 
[00:04:09.860,687]  <inf> asset_tracker: CLOUD_EVT_CONNECTING 
[00:04:09.866,790] <err> asset_tracker: Failed to connect to cloud, error -7 
[00:04:09.874,511] <err> asset_tracker: Ensure device has a valid private key 
[00:04:09.882,324] <err> asset_tracker: Device will reboot in 300 seconds 
[00:04:09.889,801] <err> asset_tracker: LTE link disconnect 

Error -7 is Invalid private key.

/**@brief Cloud connect results. */
enum cloud_connect_result {
	CLOUD_CONNECT_RES_SUCCESS = 0,

	CLOUD_CONNECT_RES_ERR_NOT_INITD = -1,
	CLOUD_CONNECT_RES_ERR_INVALID_PARAM = -2,
	CLOUD_CONNECT_RES_ERR_NETWORK = -3,
	CLOUD_CONNECT_RES_ERR_BACKEND = -4,
	CLOUD_CONNECT_RES_ERR_MISC = -5,
	CLOUD_CONNECT_RES_ERR_NO_MEM = -6,
	/* Invalid private key */
	CLOUD_CONNECT_RES_ERR_PRV_KEY = -7,
	/* Invalid CA or client cert */
	CLOUD_CONNECT_RES_ERR_CERT = -8,
	/* Other cert issue */
	CLOUD_CONNECT_RES_ERR_CERT_MISC = -9,
	/* Timeout, SIM card may be out of data */
	CLOUD_CONNECT_RES_ERR_TIMEOUT_NO_DATA = -10,
	CLOUD_CONNECT_RES_ERR_ALREADY_CONNECTED = -11,
};

It worked fine yesterday, but it's been running today with this error. 

I tried the NCS1.2.0 routine and it worked fine

Parents Reply Children
Related