The device is unable to connect to the server using certificate-based authentication

Description

Problem with certificate-based authentication

I’m have a problem with certificate-based authentication.
I used the certificate_provisioning project code and referred to the documentation, aiming to implement certificate-based authentication.
However, the device consistently fails to connect to the server. I have repeatedly reviewed my approach and haven’t found any omissions.

The following is the device's log information.
*** Booting MCUboot v2.1.0-dev-ae1ee57f3906 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v1.2.5
 : Jumping to the first image slot
[00:00:00.526,916] <inf> littlefs: littlefs partition at /lfs1
[00:00:00.526,977] <inf> littlefs: LittleFS version 2.9, disk version 2.1
[00:00:00.527,160] <inf> littlefs: FS at flash-controller@39000:0xf0000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.527,160] <inf> littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.528,472] <inf> littlefs: Automount /lfs1 succeeded
*** Booting My Application v1.2.5-1603e1689b71 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***
[00:00:00.536,193] <dbg> cert_provisioning: main: Start certificate provisioning sample
[00:00:00.536,224] <inf> golioth_samples: Bringing up network interface
[00:00:00.536,224] <inf> golioth_samples: Waiting to obtain IP address
[00:02:34.789,428] <inf> lte_monitor: Network: Searching
[00:02:37.051,910] <inf> lte_monitor: Network: Registered (roaming)
[00:02:37.055,389] <inf> cert_provisioning: Read 357 bytes from /lfs1/credentials/crt.der
[00:02:37.057,617] <inf> cert_provisioning: Read 121 bytes from /lfs1/credentials/key.der
[00:02:37.058,074] <inf> golioth_mbox: Mbox created, bufsize: 1232, num_items: 10, item_size: 112
[00:02:49.578,735] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:49.581,573] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:49.581,604] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.587,036] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:57.589,935] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.589,935] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.595,336] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:05.598,144] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.598,144] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:13.603,485] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116

How should I resolve this issue?

Expected Behavior

The device is able to connect to the server using certificate-based authentication.

Actual Behavior

The device fails to connect to the server using certificate-based authentication and returns error -116.

Environment

*** Booting My Application v1.2.5-1603e1689b71 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***

Logs and Console Output

The following is the device’s log information.
*** Booting MCUboot v2.1.0-dev-ae1ee57f3906 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v1.2.5
: Jumping to the first image slot
[00:00:00.526,916] littlefs: littlefs partition at /lfs1
[00:00:00.526,977] littlefs: LittleFS version 2.9, disk version 2.1
[00:00:00.527,160] littlefs: FS at flash-controller@39000:0xf0000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.527,160] littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.528,472] littlefs: Automount /lfs1 succeeded
*** Booting My Application v1.2.5-1603e1689b71 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***
[00:00:00.536,193] cert_provisioning: main: Start certificate provisioning sample
[00:00:00.536,224] golioth_samples: Bringing up network interface
[00:00:00.536,224] golioth_samples: Waiting to obtain IP address
[00:02:34.789,428] lte_monitor: Network: Searching
[00:02:37.051,910] lte_monitor: Network: Registered (roaming)
[00:02:37.055,389] cert_provisioning: Read 357 bytes from /lfs1/credentials/crt.der
[00:02:37.057,617] cert_provisioning: Read 121 bytes from /lfs1/credentials/key.der
[00:02:37.058,074] golioth_mbox: Mbox created, bufsize: 1232, num_items: 10, item_size: 112
[00:02:49.578,735] golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:49.581,573] golioth_coap_client_zephyr: Failed to connect: -116
[00:02:49.581,604] golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.587,036] golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:57.589,935] golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.589,935] golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.595,336] golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:05.598,144] golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.598,144] golioth_coap_client_zephyr: Failed to connect: -116
[00:03:13.603,485] golioth_coap_client_zephyr: Failed to connect to socket: -116

Hi Jack,

Welcome to the forum! Since there are a bunch of steps in the process, I sometimes find it helps to see it all happening for someone else. Could you compare your process to what is shown in the video? We recorded that just a few months ago and showed the process end-to-end. It looks like you linked to a quite old blog post (as opposed to the documentation for this feature)

Thank you very much. I’ve read that article as well, but it didn’t solve the problem for me.

