getting started, device never downloads release

I’m using the OpenBalena Getting Started guide. I’ve gotten most of the way through it, but have hit a snag. My device never seems to actually go beyond the ‘Supervisor started’ phase.

I’ve added the device successfully (although it reports its status as ‘idling’:

ID UUID    DEVICE NAME    DEVICE TYPE     FLEET         STATUS IS ONLINE SUPERVISOR VERSION OS VERSION       DASHBOARD URL
1  0fc45ed delicate-ranch raspberrypi4-64 admin/testing N/a    true      13.1.11            balenaOS 2.98.33 https://dashboard.myurl/devices/full-uuid/summary
➜  openbalenatest balena device 0fc45ed
== DELICATE RANCH
ID:                 1
DEVICE TYPE:        raspberrypi4-64
STATUS:             idle
IS ONLINE:          true
MAC ADDRESS:        mac-address
FLEET:              admin/test
LAST SEEN:          2022-06-28T19:28:39.989Z
UUID:               full-uuid
COMMIT:             N/a
SUPERVISOR VERSION: 13.1.11
IS WEB ACCESSIBLE:  false
OS VERSION:         balenaOS 2.98.33

I’ve deployed the recommended ‘Idling’ release successfully, as can be seen with the balena releases command, and as was clear at the time with the message [Success] Deploy succeeded! [Success] Release: b14bc149713ec52ab03faf74a2efc2b4 and unicorn.

However, when I take the next step, to view the logs, I only see the Supervisor starting message, and then the tail shuts down after several minutes of no activity:

➜  openbalenatest balena logs  0fc45ed --tail
[Logs]    [6/28/2022, 2:33:25 PM] Supervisor starting

I’ve rebooted the device, re-deployed the release, but there is no change.

According to the Getting Started guide, I should see numerous messages after ‘Supervisor starting’ such as:

balena logs 59d7700 --tail
[Logs]    [10/28/2020, 11:40:16 AM] Supervisor starting
[Logs]    [10/28/2020, 11:40:50 AM] Creating network 'default'
[Logs]    [10/28/2020, 11:42:38 AM] Creating volume 'resin-data'
[Logs]    [10/28/2020, 11:42:40 AM] Downloading image …
…
[Logs]    [10/28/2020, 11:44:00 AM] [main] Idling...

I’d appreciate any help in figuring out what is preventing the device from picking up the new release.

Thank you!

Hey @kathryn-forsythe
Glad to know that you are using open balena. Could you please get some more information for us:

  1. Can you look into the device logs by SSH’ing into the device and running journalctl --unit=balena-supervisor --unit=resin-supervisor
  2. Can you confirm which CLI version are you using by running balena version ?

Hi @otaviojacobi

Thanks for looking into this!

I’ve not set up ssh for the device yet. When I attempt balena ssh <uuid> I get an error

ssh: Could not resolve hostname ssh.devices.<myopenbalenadomain>.com: nodename nor servname provided, or not known
SSH: Remote command "host d480113e86e62408aa7958573d2c6500" exited with non-zero status code "255"

I am using balena CLI version 13.6.1 - I updated my cli version before starting with OpenBalena.

I have also tested with a different device, and am getting a different error; attempting to tail the logs results in socket hangup:

➜  Downloads balena logs d480113 --tail
ECONNRESET: request to https://api.<openbalenadomain>.com/device/v2/d480113e86e62408aa7958573d2c6500/logs?count=100&stream=1 failed, reason: socket hang up

Additional information may be available with the `--debug` flag.

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting


➜  Downloads balena logs d480113 --debug
[debug] new argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,logs,d480113] length=4
[debug] Deprecation check: 1.76568 days since last npm registry query for next major version release date.
[debug] Will not query the registry again until at least 7 days have passed.
[debug] Event tracking error: Response code 404 (Not Found)
➜  Downloads balena device d480113
== COLD HAIL
ID:                 2
DEVICE TYPE:        raspberrypi4-64
STATUS:             idle
IS ONLINE:          true
MAC ADDRESS:        E4:5F:01:44:7D:F3 A6:9A:84:3A:5A:CF
FLEET:              admin/firefly
LAST SEEN:          2022-06-29T12:57:39.509Z
UUID:               d480113e86e6
COMMIT:             N/a
SUPERVISOR VERSION: 13.1.11
IS WEB ACCESSIBLE:  false
OS VERSION:         balenaOS 2.98.33
DASHBOARD URL:      https://dashboard.<openbalenadomain>.com/devices/d480113e86e62408aa7958573d2c6500/summary