From the platform, it can be seen that the device has previously connected to the platform. However, it’s unclear why the device keeps reporting errors in the logs.

Like you said, it was able to authenticate and it shows in the status that is has connected. You’re still seeing logs on an on-going basis that show the -116 error?

From the server side, it appears that you were attempting to connect prior to this project being created but after the project was created were able to connect. If you can post updated logs, we’d be interested to know if this problem persists.

Yes, initially I configured the device first and powered it on before configuring the project on the server side. If the sequence of operations matters, I have already powered off the device and then powered it on again. However, the device log still shows the -116 error, which is quite strange.


[00:00:00.527,038] <inf> littlefs: littlefs partition at /lfs1
[00:00:00.527,099] <inf> littlefs: LittleFS version 2.9, disk version 2.1
[00:00:00.527,282] <inf> littlefs: FS at flash-controller@39000:0xf0000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.527,282] <inf> littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.528,594] <inf> littlefs: Automount /lfs1 succeeded
*** Booting My Application v1.2.5-1603e1689b71 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***
[00:00:00.536,315] <dbg> cert_provisioning: main: Start certificate provisioning sample
[00:00:00.536,346] <inf> golioth_samples: Bringing up network interface
[00:00:00.536,346] <inf> golioth_samples: Waiting to obtain IP address
[00:02:26.178,833] <inf> lte_monitor: Network: Searching
[00:02:28.781,372] <inf> lte_monitor: Network: Registered (roaming)
[00:02:28.784,820] <inf> cert_provisioning: Read 357 bytes from /lfs1/credentials/crt.der
[00:02:28.787,048] <inf> cert_provisioning: Read 121 bytes from /lfs1/credentials/key.der
[00:02:28.787,536] <inf> golioth_mbox: Mbox created, bufsize: 1232, num_items: 10, item_size: 112
[00:02:41.377,136] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:41.379,913] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:41.379,913] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:49.385,223] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:49.387,329] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:49.387,329] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.392,761] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:57.401,367] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.401,397] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.406,860] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:05.408,874] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.408,874] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:13.414,245] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:13.424,896] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:13.424,926] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:21.430,389] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:21.433,135] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:21.433,135] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:29.438,507] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:29.440,704] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:29.440,734] <wrn> golioth_coap_client_zephyr: Failed to connect: -116

In addition, I’m not sure how to verify whether the device has successfully authenticated and connected to the server using the certificate. But I did see that the device once appeared as connected on the web interface.

Here is the firmware code:

/*
 * Copyright (c) 2023-2025 Golioth, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(cert_provisioning, LOG_LEVEL_DBG);

#include <golioth/client.h>
#include <samples/common/net_connect.h>
#include <zephyr/kernel.h>
#include <zephyr/net/coap.h>
#include <zephyr/device.h>
#include <zephyr/fs/fs.h>

#define CRT_PATH "/lfs1/credentials/crt.der"
#define KEY_PATH "/lfs1/credentials/key.der"

static const uint8_t tls_ca_crt[] = {
#include "golioth-systemclient-ca_crt.inc"
};

static const uint8_t tls_secondary_ca_crt[] = {
#if CONFIG_GOLIOTH_SECONDARY_CA_CRT
#include "golioth-systemclient-secondary_ca_crt.inc"
#endif
};

struct golioth_client *client;
static K_SEM_DEFINE(connected, 0, 1);

static void on_client_event(struct golioth_client *client,
                            enum golioth_client_event event,
                            void *arg)
{
    bool is_connected = (event == GOLIOTH_CLIENT_EVENT_CONNECTED);
    if (is_connected)
    {
        k_sem_give(&connected);
    }
    LOG_INF("Golioth client %s", is_connected ? "connected" : "disconnected");
}

static int load_credential_from_fs(const char *path, uint8_t **buf_p, size_t *buf_len)
{
    struct fs_file_t file;
    struct fs_dirent dirent;

    fs_file_t_init(&file);

    int err = fs_stat(path, &dirent);

    if (err < 0)
    {
        LOG_WRN("Could not stat %s, err: %d", path, err);
        goto finish;
    }
    if (dirent.type != FS_DIR_ENTRY_FILE)
    {
        LOG_ERR("%s is not a file", path);
        err = -EISDIR;
        goto finish;
    }
    if (dirent.size == 0)
    {
        LOG_ERR("%s is an empty file", path);
        err = -EINVAL;
        goto finish;
    }


    err = fs_open(&file, path, FS_O_READ);

    if (err < 0)
    {
        LOG_ERR("Could not open %s", path);
        goto finish;
    }

    /* NOTE: *buf_p is used directly by the TLS Credentials library, and so must remain
     * allocated for the life of the program.
     */

    free(*buf_p);
    *buf_p = malloc(dirent.size);

    if (*buf_p == NULL)
    {
        LOG_ERR("Could not allocate space to read credential");
        err = -ENOMEM;
        goto finish_with_file;
    }

    err = fs_read(&file, *buf_p, dirent.size);

    if (err < 0)
    {
        LOG_ERR("Could not read %s, err: %d", path, err);
        free(*buf_p);
        goto finish_with_file;
    }

    LOG_INF("Read %d bytes from %s", dirent.size, path);

    /* Set the size of the allocated buffer */
    *buf_len = dirent.size;

finish_with_file:
    fs_close(&file);

finish:
    return err;
}

int main(void)
{
    int counter = 0;

    LOG_DBG("Start certificate provisioning sample");

    net_connect();

    uint8_t *tls_client_crt = NULL;
    uint8_t *tls_client_key = NULL;
    size_t tls_client_crt_len, tls_client_key_len;

    while (1)
    {
        int ret = load_credential_from_fs(CRT_PATH, &tls_client_crt, &tls_client_crt_len);
        if (ret > 0)
        {
            ret = load_credential_from_fs(KEY_PATH, &tls_client_key, &tls_client_key_len);
            if (ret > 0)
            {
                break;
            }
        }

        k_sleep(K_SECONDS(5));
    }

    if (tls_client_crt != NULL && tls_client_key != NULL)
    {
        //LOG_HEXDUMP_INF(tls_client_crt, tls_client_crt_len, "tls_client_crt");
        //LOG_HEXDUMP_INF(tls_client_key, tls_client_key_len, "tls_client_key");
        struct golioth_client_config client_config = {
            .credentials =
                {
                    .auth_type = GOLIOTH_TLS_AUTH_TYPE_PKI,
                    .pki =
                        {
                            .ca_cert = tls_ca_crt,
                            .ca_cert_len = sizeof(tls_ca_crt),
                            .public_cert = tls_client_crt,
                            .public_cert_len = tls_client_crt_len,
                            .private_key = tls_client_key,
                            .private_key_len = tls_client_key_len,
                            .secondary_ca_cert = tls_secondary_ca_crt,
                            .secondary_ca_cert_len = sizeof(tls_secondary_ca_crt),
                        },
                },
        };

        client = golioth_client_create(&client_config);

        golioth_client_register_event_callback(client, on_client_event, NULL);
        
    }
    else
    {
        LOG_ERR("Error reading certificate credentials from filesystem");
    }

    k_sem_take(&connected, K_FOREVER);

    while (true)
    {
        LOG_INF("Sending hello! %d", counter);

        ++counter;
        k_sleep(K_SECONDS(5));
    }

    return 0;
}

Additionally, if needed, I can share the certificate I am currently using for testing with you. However, you’ll need to let me know how I should send it to you, as I haven’t found a way to upload attachments on the forum.

Hey @ChrisGammell, it’s very weird. After a period of -116 errors, the device successfully connected to the server.
The detailed logs are as follows:

*** Booting MCUboot v2.1.0-dev-ae1ee57f3906 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v1.2.5
I: Jumping to the first image slot
[00:00:00.540,649] <inf> littlefs: littlefs partition at /lfs1
[00:00:00.540,710] <inf> littlefs: LittleFS version 2.9, disk version 2.1
[00:00:00.540,893] <inf> littlefs: FS at flash-controller@39000:0xf0000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.540,893] <inf> littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.541,778] <inf> littlefs: Automount /lfs1 succeeded
*** Booting My Application v1.2.5-fa9cd1cc1e1b ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***
[00:00:00.549,621] <dbg> cert_provisioning: main: Start certificate provisioning sample
[00:00:00.549,652] <inf> golioth_samples: Bringing up network interface
[00:00:00.549,682] <inf> golioth_samples: Waiting to obtain IP address
uart:~$ 
[00:00:00.540,924] <inf> littlefs: littlefs partition at /lfs1
[00:00:00.540,985] <inf> littlefs: LittleFS version 2.9, disk version 2.1
[00:00:00.541,168] <inf> littlefs: FS at flash-controller@39000:0xf0000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.541,168] <inf> littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.542,053] <inf> littlefs: Automount /lfs1 succeeded
*** Booting My Application v1.2.5-fa9cd1cc1e1b ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***
[00:00:00.549,896] <dbg> cert_provisioning: main: Start certificate provisioning sample
[00:00:00.549,926] <inf> golioth_samples: Bringing up network interface
[00:00:00.549,957] <inf> golioth_samples: Waiting to obtain IP address
[00:01:13.896,789] <inf> lte_monitor: Network: Searching
[00:01:16.757,293] <inf> lte_monitor: Network: Registered (roaming)
[00:01:16.760,192] <inf> cert_provisioning: Read 340 bytes from /lfs1/credentials/crt.der
[00:01:16.761,840] <inf> cert_provisioning: Read 121 bytes from /lfs1/credentials/key.der
[00:01:16.762,359] <inf> golioth_mbox: Mbox created, bufsize: 1232, num_items: 10, item_size: 112
[00:01:29.357,574] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:29.360,656] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:29.360,687] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:37.366,638] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:37.369,750] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:37.369,750] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:45.375,457] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:45.378,570] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:45.378,570] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:53.384,399] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:53.387,512] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:53.387,542] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:01.393,341] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:01.396,606] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:01.396,606] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:09.402,557] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:09.405,670] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:09.405,670] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:17.411,437] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:17.414,672] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:17.414,703] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:25.420,440] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:25.423,553] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:25.423,553] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:33.725,799] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:33.728,912] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:33.728,942] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:41.734,649] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:41.737,762] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:41.737,762] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:49.743,530] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:49.746,765] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:49.746,795] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.856,567] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:57.859,832] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:57.859,832] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.865,692] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:05.868,804] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:05.868,835] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:13.874,633] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:13.877,746] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:13.877,777] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:21.883,483] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:21.886,596] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:21.886,627] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:29.892,456] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:29.895,690] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:29.895,721] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:37.901,458] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:37.904,571] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:37.904,602] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:45.910,369] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:45.913,604] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:45.913,635] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:53.919,311] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:53.922,576] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:53.922,576] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:01.928,466] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:01.931,579] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:01.931,610] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:09.937,591] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:09.940,704] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:09.940,734] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:17.946,716] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:17.949,829] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:17.949,829] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:25.955,566] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:25.958,679] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:25.958,709] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:33.964,477] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:33.967,742] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:33.967,742] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:41.973,907] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:41.977,020] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:41.977,020] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:49.982,940] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:49.986,022] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:49.986,053] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:57.992,034] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:57.995,300] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:57.995,300] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:06.001,342] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:06.004,425] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:06.004,455] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:14.010,223] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:14.013,305] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:14.013,336] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:22.019,042] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:22.022,155] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:22.022,186] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:30.028,015] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:30.031,127] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:30.031,127] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:38.036,895] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:38.040,008] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:38.040,008] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:46.045,806] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:46.048,919] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:46.048,919] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:54.055,236] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:05:54.058,349] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:05:54.058,349] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:02.064,117] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:02.067,260] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:02.067,260] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:10.073,272] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:10.076,385] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:10.076,416] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:18.082,122] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:18.085,296] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:18.085,296] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:26.091,064] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:26.094,177] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:26.094,177] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:34.648,864] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:34.651,977] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:34.652,008] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:42.657,775] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:42.661,041] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:42.661,041] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:50.666,839] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:50.669,952] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:50.669,982] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:58.675,872] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:06:58.678,100] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:06:58.678,131] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:06.684,143] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:06.693,054] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:06.693,084] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:14.699,066] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:14.701,538] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:14.701,568] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:22.707,305] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:22.716,033] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:22.716,064] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:30.721,984] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:30.724,243] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:30.724,273] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:38.790,039] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:38.793,151] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:38.793,151] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:46.798,980] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:46.802,093] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:46.802,124] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:54.808,013] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:07:54.810,485] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:07:54.810,516] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:02.816,375] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:02.818,878] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:02.818,878] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:10.824,584] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:10.826,934] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:10.826,965] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:18.832,885] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:18.835,388] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:18.835,388] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:26.841,156] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:26.843,414] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:26.843,414] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:35.033,752] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:35.037,017] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:35.037,017] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:43.042,816] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:43.045,043] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:43.045,043] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:51.050,903] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:51.053,405] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:51.053,405] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:59.059,173] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:08:59.062,377] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:08:59.062,377] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:07.585,754] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:07.588,867] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:07.588,867] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:15.594,635] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:15.597,778] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:15.597,778] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:23.603,576] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:23.606,689] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:23.606,719] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:31.612,457] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:31.615,722] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:31.615,722] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:39.621,459] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:39.624,572] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:39.624,603] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:47.630,462] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:47.633,544] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:47.633,575] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:55.639,251] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:09:55.642,364] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:09:55.642,364] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:10:03.648,132] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:10:03.651,397] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:10:03.651,397] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:10:11.652,191] <inf> golioth_coap_client_zephyr: Golioth CoAP client connected
[00:10:11.653,656] <inf> cert_provisioning: Golioth client connected
[00:10:11.653,656] <inf> golioth_coap_client_zephyr: Entering CoAP I/O loop
[00:10:12.177,978] <dbg> cert_provisioning: test_data_push_cbor: index: 0 Test data successfully pushed
[00:10:22.876,373] <dbg> cert_provisioning: test_data_push_cbor: index: 1 Test data successfully pushed
[00:10:33.716,705] <dbg> cert_provisioning: test_data_push_cbor: index: 2 Test data successfully pushed
[00:10:44.589,050] <dbg> cert_provisioning: test_data_push_cbor: index: 3 Test data successfully pushed
[00:10:55.478,424] <dbg> cert_provisioning: test_data_push_cbor: index: 4 Test data successfully pushed
[00:11:06.357,788] <dbg> cert_provisioning: test_data_push_cbor: index: 5 Test data successfully pushed
[00:11:17.238,128] <dbg> cert_provisioning: test_data_push_cbor: index: 6 Test data successfully pushed
[00:11:28.109,466] <dbg> cert_provisioning: test_data_push_cbor: index: 7 Test data successfully pushed
[00:11:39.013,824] <dbg> cert_provisioning: test_data_push_cbor: index: 8 Test data successfully pushed
[00:11:49.926,055] <dbg> cert_provisioning: test_data_push_cbor: index: 9 Test data successfully pushed
[00:12:00.759,490] <dbg> cert_provisioning: test_data_push_cbor: index: 10 Test data successfully pushed
[00:12:11.639,862] <dbg> cert_provisioning: test_data_push_cbor: index: 11 Test data successfully pushed
[00:12:22.520,202] <dbg> cert_provisioning: test_data_push_cbor: index: 12 Test data successfully pushed
[00:12:33.400,573] <dbg> cert_provisioning: test_data_push_cbor: index: 13 Test data successfully pushed
[00:12:44.286,926] <dbg> cert_provisioning: test_data_push_cbor: index: 14 Test data successfully pushed
[00:12:55.161,285] <dbg> cert_provisioning: test_data_push_cbor: index: 15 Test data successfully pushed
[00:13:06.054,626] <dbg> cert_provisioning: test_data_push_cbor: index: 16 Test data successfully pushed
[00:13:16.968,963] <dbg> cert_provisioning: test_data_push_cbor: index: 17 Test data successfully pushed
[00:13:27.807,312] <dbg> cert_provisioning: test_data_push_cbor: index: 18 Test data successfully pushed
[00:13:38.680,633] <dbg> cert_provisioning: test_data_push_cbor: index: 19 Test data successfully pushed
[00:13:49.592,987] <dbg> cert_provisioning: test_data_push_cbor: index: 20 Test data successfully pushed
[00:14:00.441,345] <dbg> cert_provisioning: test_data_push_cbor: index: 21 Test data successfully pushed
[00:14:11.321,685] <dbg> cert_provisioning: test_data_push_cbor: index: 22 Test data successfully pushed
[00:14:22.202,026] <dbg> cert_provisioning: test_data_push_cbor: index: 23 Test data successfully pushed
[00:14:33.099,395] <dbg> cert_provisioning: test_data_push_cbor: index: 24 Test data successfully pushed
[00:14:44.005,767] <dbg> cert_provisioning: test_data_push_cbor: index: 25 Test data successfully pushed
[00:14:54.845,123] <dbg> cert_provisioning: test_data_push_cbor: index: 26 Test data successfully pushed
[00:15:05.725,463] <dbg> cert_provisioning: test_data_push_cbor: index: 27 Test data successfully pushed
[00:15:16.603,790] <dbg> cert_provisioning: test_data_push_cbor: index: 28 Test data successfully pushed
[00:15:27.487,152] <dbg> cert_provisioning: test_data_push_cbor: index: 29 Test data successfully pushed
[00:15:38.356,536] <dbg> cert_provisioning: test_data_push_cbor: index: 30 Test data successfully pushed
[00:15:49.276,885] <dbg> cert_provisioning: test_data_push_cbor: index: 31 Test data successfully pushed
[00:16:00.142,211] <dbg> cert_provisioning: test_data_push_cbor: index: 32 Test data successfully pushed
[00:16:11.048,553] <dbg> cert_provisioning: test_data_push_cbor: index: 33 Test data successfully pushed
[00:16:21.885,864] <dbg> cert_provisioning: test_data_push_cbor: index: 34 Test data successfully pushed
[00:16:32.770,233] <dbg> cert_provisioning: test_data_push_cbor: index: 35 Test data successfully pushed
[00:16:43.678,588] <dbg> cert_provisioning: test_data_push_cbor: index: 36 Test data successfully pushed
[00:16:54.558,959] <dbg> cert_provisioning: test_data_push_cbor: index: 37 Test data successfully pushed
[00:17:05.407,287] <dbg> cert_provisioning: test_data_push_cbor: index: 38 Test data successfully pushed
[00:17:16.287,628] <dbg> cert_provisioning: test_data_push_cbor: index: 39 Test data successfully pushed
[00:17:27.184,997] <dbg> cert_provisioning: test_data_push_cbor: index: 40 Test data successfully pushed
[00:17:38.085,327] <dbg> cert_provisioning: test_data_push_cbor: index: 41 Test data successfully pushed
[00:17:48.937,683] <dbg> cert_provisioning: test_data_push_cbor: index: 42 Test data successfully pushed
[00:17:59.809,020] <dbg> cert_provisioning: test_data_push_cbor: index: 43 Test data successfully pushed
[00:18:10.696,380] <dbg> cert_provisioning: test_data_push_cbor: index: 44 Test data successfully pushed
[00:18:21.562,744] <dbg> cert_provisioning: test_data_push_cbor: index: 45 Test data successfully pushed
[00:18:32.442,077] <dbg> cert_provisioning: test_data_push_cbor: index: 46 Test data successfully pushed
[00:18:43.362,426] <dbg> cert_provisioning: test_data_push_cbor: index: 47 Test data successfully pushed
[00:18:54.227,783] <dbg> cert_provisioning: test_data_push_cbor: index: 48 Test data successfully pushed
[00:19:05.133,117] <dbg> cert_provisioning: test_data_push_cbor: index: 49 Test data successfully pushed
[00:19:16.006,469] <dbg> cert_provisioning: test_data_push_cbor: index: 50 Test data successfully pushed
[00:19:26.853,820] <dbg> cert_provisioning: test_data_push_cbor: index: 51 Test data successfully pushed
[00:19:37.975,189] <dbg> cert_provisioning: test_data_push_cbor: index: 52 Test data successfully pushed
[00:19:48.621,520] <dbg> cert_provisioning: test_data_push_cbor: index: 53 Test data successfully pushed
[00:19:59.494,873] <dbg> cert_provisioning: test_data_push_cbor: index: 54 Test data successfully pushed
[00:20:10.375,213] <dbg> cert_provisioning: test_data_push_cbor: index: 55 Test data successfully pushed
[00:20:21.270,538] <dbg> cert_provisioning: test_data_push_cbor: index: 56 Test data successfully pushed
[00:20:32.171,905] <dbg> cert_provisioning: test_data_push_cbor: index: 57 Test data successfully pushed
[00:20:44.172,515] <wrn> cert_provisioning: index: 58 Failed to push test data: 9
[00:20:44.810,729] <wrn> golioth_coap_client: 1 resends in last 10 seconds
[00:20:55.187,652] <dbg> cert_provisioning: test_data_push_cbor: index: 58 Test data successfully pushed
[00:21:06.058,959] <dbg> cert_provisioning: test_data_push_cbor: index: 59 Test data successfully pushed
[00:21:16.939,300] <dbg> cert_provisioning: test_data_push_cbor: index: 60 Test data successfully pushed
[00:21:27.833,679] <dbg> cert_provisioning: test_data_push_cbor: index: 61 Test data successfully pushed
[00:21:39.351,104] <dbg> cert_provisioning: test_data_push_cbor: index: 62 Test data successfully pushed
[00:21:50.219,421] <dbg> cert_provisioning: test_data_push_cbor: index: 63 Test data successfully pushed
[00:22:01.099,761] <dbg> cert_provisioning: test_data_push_cbor: index: 64 Test data successfully pushed
[00:22:11.980,102] <dbg> cert_provisioning: test_data_push_cbor: index: 65 Test data successfully pushed
[00:22:22.859,436] <dbg> cert_provisioning: test_data_push_cbor: index: 66 Test data successfully pushed
[00:22:33.739,776] <dbg> cert_provisioning: test_data_push_cbor: index: 67 Test data successfully pushed
[00:22:44.635,131] <dbg> cert_provisioning: test_data_push_cbor: index: 68 Test data successfully pushed
[00:22:55.547,393] <dbg> cert_provisioning: test_data_push_cbor: index: 69 Test data successfully pushed
[00:23:06.380,828] <dbg> cert_provisioning: test_data_push_cbor: index: 70 Test data successfully pushed
[00:23:17.292,175] <dbg> cert_provisioning: test_data_push_cbor: index: 71 Test data successfully pushed
[00:23:28.173,522] <dbg> cert_provisioning: test_data_push_cbor: index: 72 Test data successfully pushed
[00:23:39.021,881] <dbg> cert_provisioning: test_data_push_cbor: index: 73 Test data successfully pushed
[00:23:49.902,221] <dbg> cert_provisioning: test_data_push_cbor: index: 74 Test data successfully pushed
[00:24:00.992,584] <dbg> cert_provisioning: test_data_push_cbor: index: 75 Test data successfully pushed
[00:24:11.678,924] <dbg> cert_provisioning: test_data_push_cbor: index: 76 Test data successfully pushed
[00:24:22.590,301] <dbg> cert_provisioning: test_data_push_cbor: index: 77 Test data successfully pushed
[00:24:33.456,665] <dbg> cert_provisioning: test_data_push_cbor: index: 78 Test data successfully pushed
[00:24:44.334,991] <dbg> cert_provisioning: test_data_push_cbor: index: 79 Test data successfully pushed
[00:24:55.176,330] <dbg> cert_provisioning: test_data_push_cbor: index: 80 Test data successfully pushed