Hi,

In the second error, is the <openablenadomain> in DASHBOARD URL: https://dashboard.<openbalenadomain>.com/devices/d480113e86e62408aa7958573d2c6500/summary the actual domain that you’ve masked yourself, or is it still the placeholder?

Can you also check whether your device is set to local mode?
That could prevent it from getting new releases (I know it happened to me before).

Hi @TJvV

Thanks!

In the second error (which is now resolved - may have been a network issue), the domain name is the actual domain I masked - I just reinserted the placeholder when posting.

My device shouldn’t be in local mode - I am sure that I set it up using production mode. I haven’t found an easy way to confirm that though - is there a CLI command for that? I haven’t found one in the docs.

Hi @TJvV - I can now definitely confirm that the device is not in local mode. I found the correct command, and it reports: “Local mode on device d480113 is DISABLED.”

So that is not the cause of my problem picking up releases. I appreciate the idea, though, and if you have any other suggestions, please let me know!

Thanks.

Hi,

It’s always good to do those kind of simple sanity checks :slight_smile:

Have you tried looking at what supervisor thinks it’s supposed to be doing?
You can for example request your application state.

Hi @TJvV When I attempt to request the application state, I get a tunneling socket error:

➜  ~ curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer xxxxxxxxx' \
  -d '{"uuid": "xxxxxx", "method": "GET"}' \
  "https://api.xxxx.com/supervisor/v2/applications/state"
tunneling socket could not be established, statusCode=407%

Any suggestions?

@otaviojacobi

I have now set up the ability to ssh into the device, and have run the journalctl --unit=balena-supervisor --unit=resin-supervisor command - here is the output:

root@d480113:~# journalctl --unit=balena-supervisor --unit=balena-supervisor
-- Journal begins at Fri 2022-07-01 14:00:02 UTC, ends at Fri 2022-07-01 15:26:29 UTC. --
Jul 01 14:00:14 d480113 balena-supervisor[1953]: Error response from daemon: No such container: resin_supervisor
Jul 01 14:00:14 d480113 balena-supervisor[1968]: balena_supervisor
Jul 01 14:00:14 d480113 balena-supervisor[1984]: active
Jul 01 14:00:17 d480113 balena-supervisor[1985]: Container config has not changed
Jul 01 14:00:19 d480113 balena-supervisor[2132]: find: /mnt/root/tmp/balena-supervisor/services: No such file or directory
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [info]    Supervisor v13.1.11 starting up...
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [info]    Setting host to discoverable
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [warn]    Invalid firewall mode: . Reverting to state: off
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [info]    Applying firewall mode: off
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [debug]   Starting systemd unit: avahi-daemon.service
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [debug]   Starting systemd unit: avahi-daemon.socket
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [debug]   Starting logging infrastructure
Jul 01 15:07:51 d480113 balena-supervisor[2132]: [debug]   Performing database cleanup for container log timestamps
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [info]    Starting firewall
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [success] Firewall mode applied
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [debug]   Starting api binder
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [info]    Previous engine snapshot was not stored. Skipping cleanup.
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [debug]   Handling of local mode switch is completed
Jul 01 15:07:52 d480113 balena-supervisor[2132]: (node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(>
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [info]    API Binder bound to: https://api.myrealdomainnamewashere.com/v6/
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [event]   Event: Supervisor start {}
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [debug]   Connectivity check enabled: true
Jul 01 15:07:52 d480113 balena-supervisor[2132]: [debug]   Starting periodic check for IP addresses

Any ideas what is going on? I’d greatly appreciate any advice.

Hi,

Sorry for the late reply.

The statusCode 407 suggests something is going wrong with proxy authentication.

It might be helpful to know a little more about the network setup of your open-balena server and device.
Things like NAT, (lack of) port forwarding and reverse proxies can mess things up in rather unexpected ways.

Hi,

Thanks for sharing Supervisor logs. From those logs, it looks like the Supervisor is operating normally, but the logs only show the Supervisor startup behavior and don’t contain anything pertaining to release updates. Are you able to see anything related to updating in the Supervisor logs when you look again? Also, what’s the target state of the Supervisor on this device? You can find the target state by navigating to Daignostics > Supervisor state, starting from the device summary page.

Another thing you could check is if the dashboard shows the device as having a target release equal to what you would expect. On the device summary page, does the target release field display a UUID? This will tell us if the release was built successfully, and will help us narrow down whether the issue is with the release building, or the release updating.

Lastly, you previously pasted the results of a curl to the Supervisor’s /v2/applications/state endpoint via proxy, however received a 407 response. Are you still receiving this response? A 407 doesn’t necessarily indicate that a device would have problems reaching target release, however may be a symptom of a larger underlying problem.

Thanks, let us know!
Christina

Hi - sorry for my own late reply! I was out of the office last week.

My open-balena server is on AWS, and is an Ubuntu 18.04 instance. I have tested adjusting the security group inbound rules, and they are not the cause of the problem. The network ACL rules have also been tested, and are not the cause of the problem. The CNAME records specified in the getting started guide are all mapped to the instance’s Public IPv4 DNS. I’ve not configured anything other than the AWS-specific settings like security groups and ACL rules and what is specified in the Getting Started guide.

Hi @cywang117 Thanks for looking into this! Sorry for my late reply - I was out of the office last week.

Are you able to see anything related to updating in the Supervisor logs when you look again?

No, I still only see the startup behavior.

Also, what’s the target state of the Supervisor on this device? You can find the target state by navigating to Daignostics > Supervisor state, starting from the device summary page.

I’m using OpenBalena, not BalenaCloud so I don’t have access to a dashboard or diagnostics.

Lastly, you previously pasted the results of a curl to the Supervisor’s /v2/applications/state endpoint via proxy, however received a 407 response. Are you still receiving this response? A 407 doesn’t necessarily indicate that a device would have problems reaching target release, however may be a symptom of a larger underlying problem.

Yes, I am still receiving a 407 response. I am running OpenBalena on an AWS Ubuntu 18.04 instance, and have checked both the security group and ACL rules - they aren’t the problem. Any thoughts on what could be causing this?

Hi @kathryn-forsythe,

I’m using OpenBalena, not BalenaCloud so I don’t have access to a dashboard or diagnostics.

Sorry! In that case, could you try curl-ing the API to get info for the particular device that’s not downloading any releases: Resources - Balena Documentation

As well as the release information for the fleet that the device is part of: Resources - Balena Documentation

Additionally, let’s see what the Supervisor on this device is receiving from the API as its target state. From a host OS terminal:

curl -X GET \
  -H "Authorization: Bearer $(cat /mnt/boot/config.json | jq -r '.deviceApiKey'" \
  "https://$YOUR_API_ENDPOINT/device/v3/$YOUR_DEVICE_UUID/state"

In the snippet above, please replace the API endpoint and device UUID with your information accordingly.

Hopefully this will give us some more information about why the device is not updating to a release. Please also make sure to anonymize any sensitive information.

Thanks,
Christina

Hi,
I’m afraid I don’t have any experience with AWS myself, so not quite sure what they offer in terms of tooling and services; but it sounds like you’ve already checked the basics there.

Seeing as the error indicates a proxy error, you may want to check out the device and balena CLI setttings.

Can you see any logging on your server about these connection attempts?
You may need to tweak the haproxy configuration, which you can find in open-balena/src/haproxy/haproxy.cfg.

Also found this article about troubleshooting 407 errors; might be a good read :slight_smile:

@cywang117 Thanks for your help!

Curl-iing the api for the device, results in the following:

curl -X GET "https://api.myapiurl/v6/device?\$filter=uuid%20eq%20'full-device-uuid'" -H 'Content-Type: application/json'  -H 'Authorization: Bearer auth-token'
{"d":[{"created_at":"2022-06-29T12:57:31.503Z","modified_at":"2022-07-12T12:32:22.968Z","id":2,"actor":10,"api_heartbeat_state":"unknown","uuid":"full-uuid","local_id":null,"device_name":"cold-hail","note":null,"is_of__device_type":{"__id":57},"belongs_to__application":{"__id":1},"is_online":true,"last_connectivity_event":"2022-07-12T12:32:22.968Z","is_connected_to_vpn":true,"last_vpn_event":"2022-07-12T12:32:22.968Z","is_locked_until__date":null,"logs_channel":null,"public_address":null,"vpn_address":"100.64.0.4","ip_address":null,"mac_address":"E4:5F:01:44:7D:F3 A6:9A:84:3A:5A:CF","memory_usage":null,"memory_total":null,"storage_block_device":null,"storage_usage":null,"storage_total":null,"cpu_usage":null,"cpu_temp":null,"is_undervolted":false,"cpu_id":null,"is_running__release":null,"download_progress":null,"status":null,"os_version":"balenaOS 2.98.33","os_variant":"prod","supervisor_version":"13.1.11","provisioning_progress":null,"provisioning_state":null,"api_port":null,"api_secret":null,"is_managed_by__service_instance":{"__id":6},"should_be_running__release":null,"should_be_operated_by__release":null,"is_managed_by__device":null,"should_be_managed_by__release":null,"is_web_accessible":false,"overall_status":"idle","overall_progress":null}]}%

I tried a few different releases, here are the details from the curl response:

url -X GET "https://api.xxx/v6/release?$filter=belongs_to__application%20eql%201'" -H 'Content-Type: application/json'  -H 'Authorization: Bearer xxx'
{"d":[{"created_at":"2022-06-28T18:10:26.867Z","modified_at":"2022-06-28T18:10:34.128Z","id":1,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"main":{"build":{"context":"."},"privileged":true,"tty":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.resin.features.kernel-modules":"1","io.resin.features.firmware":"1","io.resin.features.dbus":"1","io.resin.features.supervisor-api":"1","io.resin.features.resin-api":"1"}}}},"status":"failed","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-28T18:10:26.616Z","end_timestamp":"2022-06-28T18:10:33.947Z","update_timestamp":"2022-06-28T18:10:34.122Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-28T18:10:26.904Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":0,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0","version":{"raw":"0.0.0","major":0,"minor":0,"patch":0,"prerelease":[],"build":[],"version":"0.0.0"}},{"created_at":"2022-06-28T18:15:14.779Z","modified_at":"2022-06-28T18:15:22.141Z","id":2,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"main":{"build":{"context":"."},"privileged":true,"tty":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.resin.features.kernel-modules":"1","io.resin.features.firmware":"1","io.resin.features.dbus":"1","io.resin.features.supervisor-api":"1","io.resin.features.resin-api":"1"}}}},"status":"failed","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-28T18:15:14.546Z","end_timestamp":"2022-06-28T18:15:21.950Z","update_timestamp":"2022-06-28T18:15:22.141Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-28T18:15:14.802Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":1,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev1","version":{"raw":"0.0.0+rev1","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev1"],"version":"0.0.0"}},{"created_at":"2022-06-28T18:15:55.636Z","modified_at":"2022-06-28T18:16:03.356Z","id":3,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"main":{"build":{"context":"."},"privileged":true,"tty":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.resin.features.kernel-modules":"1","io.resin.features.firmware":"1","io.resin.features.dbus":"1","io.resin.features.supervisor-api":"1","io.resin.features.resin-api":"1"}}}},"status":"failed","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-28T18:15:55.448Z","end_timestamp":"2022-06-28T18:16:03.176Z","update_timestamp":"2022-06-28T18:16:03.356Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-28T18:15:55.657Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":2,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev2","version":{"raw":"0.0.0+rev2","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev2"],"version":"0.0.0"}},{"created_at":"2022-06-28T18:22:16.435Z","modified_at":"2022-06-28T18:22:36.343Z","id":4,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"main":{"build":{"context":"."},"privileged":true,"tty":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.resin.features.kernel-modules":"1","io.resin.features.firmware":"1","io.resin.features.dbus":"1","io.resin.features.supervisor-api":"1","io.resin.features.resin-api":"1"}}}},"status":"success","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-28T18:22:16.241Z","end_timestamp":"2022-06-28T18:22:36.170Z","update_timestamp":"2022-06-28T18:22:36.343Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-28T18:22:16.459Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":3,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev3","version":{"raw":"0.0.0+rev3","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev3"],"version":"0.0.0"}},{"created_at":"2022-06-28T18:41:57.424Z","modified_at":"2022-06-28T18:42:04.491Z","id":5,"belongs_to__application":{"__id":1},"commit":"xxx,"composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"main":{"build":{"context":"."},"privileged":true,"tty":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.resin.features.kernel-modules":"1","io.resin.features.firmware":"1","io.resin.features.dbus":"1","io.resin.features.supervisor-api":"1","io.resin.features.resin-api":"1"}}}},"status":"success","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-28T18:41:57.222Z","end_timestamp":"2022-06-28T18:42:04.307Z","update_timestamp":"2022-06-28T18:42:04.490Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-28T18:41:57.446Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":4,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev4","version":{"raw":"0.0.0+rev4","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev4"],"version":"0.0.0"}},{"created_at":"2022-06-28T18:57:45.921Z","modified_at":"2022-06-28T18:58:43.102Z","id":6,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","volumes":{"config":{},"backup":{},"cgroup":{},"store":{},"zwave-config":{}},"services":{"sh_pijuice":{"build":{"context":"./sh_pijuice"},"restart":"always","privileged":true,"devices":["/dev/i2c-1:/dev/i2c-1"],"volumes":["config:/config","cgroup:/sys/fs/cgroup"],"labels":{"io.balena.features.supervisor-api":"true","io.balena.features.dbus":"true","io.balena.features.kernel-modules":"true"}}}},"status":"success","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-28T18:57:45.689Z","end_timestamp":"2022-06-28T18:58:42.914Z","update_timestamp":"2022-06-28T18:58:43.100Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-28T18:57:45.948Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":5,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev5","version":{"raw":"0.0.0+rev5","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev5"],"version":"0.0.0"}},{"created_at":"2022-06-30T13:15:38.897Z","modified_at":"2022-06-30T13:15:54.388Z","id":7,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"main":{"build":{"context":"."},"privileged":true,"tty":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.resin.features.kernel-modules":"1","io.resin.features.firmware":"1","io.resin.features.dbus":"1","io.resin.features.supervisor-api":"1","io.resin.features.resin-api":"1"}}}},"status":"success","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-30T13:15:38.664Z","end_timestamp":"2022-06-30T13:15:54.151Z","update_timestamp":"2022-06-30T13:15:54.388Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-30T13:15:38.922Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":6,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev6","version":{"raw":"0.0.0+rev6","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev6"],"version":"0.0.0"}},{"created_at":"2022-06-30T17:33:38.329Z","modified_at":"2022-06-30T17:33:51.456Z","id":8,"belongs_to__application":{"__id":1},"commit":"xxx","composition":{"version":"2.1","services":{"logger":{"build":{"context":"./logging"},"restart":"always"}}},"status":"success","source":"local","build_log":null,"is_invalidated":false,"start_timestamp":"2022-06-30T17:33:38.091Z","end_timestamp":"2022-06-30T17:33:51.226Z","update_timestamp":"2022-06-30T17:33:51.455Z","release_version":null,"contract":null,"is_passing_tests":true,"is_finalized_at__date":"2022-06-30T17:33:38.353Z","semver_major":0,"semver_minor":0,"semver_patch":0,"revision":7,"known_issue_list":null,"note":null,"invalidation_reason":null,"is_final":true,"semver":"0.0.0","raw_version":"0.0.0+rev7","version":{"raw":"0.0.0+rev7","major":0,"minor":0,"patch":0,"prerelease":[],"build":["rev7"],"version":"0.0.0"}}]}%

From the HostOS terminal of the given device, when posting the request, I get an error:

root@short-uuid:~# curl -X GET   -H "Authorization: Bearer $(cat /mnt/boot/config.json | jq -r '.deviceApiKey')" "https://api.myapiendpoint/device/v3/full-device-uuid/state"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /device/v3/full-device-uuid/state</pre>
</body>
</html>

Note that I accessed the HostOS terminal using balena tunnel <device-uuid> -p 22222:22222 and ssh -p 22222 root@localhost

Thanks again! I really appreciate your help troubleshooting this.

Kathryn

@TJvV Thanks, these look like useful resources. I’ll check them out, and report back. Kathryn

@cywang117 Do you have any ideas based on the curl results? Is there any other information I can provide? I’m pretty stuck.

Thanks!
Kathryn