Screenshot from the web page


What’s going on here? :thinking:

In addition, it’s not that every time the device is powered on again it can eventually connect to the server after a period of -116 errors. The success rate is very low.

*** Booting MCUboot v2.1.0-dev-ae1ee57f3906 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v1.2.5
I: Jumping to the first image slot
[00:00:00.540,466] <inf> littlefs: littlefs partition at /lfs1
[00:00:00.540,527] <inf> littlefs: LittleFS version 2.9, disk version 2.1
[00:00:00.540,710] <inf> littlefs: FS at flash-controller@39000:0xf0000 is 6 0x1000-byte blocks with 512 cycle
[00:00:00.540,710] <inf> littlefs: partition sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.541,595] <inf> littlefs: Automount /lfs1 succeeded
*** Booting My Application v1.2.5-fa9cd1cc1e1b ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
*** Golioth Firmware SDK v0.18.0 ***
[00:00:00.549,438] <dbg> cert_provisioning: main: Start certificate provisioning sample
[00:00:00.549,468] <inf> golioth_samples: Bringing up network interface
[00:00:00.549,499] <inf> golioth_samples: Waiting to obtain IP address
[00:01:16.662,628] <inf> lte_monitor: Network: Searching
[00:01:25.328,552] <inf> lte_monitor: Network: Registered (roaming)
[00:01:25.331,451] <inf> cert_provisioning: Read 340 bytes from /lfs1/credentials/crt.der
[00:01:25.333,068] <inf> cert_provisioning: Read 121 bytes from /lfs1/credentials/key.der
[00:01:25.333,618] <inf> golioth_mbox: Mbox created, bufsize: 1232, num_items: 10, item_size: 112
[00:01:37.846,771] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:37.849,151] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:37.849,182] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:45.854,980] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:45.857,208] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:45.857,238] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:53.863,464] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:01:53.865,783] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:01:53.865,814] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:01.871,887] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:01.874,298] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:01.874,298] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:09.880,035] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:09.882,415] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:09.882,446] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:17.888,610] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:17.890,869] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:17.890,869] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:25.896,789] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:25.899,047] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:25.899,047] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:35.651,031] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:35.653,289] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:35.653,289] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:43.659,088] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:43.661,346] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:43.661,376] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:51.667,510] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:51.669,769] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:51.669,769] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:59.675,476] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:02:59.677,764] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:02:59.677,795] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:07.683,654] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:07.686,035] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:07.686,065] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:15.692,260] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:15.694,671] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:15.694,671] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:23.700,836] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:23.703,063] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:23.703,094] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:31.708,801] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:31.711,181] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:31.711,181] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:39.716,888] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:39.719,268] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:39.719,268] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:47.725,097] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:47.727,478] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:47.727,508] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:55.733,367] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:03:55.735,687] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:03:55.735,717] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:03.741,424] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:03.743,804] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:03.743,835] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:11.749,725] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:11.751,953] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:11.751,983] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:19.758,148] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:19.760,620] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:19.760,650] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:04:27.766,448] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:04:27.768,951] <err> golioth_coap_client_zephyr: Failed to connect: -116
.....................

[00:31:05.575,653] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:05.575,653] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:13.729,095] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:31:13.732,208] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:13.732,238] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:21.738,067] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:31:21.740,295] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:21.740,325] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:30.865,386] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:31:30.868,499] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:30.868,499] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:38.897,979] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:31:38.901,062] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:38.901,092] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:46.906,829] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:31:46.910,064] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:46.910,095] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:54.915,863] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:31:54.919,097] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:31:54.919,128] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:02.924,835] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:02.928,070] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:02.928,070] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:11.098,510] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:11.101,623] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:11.101,623] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:19.107,452] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:19.110,565] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:19.110,565] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:27.138,153] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:27.141,265] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:27.141,265] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:35.147,094] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:35.150,329] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:35.150,360] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:43.156,066] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:43.159,332] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:43.159,332] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:51.165,130] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:51.168,365] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:51.168,395] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:59.174,102] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:32:59.177,185] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:32:59.177,215] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:07.183,013] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:07.186,126] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:07.186,126] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:15.191,864] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:15.194,976] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:15.194,976] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:23.650,573] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:23.653,656] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:23.653,686] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:31.659,576] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:31.662,689] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:31.662,689] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:40.447,174] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:40.450,439] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:40.450,439] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:48.456,146] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:48.459,259] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:48.459,259] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:56.465,148] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:33:56.468,261] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:33:56.468,261] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:04.474,243] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:04.477,355] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:04.477,355] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:12.483,215] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:12.486,328] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:12.486,328] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:20.492,095] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:20.495,330] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:20.495,361] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:28.501,190] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:28.504,302] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:28.504,333] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:36.510,345] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:36.513,488] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:36.513,488] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:44.748,840] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:44.751,953] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:44.751,953] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:52.757,751] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:34:52.760,864] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:34:52.760,864] <wrn> golioth_coap_client_zephyr: Failed to connect: -116
[00:35:00.766,632] <err> golioth_coap_client_zephyr: Failed to connect to socket: -116
[00:35:00.769,897] <err> golioth_coap_client_zephyr: Failed to connect: -116
[00:35:00.769,897] <wrn> golioth_coap_client_zephyr: Failed to connect: -116

Hey @JackLan,

we’re suspecting this might be a network-related issue. Would you mind testing one of our examples and using Pre-Shared Keys (PSK-ID and PSK) for authentication to see if the behavior changes?