Device registration fails with open balena

Hi all. I’m playing with the whole balena ecosystem (GUYS THIS IS AN AMAZING APP) and i performed a deploy with balena cloud in a generic x86 device (a vmware machine with balenaOS). Using balena cloud the deploy works fine and i can see the device in my app.

Now i’m trying to replicate the same deploy with open balena following the getting started guide.
My steps were:

  • installed open balena on a public vps server and mapped the domain name to reach it. ( its on a registered domain name)
  • copied the cert so i can connect without any problem to the open balena server from balena cli
  • created the application and download the same x86 images previuosly used on balena cloud (developer version image)
  • configured the image with balena os configure to point to my app
  • flashed the image onto a usb drive and installed the balenaOS on the vmware vm
  • started the BalenaOs device

With the running device, i can find it using the balena cli scan. The device is up and running and i can login into it

BUT…

It doesn’t appear in the devices list. Looking at the journal logs seems that i have the same error of this issue Failing to add device.
Tried to reflash many times with no success (also with the nuc image)
Logging into the supervisor container and trying to curl my api, it give me a 200 status.

On the server side all the docker services of open balena are up and running.

Could somebody help me to deploy the device and see it in the devices list?

Hello, glad to hear you are enjoying Balena, would you mind posting the logs of your device here? From what you describe it sounds like the device is unable to register with the API, but having a look at the actual logs should shed some light on the underlying issue.

One more thing: would you mind sharing which OS version you are using?

Open balena server OS
Ubuntu 16.04

Development OS
Linux Mint 19.3

Device image
balena-cloud-intel-nuc-2.50.1+rev1-dev-v11.4.10


server vpn container log

Jun 17 12:10:07 6ccb5498a775 haproxy[221]: Routing 95.232.37.146:64344@tcp-443 to vpn-cluster/vpn1:54358 [C:1/1 Q:0/0 T:1/0]
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: TCP connection established with [AF_INET]127.0.0.1:54358
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_VER=2.4.7
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_PLAT=linux
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_PROTO=2
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_NCP=2
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_LZ4=1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_LZ4v2=1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_LZO=1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_COMP_STUB=1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_COMP_STUBv2=1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 peer info: IV_TCPNL=1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: info: AUTH FAIL: API Authentication failed for c532c099e4dde63835738982e0d4e401
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: ::ffff:127.0.0.1 - - [17/Jun/2020:12:10:07 +0000] "POST /api/v1/auth/ HTTP/1.1" 401 12 "-" "curl/7.52.1"
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 WARNING: Failed running command (--auth-user-pass-verify): external program exited with error status: 1
Jun 17 12:10:07 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 TLS Auth Error: Auth Username/Password verification failed for peer
Jun 17 12:10:08 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384
Jun 17 12:10:08 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 Peer Connection Initiated with [AF_INET]127.0.0.1:54358
Jun 17 12:10:09 6ccb5498a775 balena-vpn-api[1487]: 127.0.0.1:54358 Connection reset, restarting [0]

Device log

The device logs are the same of issue Failing to add device


Thanks in advance for the support!!

There seem to be some authentication problems between the VPN and the API, unfortunately this kind of issue can be rather hard to debug and the steps might get a bit involved.
The first thing to check would be to see if the credentials the VPN is sending the API make sense:

On the device you can cat /var/volatile/vpn-auth to get the UUID and device API key, used for VPN auth.
Check if the API key matches what is declared in config.json (cat /mnt/boot/config.json | jq .).
If it does, then we should check what the API thinks of this key: for that you will need to access the server db container. From there check that the device API key is present in the database table called api_key. If can find it, then it should have a key to the actor table which should ultimately point to an entry in the device table that represents this device.

Let us know if something does not match my description along the way, as that will likely point to what the underlying issue may be.

  • /var/volatile/vpn-auth uuid and apiKey match with the ones in the config.json
  • there is an entry with the api key in the api_key table, with attribute “is of actor” = 4 (there are also other keys with the 4 id)
  • there is an entry in the actors table with id 4
  • the devices table is empty

logs from the api service:

Jun 17 14:54:33 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'c532c099e4dde63835738982e0d4e401'
Jun 17 14:54:34 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 14:54:34 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 14:54:34 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 14:54:34 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 14:54:34 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T14:54:34.626Z, 2 ]
Jun 17 14:54:44 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 14:54:44 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 14:54:44 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 14:54:44 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 14:54:44 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T14:54:44.650Z, 2 ]
Jun 17 14:54:46 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'c532c099e4dde63835738982e0d4e401'

Seems that there is a select query to find the device that match with the device uuid, but the table is empty

Thanks, I was just about to ask you to check the API logs. When you flash the SD the device contains a provisioning key, once it reaches the API for the first time it will exchange that key for a device key, I suspect something might have gone wrong in that stage. Can you try re-flashing the device and capturing the API logs as the device reaches the API for the first time?

api service when i run …/balena-cli/balena os configure …/openbalenaimage/balena-cloud-intel-nuc-2.50.1+rev1-dev-v11.4.10.img --app test10 --version 2.50.1+rev1-dev

Jun 17 15:40:02 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:40:02 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:40:02 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:40:02 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:40:02.608Z, 2 ]
Jun 17 15:40:05 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=180.111.3.48 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=52 ID=56521 PROTO=TCP SPT=2378 DPT=23 WINDOW=27682 RES=0x00 SYN URGP=0 
Jun 17 15:40:12 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:40:12 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:40:12 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:40:12 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:40:12 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:40:12.635Z, 2 ]
Jun 17 15:40:22 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:40:22 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:40:22 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:40:22 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:40:22 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:40:22.665Z, 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "user"."actor", "user"."jwt secret" AS "jwt_secret"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "user"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE "user"."id" = $1 [ 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "permission"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:         FROM "user-has-permission" AS "permission.user-has-permission"
Jun 17 15:40:28 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.user-has-permission"."permission"
Jun 17 15:40:28 d6617561938b api[1465]:         AND "permission.user-has-permission"."user" = $1
Jun 17 15:40:28 d6617561938b api[1465]:         AND ("permission.user-has-permission"."expiry date" IS NULL
Jun 17 15:40:28 d6617561938b api[1465]:         OR "permission.user-has-permission"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:28 d6617561938b api[1465]: )
Jun 17 15:40:28 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:40:28 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:40:28 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:40:28 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:40:28 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:                         FROM "user-has-role" AS "permission.role-has-permission.role.user-has-role"
Jun 17 15:40:28 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.user-has-role"."role"
Jun 17 15:40:28 d6617561938b api[1465]:                         AND "permission.role-has-permission.role.user-has-role"."user" = $1
Jun 17 15:40:28 d6617561938b api[1465]:                         AND ("permission.role-has-permission.role.user-has-role"."expiry date" IS NULL
Jun 17 15:40:28 d6617561938b api[1465]:                         OR "permission.role-has-permission.role.user-has-role"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:28 d6617561938b api[1465]:                 )
Jun 17 15:40:28 d6617561938b api[1465]:         )
Jun 17 15:40:28 d6617561938b api[1465]: ))
Jun 17 15:40:28 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "user"."actor", "user"."jwt secret" AS "jwt_secret"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "user"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE "user"."id" = $1 [ 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "permission"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:         FROM "user-has-permission" AS "permission.user-has-permission"
Jun 17 15:40:28 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.user-has-permission"."permission"
Jun 17 15:40:28 d6617561938b api[1465]:         AND "permission.user-has-permission"."user" = $1
Jun 17 15:40:28 d6617561938b api[1465]:         AND ("permission.user-has-permission"."expiry date" IS NULL
Jun 17 15:40:28 d6617561938b api[1465]:         OR "permission.user-has-permission"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:28 d6617561938b api[1465]: )
Jun 17 15:40:28 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:40:28 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:40:28 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:40:28 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:40:28 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:                         FROM "user-has-role" AS "permission.role-has-permission.role.user-has-role"
Jun 17 15:40:28 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.user-has-role"."role"
Jun 17 15:40:28 d6617561938b api[1465]:                         AND "permission.role-has-permission.role.user-has-role"."user" = $1
Jun 17 15:40:28 d6617561938b api[1465]:                         AND ("permission.role-has-permission.role.user-has-role"."expiry date" IS NULL
Jun 17 15:40:28 d6617561938b api[1465]:                         OR "permission.role-has-permission.role.user-has-role"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:28 d6617561938b api[1465]:                 )
Jun 17 15:40:28 d6617561938b api[1465]:         )
Jun 17 15:40:28 d6617561938b api[1465]: ))
Jun 17 15:40:28 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "user"."actor", "user"."jwt secret" AS "jwt_secret"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "user"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE "user"."id" = $1 [ 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "permission"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:         FROM "user-has-permission" AS "permission.user-has-permission"
Jun 17 15:40:28 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.user-has-permission"."permission"
Jun 17 15:40:28 d6617561938b api[1465]:         AND "permission.user-has-permission"."user" = $1
Jun 17 15:40:28 d6617561938b api[1465]:         AND ("permission.user-has-permission"."expiry date" IS NULL
Jun 17 15:40:28 d6617561938b api[1465]:         OR "permission.user-has-permission"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:28 d6617561938b api[1465]: )
Jun 17 15:40:28 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:40:28 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:40:28 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:40:28 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:40:28 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:40:28 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:40:28 d6617561938b api[1465]:                         FROM "user-has-role" AS "permission.role-has-permission.role.user-has-role"
Jun 17 15:40:28 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.user-has-role"."role"
Jun 17 15:40:28 d6617561938b api[1465]:                         AND "permission.role-has-permission.role.user-has-role"."user" = $1
Jun 17 15:40:28 d6617561938b api[1465]:                         AND ("permission.role-has-permission.role.user-has-role"."expiry date" IS NULL
Jun 17 15:40:28 d6617561938b api[1465]:                         OR "permission.role-has-permission.role.user-has-role"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:28 d6617561938b api[1465]:                 )
Jun 17 15:40:28 d6617561938b api[1465]:         )
Jun 17 15:40:28 d6617561938b api[1465]: ))
Jun 17 15:40:28 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 2 ]
Jun 17 15:40:28 d6617561938b api[1465]: Parsing GET /resin/application?$filter=(app_name%20eq%20%27test10%27)%20or%20(slug%20eq%20%27test10%27)
Jun 17 15:40:28 d6617561938b api[1465]: Running GET /resin/application?$filter=(app_name%20eq%20%27test10%27)%20or%20(slug%20eq%20%27test10%27)
Jun 17 15:40:28 d6617561938b api[1465]: SELECT "application"."created at" AS "created_at", "application"."id", "application"."actor", "application"."should track latest release" AS "should_track_latest_release", "application"."app name" AS "app_name", "application"."slug", "application"."device type" AS "device_type", "application"."VPN host" AS "VPN_host", "application"."VPN port" AS "VPN_port", "application"."commit", "application"."depends on-application" AS "depends_on__application", "application"."application type" AS "application_type"
Jun 17 15:40:28 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:28 d6617561938b api[1465]: WHERE ("application"."app name" = $1
Jun 17 15:40:28 d6617561938b api[1465]: OR "application"."slug" = $2) [ 'test10', 'test10' ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "user"."actor", "user"."jwt secret" AS "jwt_secret"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "user"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE "user"."id" = $1 [ 2 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "permission"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:         FROM "user-has-permission" AS "permission.user-has-permission"
Jun 17 15:40:29 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.user-has-permission"."permission"
Jun 17 15:40:29 d6617561938b api[1465]:         AND "permission.user-has-permission"."user" = $1
Jun 17 15:40:29 d6617561938b api[1465]:         AND ("permission.user-has-permission"."expiry date" IS NULL
Jun 17 15:40:29 d6617561938b api[1465]:         OR "permission.user-has-permission"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:29 d6617561938b api[1465]: )
Jun 17 15:40:29 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:40:29 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:40:29 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:40:29 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:40:29 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:                         FROM "user-has-role" AS "permission.role-has-permission.role.user-has-role"
Jun 17 15:40:29 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.user-has-role"."role"
Jun 17 15:40:29 d6617561938b api[1465]:                         AND "permission.role-has-permission.role.user-has-role"."user" = $1
Jun 17 15:40:29 d6617561938b api[1465]:                         AND ("permission.role-has-permission.role.user-has-role"."expiry date" IS NULL
Jun 17 15:40:29 d6617561938b api[1465]:                         OR "permission.role-has-permission.role.user-has-role"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:29 d6617561938b api[1465]:                 )
Jun 17 15:40:29 d6617561938b api[1465]:         )
Jun 17 15:40:29 d6617561938b api[1465]: ))
Jun 17 15:40:29 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 2 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /resin/application?$filter=(app_name%20eq%20%27test10%27)%20or%20(slug%20eq%20%27test10%27)&$select=id
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /resin/application?$filter=(app_name%20eq%20%27test10%27)%20or%20(slug%20eq%20%27test10%27)&$select=id
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "application"."id"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE ("application"."app name" = $1
Jun 17 15:40:29 d6617561938b api[1465]: OR "application"."slug" = $2) [ 'test10', 'test10' ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "user"."actor", "user"."jwt secret" AS "jwt_secret"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "user"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE "user"."id" = $1 [ 2 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "permission"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:         FROM "user-has-permission" AS "permission.user-has-permission"
Jun 17 15:40:29 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.user-has-permission"."permission"
Jun 17 15:40:29 d6617561938b api[1465]:         AND "permission.user-has-permission"."user" = $1
Jun 17 15:40:29 d6617561938b api[1465]:         AND ("permission.user-has-permission"."expiry date" IS NULL
Jun 17 15:40:29 d6617561938b api[1465]:         OR "permission.user-has-permission"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:29 d6617561938b api[1465]: )
Jun 17 15:40:29 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:40:29 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:40:29 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:40:29 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:40:29 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:40:29 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:40:29 d6617561938b api[1465]:                         FROM "user-has-role" AS "permission.role-has-permission.role.user-has-role"
Jun 17 15:40:29 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.user-has-role"."role"
Jun 17 15:40:29 d6617561938b api[1465]:                         AND "permission.role-has-permission.role.user-has-role"."user" = $1
Jun 17 15:40:29 d6617561938b api[1465]:                         AND ("permission.role-has-permission.role.user-has-role"."expiry date" IS NULL
Jun 17 15:40:29 d6617561938b api[1465]:                         OR "permission.role-has-permission.role.user-has-role"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:29 d6617561938b api[1465]:                 )
Jun 17 15:40:29 d6617561938b api[1465]:         )
Jun 17 15:40:29 d6617561938b api[1465]: ))
Jun 17 15:40:29 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 2 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /resin/application(3)?$select=id,app_name,device_type
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /resin/application(3)?$select=id,app_name,device_type
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "application"."id", "application"."app name" AS "app_name", "application"."device type" AS "device_type"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE "application"."id" = $1 [ 3 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /resin/application(3)?$select=actor
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /resin/application(3)?$select=actor
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "application"."actor"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE "application"."id" = $1 [ 3 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing POST /resin/application(3)/canAccess
Jun 17 15:40:29 d6617561938b api[1465]: Running POST /resin/application(3)/canAccess
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "application"."id"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE "application"."id" = $1
Jun 17 15:40:29 d6617561938b api[1465]: LIMIT 1 [ 3 ]
Jun 17 15:40:29 d6617561938b api[1465]: Parsing POST /Auth/api_key?returnResource=false
Jun 17 15:40:29 d6617561938b api[1465]: Parsing GET /Auth/role?$select=id&$filter=name eq 'provisioning-api-key'
Jun 17 15:40:29 d6617561938b api[1465]: Running POST /Auth/api_key?returnResource=false
Jun 17 15:40:29 d6617561938b api[1465]: Running GET /Auth/role?$select=id&$filter=name eq 'provisioning-api-key'
Jun 17 15:40:29 d6617561938b api[1465]: INSERT INTO "api key" ("key", "is of-actor")
Jun 17 15:40:29 d6617561938b api[1465]: VALUES ($1, $2) [ 'EChhH8iwXHzcrxux2GYtldcRI5wz4uKf', 5 ]
Jun 17 15:40:29 d6617561938b api[1465]: SELECT "role"."id"
Jun 17 15:40:29 d6617561938b api[1465]: FROM "role"
Jun 17 15:40:29 d6617561938b api[1465]: WHERE "role"."name" = $1 [ 'provisioning-api-key' ]
Jun 17 15:40:29 d6617561938b api[1465]: Insert ID:  api_key 17
Jun 17 15:40:29 d6617561938b api[1465]: Parsing POST /Auth/api_key__has__role?returnResource=false
Jun 17 15:40:29 d6617561938b api[1465]: Running POST /Auth/api_key__has__role?returnResource=false
Jun 17 15:40:29 d6617561938b api[1465]: INSERT INTO "api key-has-role" ("api key", "role")
Jun 17 15:40:29 d6617561938b api[1465]: VALUES ($1, $2) [ 17, 1 ]
Jun 17 15:40:29 d6617561938b api[1465]: Insert ID:  api_key__has__role 17
Jun 17 15:40:30 d6617561938b api[1465]: Parsing GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:30 d6617561938b api[1465]: Running GET /resin/user(2)?$select=actor,jwt_secret
Jun 17 15:40:30 d6617561938b api[1465]: SELECT "user"."actor", "user"."jwt secret" AS "jwt_secret"
Jun 17 15:40:30 d6617561938b api[1465]: FROM "user"
Jun 17 15:40:30 d6617561938b api[1465]: WHERE "user"."id" = $1 [ 2 ]
Jun 17 15:40:30 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:30 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__user/any(uhp:(uhp/user eq @userId) and ((uhp/expiry_date eq null) or (uhp/expiry_date gt now())))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__user/any(uhr:(uhr/user eq @userId) and ((uhr/expiry_date eq null) or (uhr/expiry_date gt now()))))))&$orderby=name asc&@userId=2
Jun 17 15:40:30 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:40:30 d6617561938b api[1465]: FROM "permission"
Jun 17 15:40:30 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:40:30 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:30 d6617561938b api[1465]:         FROM "user-has-permission" AS "permission.user-has-permission"
Jun 17 15:40:30 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.user-has-permission"."permission"
Jun 17 15:40:30 d6617561938b api[1465]:         AND "permission.user-has-permission"."user" = $1
Jun 17 15:40:30 d6617561938b api[1465]:         AND ("permission.user-has-permission"."expiry date" IS NULL
Jun 17 15:40:30 d6617561938b api[1465]:         OR "permission.user-has-permission"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:30 d6617561938b api[1465]: )
Jun 17 15:40:30 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:40:30 d6617561938b api[1465]:         SELECT 1
Jun 17 15:40:30 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:40:30 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:40:30 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:40:30 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:40:30 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:40:30 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:40:30 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:40:30 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:40:30 d6617561938b api[1465]:                         FROM "user-has-role" AS "permission.role-has-permission.role.user-has-role"
Jun 17 15:40:30 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.user-has-role"."role"
Jun 17 15:40:30 d6617561938b api[1465]:                         AND "permission.role-has-permission.role.user-has-role"."user" = $1
Jun 17 15:40:30 d6617561938b api[1465]:                         AND ("permission.role-has-permission.role.user-has-role"."expiry date" IS NULL
Jun 17 15:40:30 d6617561938b api[1465]:                         OR "permission.role-has-permission.role.user-has-role"."expiry date" > CURRENT_TIMESTAMP)
Jun 17 15:40:30 d6617561938b api[1465]:                 )
Jun 17 15:40:30 d6617561938b api[1465]:         )
Jun 17 15:40:30 d6617561938b api[1465]: ))
Jun 17 15:40:30 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 2 ]
Jun 17 15:40:30 d6617561938b api[1465]: Parsing GET /resin/application(3)?$select=actor
Jun 17 15:40:30 d6617561938b api[1465]: Running GET /resin/application(3)?$select=actor
Jun 17 15:40:30 d6617561938b api[1465]: SELECT "application"."actor"
Jun 17 15:40:30 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:30 d6617561938b api[1465]: WHERE "application"."id" = $1 [ 3 ]
Jun 17 15:40:30 d6617561938b api[1465]: Parsing POST /resin/application(3)/canAccess
Jun 17 15:40:30 d6617561938b api[1465]: Running POST /resin/application(3)/canAccess
Jun 17 15:40:30 d6617561938b api[1465]: SELECT "application"."id"
Jun 17 15:40:30 d6617561938b api[1465]: FROM "application"
Jun 17 15:40:30 d6617561938b api[1465]: WHERE "application"."id" = $1
Jun 17 15:40:30 d6617561938b api[1465]: LIMIT 1 [ 3 ]
Jun 17 15:40:30 d6617561938b api[1465]: Parsing POST /Auth/api_key?returnResource=false
Jun 17 15:40:30 d6617561938b api[1465]: Parsing GET /Auth/role?$select=id&$filter=name eq 'provisioning-api-key'
Jun 17 15:40:30 d6617561938b api[1465]: Running POST /Auth/api_key?returnResource=false
Jun 17 15:40:30 d6617561938b api[1465]: Running GET /Auth/role?$select=id&$filter=name eq 'provisioning-api-key'
Jun 17 15:40:30 d6617561938b api[1465]: INSERT INTO "api key" ("key", "is of-actor")
Jun 17 15:40:30 d6617561938b api[1465]: VALUES ($1, $2) [ 'p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN', 5 ]
Jun 17 15:40:30 d6617561938b api[1465]: SELECT "role"."id"
Jun 17 15:40:30 d6617561938b api[1465]: FROM "role"
Jun 17 15:40:30 d6617561938b api[1465]: WHERE "role"."name" = $1 [ 'provisioning-api-key' ]
Jun 17 15:40:30 d6617561938b api[1465]: Insert ID:  api_key 18
Jun 17 15:40:30 d6617561938b api[1465]: Parsing POST /Auth/api_key__has__role?returnResource=false
Jun 17 15:40:30 d6617561938b api[1465]: Running POST /Auth/api_key__has__role?returnResource=false
Jun 17 15:40:30 d6617561938b api[1465]: INSERT INTO "api key-has-role" ("api key", "role")
Jun 17 15:40:30 d6617561938b api[1465]: VALUES ($1, $2) [ 18, 1 ]
Jun 17 15:40:30 d6617561938b api[1465]: Insert ID:  api_key__has__role 18

config.json of flashed device

{
  "applicationName": "test10",
  "applicationId": 3,
  "deviceType": "intel-nuc",
  "userId": 2,
  "username": "root",
  "appUpdatePollInterval": 600000,
  "listenPort": 48484,
  "vpnPort": 443,
  "apiEndpoint": "https://api.openbalena.codingrabbits.dev",
  "vpnEndpoint": "vpn.openbalena.codingrabbits.dev",
  "registryEndpoint": "registry.openbalena.codingrabbits.dev",
  "deltaEndpoint": "https://delta.openbalena.codingrabbits.dev",
  "pubnubSubscribeKey": "",
  "pubnubPublishKey": "",
  "mixpanelToken": "__unused__",
  "balenaRootCA": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZoekNDQTIrZ0F3SUJBZ0lVTUFFMWFiTFpuOGpocjlGNHhwZVJLbDRpWTY4d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0tqRW9NQ1lHQTFVRUF3d2ZZMkV1YjNCbGJtSmhiR1Z1WVM1amIyUnBibWR5WVdKaWFYUnpMbVJsZGpBZQpGdzB5TURBMk1UY3dPREEzTWpWYUZ3MHpNREEyTVRVd09EQTNNalZhTUNveEtEQW1CZ05WQkFNTUgyTmhMbTl3ClpXNWlZV3hsYm1FdVkyOWthVzVuY21GaVltbDBjeTVrWlhZd2dnSWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUMKRHdBd2dnSUtBb0lDQVFEWWxzQS9peUsyWFo5YkdJSk94dnVEemVRUXZJT2cvejJTVzRCQ3BwL3p4RE9pdXdhNApTbEtsMHAvUzJrdk1jblF4TEVSSnhmeG9PV1RzOFBuQzhaTTM2TFE1M0VCS0k5TnlLVVVXVjh1b1hEL3VpWHY3Cm5rK0dObTluMXczY2t2bWxFMG9ybkhtMkpSZGEwR0MrVnNOQVVWS29TMU85b1B6dHl6eXYrUE9wVmpYOFlmbk8KWXJOUzAyMGREQXZ3ZkxJa3I4R3Bqb0RzWHBEeXRXMStLcS9mTXpZbWJlTFBrUFdQcExYQTNUSTZ0WE53NktnYgpIUVB1RFV3R2RqOTZPZ25FbldmVmtYM2M1dy9vZmo1bnljcVhQR1J2VVNTZUg3U0phSjR6TmFaUitzU3BXMytTClo5anlyOXFMcjVvekhIc1Q0S0NESE5xdFBKWERQYUFUNjZteFR5L0owYVdTSUZVckFaQTM3dkx0MzZIUm5sRnIKakpaV3ROSnN0SnFpZExQSG5JcEhTY21SaVhxOW9LT2o4bjRaaytQeXJLOENDTWpNcThMbXdibm1VOXd3YnFMdQoySllUcGgyRGc2dzZBWmg1b2Y1OE1pbllxb04yUVkwU0RTTjBWeTk1OWNYMS9iV01sSUNqS0NjNzZlU0ozZmdoCjl4V2pNUXNQY3lzOWtQQVQ1cHRXRlBNUXpVYTRpUjlsZ1NJcGdXTUgxcVlwTTlETzlBM0x2QUtRcHY0ZXVaSVMKUmVENy9jSWRSV3NZWUpHdnBJbHMvc2FmNTMwb08zLzRUWnZhMHVlbnVLWW1vQjFCNjhRQmRkclF3cW04OTRUNgp5bUpCWEpXZDJHa0p6MTFpM2NzZGxCU2g4NStBeFVZb1UyZkFUVy9RV1dZdnc2eEZ1UVQxLzhneFN3SURBUUFCCm80R2tNSUdoTUIwR0ExVWREZ1FXQkJRTlVMVHNLUHN1NmppTTRFckY4TUhJd1BpVGpUQmxCZ05WSFNNRVhqQmMKZ0JRTlVMVHNLUHN1NmppTTRFckY4TUhJd1BpVGphRXVwQ3d3S2pFb01DWUdBMVVFQXd3ZlkyRXViM0JsYm1KaApiR1Z1WVM1amIyUnBibWR5WVdKaWFYUnpMbVJsZG9JVU1BRTFhYkxabjhqaHI5RjR4cGVSS2w0aVk2OHdEQVlEClZSMFRCQVV3QXdFQi96QUxCZ05WSFE4RUJBTUNBUVl3RFFZSktvWklodmNOQVFFTEJRQURnZ0lCQUpGVVBmdG8KZE9yU3djV2hERWcyY1VNdnFnb0F0RENNOG5QMjB2bmFEalRWTExTQjEvWlNUS0tzNHZvVm1tdCtoVDZKQVB5WQpvY2FEUWxTcitXSGh1RUFWbXBEOXFKMm4vb3FUWjg1MFEyc2xwSFBxZTMzRWFlNEVQUkZTNjNFUUxIa3czRnBhCkEreHh4VHVnaHROeGtaUDQxQzdLTFhGWWpVeGkrQTFodVYvTk1vSFJpejJQcGZHTE1EZ3FnV1VDQXE4ZGEwY3EKL2hsNFlxZFVzSWtDMXkwTy9VVEovQUZWdFAzLzFDYmwzc2xCV1d4SDlrUUM5QnRZU2tRbjlWb3VMOFV1eUI3aQpTK05OZ3JBbjAyaS91QUV6Vnc4OG9hV2hLaUpaaXF1MGRiM1l2OEYvR2tENzRnN2p0alhBRjExWVFlcDg0Zk80CkpaTGJEQlBVaGI5emxENjhobU1yemxnRHQrTE5uYjl6eFFxMzBVN3ZlZE1raTBvbzVDUFdiRnNKMGRWNnhZbkgKdy9lVWNHdmlKcE9HVTFkVERXb1ltYnZPL3AyUUlWNzhRRkpxVVQ5R0cxWmpCOXJpT3RrQWpZdGg1T3BEeTRWQQp6Z3VBUGU1WS9VQXZVcnkzQnBJSEE0elJJbXRGeHFxSmxlSkx6REJ5UlVQN1M4dnZoRXp1bGZESjZHUmxVZ0M1CnF1VXVDb0FrajFDamdpSUpjZUVsMjNJblZMdlFVQ1NSbm45alRsN1JIT29Rc2NkYlVKTDBCMGpwaXB1bjRRMG4KNE5GVFltdGd4QjNNTlhxd1hVc0dDQU5lbkhjSkhtR3hDUTJ2NExsWVRqd1R2SHc3MUhIdGFWTlF4VU1HYlFoUwpiOVVvUVREZm85eklteUpGYUoxSjZTU3piQ2hFeXhjNEl6OE8KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",
  "apiKey": "p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN",
  "files": {
    "network/network.config": "[service_home_ethernet]\nType=ethernet\nNameservers=8.8.8.8,8.8.4.4"
  }
}

log of the api service from the boot of the device until the device shutdown

Jun 17 15:55:05 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:55:05 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:55:05 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:55:05 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:55:05.333Z, 2 ]
Jun 17 15:55:12 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=36.7.80.168 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=241 ID=2395 PROTO=TCP SPT=2594 DPT=22589 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 15:55:15 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:55:15 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:55:15 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:55:15 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:55:15 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:55:15.362Z, 2 ]
Jun 17 15:55:24 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=168.228.188.22 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=31778 PROTO=TCP SPT=51434 DPT=23848 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 15:55:25 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:55:25 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:55:25 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:55:25 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:55:25 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:55:25.390Z, 2 ]
Jun 17 15:55:35 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:55:35 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:55:35 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:55:35 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:55:35 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:55:35.412Z, 2 ]
Jun 17 15:55:45 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:55:45 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:55:45 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:55:45 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:55:45 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:55:45.435Z, 2 ]
Jun 17 15:55:47 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=197.37.233.68 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=54 ID=45094 PROTO=TCP SPT=35507 DPT=23 WINDOW=45708 RES=0x00 SYN URGP=0 
Jun 17 15:55:51 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=94.102.51.58 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=251 ID=48177 PROTO=TCP SPT=46422 DPT=33871 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 15:55:55 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:55:55 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__api_key/any(khp:khp/api_key/any(k:k/key eq @apiKey))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__api_key/any(khr:khr/api_key/any(k:k/key eq @apiKey)))))&$orderby=name asc&@apiKey='gIk0M9O1O3pSL3Bxjom2iCVZRmpkIVJD'
Jun 17 15:55:55 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__api_key/any(khp:khp/api_key/any(k:k/key eq @apiKey))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__api_key/any(khr:khr/api_key/any(k:k/key eq @apiKey)))))&$orderby=name asc&@apiKey='gIk0M9O1O3pSL3Bxjom2iCVZRmpkIVJD'
Jun 17 15:55:55 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:55:55 d6617561938b api[1465]: FROM "permission"
Jun 17 15:55:55 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:55:55 d6617561938b api[1465]:         SELECT 1
Jun 17 15:55:55 d6617561938b api[1465]:         FROM "api key-has-permission" AS "permission.api key-has-permission"
Jun 17 15:55:55 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.api key-has-permission"."permission"
Jun 17 15:55:55 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:55:55 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:55:55 d6617561938b api[1465]:                 FROM "api key" AS "permission.api key-has-permission.api key"
Jun 17 15:55:55 d6617561938b api[1465]:                 WHERE "permission.api key-has-permission"."api key" = "permission.api key-has-permission.api key"."id"
Jun 17 15:55:55 d6617561938b api[1465]:                 AND "permission.api key-has-permission.api key"."key" = $1
Jun 17 15:55:55 d6617561938b api[1465]:         )
Jun 17 15:55:55 d6617561938b api[1465]: )
Jun 17 15:55:55 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:55:55 d6617561938b api[1465]:         SELECT 1
Jun 17 15:55:55 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:55:55 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:55:55 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:55:55 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:55:55 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:55:55 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:55:55 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:55:55 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:55:55 d6617561938b api[1465]:                         FROM "api key-has-role" AS "permission.role-has-permission.role.api key-has-role"
Jun 17 15:55:55 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.api key-has-role"."role"
Jun 17 15:55:55 d6617561938b api[1465]:                         AND EXISTS (
Jun 17 15:55:55 d6617561938b api[1465]:                                 SELECT 1
Jun 17 15:55:55 d6617561938b api[1465]:                                 FROM "api key" AS "permission.role-has-permission.role.api key-has-role.api key"
Jun 17 15:55:55 d6617561938b api[1465]:                                 WHERE "permission.role-has-permission.role.api key-has-role"."api key" = "permission.role-has-permission.role.api key-has-role.api key"."id"
Jun 17 15:55:55 d6617561938b api[1465]:                                 AND "permission.role-has-permission.role.api key-has-role.api key"."key" = $1
Jun 17 15:55:55 d6617561938b api[1465]:                         )
Jun 17 15:55:55 d6617561938b api[1465]:                 )
Jun 17 15:55:55 d6617561938b api[1465]:         )
Jun 17 15:55:55 d6617561938b api[1465]: ))
Jun 17 15:55:55 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 'gIk0M9O1O3pSL3Bxjom2iCVZRmpkIVJD' ]
Jun 17 15:55:55 d6617561938b api[1465]: Parsing GET /Auth/api_key?$select=is_of__actor&$filter=key eq @apiKey&@apiKey='gIk0M9O1O3pSL3Bxjom2iCVZRmpkIVJD'
Jun 17 15:55:55 d6617561938b api[1465]: Running GET /Auth/api_key?$select=is_of__actor&$filter=key eq @apiKey&@apiKey='gIk0M9O1O3pSL3Bxjom2iCVZRmpkIVJD'
Jun 17 15:55:55 d6617561938b api[1465]: SELECT "api key"."is of-actor" AS "is_of__actor"
Jun 17 15:55:55 d6617561938b api[1465]: FROM "api key"
Jun 17 15:55:55 d6617561938b api[1465]: WHERE "api key"."key" = $1 [ 'gIk0M9O1O3pSL3Bxjom2iCVZRmpkIVJD' ]
Jun 17 15:55:55 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:55:55 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:55:55 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:55:55 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:55:55.517Z, 2 ]
Jun 17 15:56:03 d6617561938b api[1465]: Parsing GET /Auth/permission?$select=name&$filter=(is_of__api_key/any(khp:khp/api_key/any(k:k/key eq @apiKey))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__api_key/any(khr:khr/api_key/any(k:k/key eq @apiKey)))))&$orderby=name asc&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 15:56:03 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__api_key/any(khp:khp/api_key/any(k:k/key eq @apiKey))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__api_key/any(khr:khr/api_key/any(k:k/key eq @apiKey)))))&$orderby=name asc&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 15:56:03 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 15:56:03 d6617561938b api[1465]: FROM "permission"
Jun 17 15:56:03 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 15:56:03 d6617561938b api[1465]:         SELECT 1
Jun 17 15:56:03 d6617561938b api[1465]:         FROM "api key-has-permission" AS "permission.api key-has-permission"
Jun 17 15:56:03 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.api key-has-permission"."permission"
Jun 17 15:56:03 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:56:03 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:56:03 d6617561938b api[1465]:                 FROM "api key" AS "permission.api key-has-permission.api key"
Jun 17 15:56:03 d6617561938b api[1465]:                 WHERE "permission.api key-has-permission"."api key" = "permission.api key-has-permission.api key"."id"
Jun 17 15:56:03 d6617561938b api[1465]:                 AND "permission.api key-has-permission.api key"."key" = $1
Jun 17 15:56:03 d6617561938b api[1465]:         )
Jun 17 15:56:03 d6617561938b api[1465]: )
Jun 17 15:56:03 d6617561938b api[1465]: OR EXISTS (
Jun 17 15:56:03 d6617561938b api[1465]:         SELECT 1
Jun 17 15:56:03 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 15:56:03 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 15:56:03 d6617561938b api[1465]:         AND EXISTS (
Jun 17 15:56:03 d6617561938b api[1465]:                 SELECT 1
Jun 17 15:56:03 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 15:56:03 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 15:56:03 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 15:56:03 d6617561938b api[1465]:                         SELECT 1
Jun 17 15:56:03 d6617561938b api[1465]:                         FROM "api key-has-role" AS "permission.role-has-permission.role.api key-has-role"
Jun 17 15:56:03 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.api key-has-role"."role"
Jun 17 15:56:03 d6617561938b api[1465]:                         AND EXISTS (
Jun 17 15:56:03 d6617561938b api[1465]:                                 SELECT 1
Jun 17 15:56:03 d6617561938b api[1465]:                                 FROM "api key" AS "permission.role-has-permission.role.api key-has-role.api key"
Jun 17 15:56:03 d6617561938b api[1465]:                                 WHERE "permission.role-has-permission.role.api key-has-role"."api key" = "permission.role-has-permission.role.api key-has-role.api key"."id"
Jun 17 15:56:03 d6617561938b api[1465]:                                 AND "permission.role-has-permission.role.api key-has-role.api key"."key" = $1
Jun 17 15:56:03 d6617561938b api[1465]:                         )
Jun 17 15:56:03 d6617561938b api[1465]:                 )
Jun 17 15:56:03 d6617561938b api[1465]:         )
Jun 17 15:56:03 d6617561938b api[1465]: ))
Jun 17 15:56:03 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 'p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN' ]
Jun 17 15:56:03 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 15:56:03 d6617561938b api[1465]: Parsing GET /Auth/api_key?$select=is_of__actor&$filter=key eq @apiKey&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 15:56:03 d6617561938b api[1465]: Running GET /Auth/api_key?$select=is_of__actor&$filter=key eq @apiKey&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 15:56:03 d6617561938b api[1465]: SELECT "api key"."is of-actor" AS "is_of__actor"
Jun 17 15:56:03 d6617561938b api[1465]: FROM "api key"
Jun 17 15:56:03 d6617561938b api[1465]: WHERE "api key"."key" = $1 [ 'p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN' ]
Jun 17 15:56:05 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:56:05 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:56:05 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:56:05 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:56:05 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:56:05.563Z, 2 ]
Jun 17 15:56:14 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58390 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:14 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=185.176.27.174 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=14408 PROTO=TCP SPT=47220 DPT=28283 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 15:56:15 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:56:15 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:56:15 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:56:15 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:56:15 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:56:15.594Z, 2 ]
Jun 17 15:56:15 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 15:56:16 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58394 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:17 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58396 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:22 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58402 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:25 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58404 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:25 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:56:25 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:56:25 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:56:25 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:56:25 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:56:25.628Z, 2 ]
Jun 17 15:56:27 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58406 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:28 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 15:56:29 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58410 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:31 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58412 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:35 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:56:35 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:56:35 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:56:35 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:56:35 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:56:35.650Z, 2 ]
Jun 17 15:56:42 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 15:56:45 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:56:45 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:56:45 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:56:45 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:56:45 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:56:45.675Z, 2 ]
Jun 17 15:56:49 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58424 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:51 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58426 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:53 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58428 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:56:55 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 15:56:55 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:56:55 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:56:55 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:56:55 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:56:55 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:56:55.698Z, 2 ]
Jun 17 15:56:55 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=95.232.37.146 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=0 DF PROTO=TCP SPT=58432 DPT=443 WINDOW=0 RES=0x00 RST URGP=0 
Jun 17 15:57:05 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 15:57:05 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 15:57:05 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 15:57:05 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 15:57:05 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T15:57:05.716Z, 2 ]
Jun 17 15:57:09 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=185.175.93.37 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=250 ID=52249 PROTO=TCP SPT=44641 DPT=9090 WINDOW=1024 RES=0x00 SYN URGP=0 

logs of the api service after device restart

 Parsing GET /Auth/permission?$select=name&$filter=(is_of__api_key/any(khp:khp/api_key/any(k:k/key eq @apiKey))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__api_key/any(khr:khr/api_key/any(k:k/key eq @apiKey)))))&$orderby=name asc&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 16:19:27 d6617561938b api[1465]: Running GET /Auth/permission?$select=name&$filter=(is_of__api_key/any(khp:khp/api_key/any(k:k/key eq @apiKey))) or (is_of__role/any(rhp:rhp/role/any(r:r/is_of__api_key/any(khr:khr/api_key/any(k:k/key eq @apiKey)))))&$orderby=name asc&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 16:19:27 d6617561938b api[1465]: SELECT "permission"."name"
Jun 17 16:19:27 d6617561938b api[1465]: FROM "permission"
Jun 17 16:19:27 d6617561938b api[1465]: WHERE (EXISTS (
Jun 17 16:19:27 d6617561938b api[1465]:         SELECT 1
Jun 17 16:19:27 d6617561938b api[1465]:         FROM "api key-has-permission" AS "permission.api key-has-permission"
Jun 17 16:19:27 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.api key-has-permission"."permission"
Jun 17 16:19:27 d6617561938b api[1465]:         AND EXISTS (
Jun 17 16:19:27 d6617561938b api[1465]:                 SELECT 1
Jun 17 16:19:27 d6617561938b api[1465]:                 FROM "api key" AS "permission.api key-has-permission.api key"
Jun 17 16:19:27 d6617561938b api[1465]:                 WHERE "permission.api key-has-permission"."api key" = "permission.api key-has-permission.api key"."id"
Jun 17 16:19:27 d6617561938b api[1465]:                 AND "permission.api key-has-permission.api key"."key" = $1
Jun 17 16:19:27 d6617561938b api[1465]:         )
Jun 17 16:19:27 d6617561938b api[1465]: )
Jun 17 16:19:27 d6617561938b api[1465]: OR EXISTS (
Jun 17 16:19:27 d6617561938b api[1465]:         SELECT 1
Jun 17 16:19:27 d6617561938b api[1465]:         FROM "role-has-permission" AS "permission.role-has-permission"
Jun 17 16:19:27 d6617561938b api[1465]:         WHERE "permission"."id" = "permission.role-has-permission"."permission"
Jun 17 16:19:27 d6617561938b api[1465]:         AND EXISTS (
Jun 17 16:19:27 d6617561938b api[1465]:                 SELECT 1
Jun 17 16:19:27 d6617561938b api[1465]:                 FROM "role" AS "permission.role-has-permission.role"
Jun 17 16:19:27 d6617561938b api[1465]:                 WHERE "permission.role-has-permission"."role" = "permission.role-has-permission.role"."id"
Jun 17 16:19:27 d6617561938b api[1465]:                 AND EXISTS (
Jun 17 16:19:27 d6617561938b api[1465]:                         SELECT 1
Jun 17 16:19:27 d6617561938b api[1465]:                         FROM "api key-has-role" AS "permission.role-has-permission.role.api key-has-role"
Jun 17 16:19:27 d6617561938b api[1465]:                         WHERE "permission.role-has-permission.role"."id" = "permission.role-has-permission.role.api key-has-role"."role"
Jun 17 16:19:27 d6617561938b api[1465]:                         AND EXISTS (
Jun 17 16:19:27 d6617561938b api[1465]:                                 SELECT 1
Jun 17 16:19:27 d6617561938b api[1465]:                                 FROM "api key" AS "permission.role-has-permission.role.api key-has-role.api key"
Jun 17 16:19:27 d6617561938b api[1465]:                                 WHERE "permission.role-has-permission.role.api key-has-role"."api key" = "permission.role-has-permission.role.api key-has-role.api key"."id"
Jun 17 16:19:27 d6617561938b api[1465]:                                 AND "permission.role-has-permission.role.api key-has-role.api key"."key" = $1
Jun 17 16:19:27 d6617561938b api[1465]:                         )
Jun 17 16:19:27 d6617561938b api[1465]:                 )
Jun 17 16:19:27 d6617561938b api[1465]:         )
Jun 17 16:19:27 d6617561938b api[1465]: ))
Jun 17 16:19:27 d6617561938b api[1465]: ORDER BY "permission"."name" ASC [ 'p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN' ]
Jun 17 16:19:27 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 16:19:27 d6617561938b api[1465]: Parsing GET /Auth/api_key?$select=is_of__actor&$filter=key eq @apiKey&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 16:19:27 d6617561938b api[1465]: Running GET /Auth/api_key?$select=is_of__actor&$filter=key eq @apiKey&@apiKey='p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN'
Jun 17 16:19:27 d6617561938b api[1465]: SELECT "api key"."is of-actor" AS "is_of__actor"
Jun 17 16:19:27 d6617561938b api[1465]: FROM "api key"
Jun 17 16:19:27 d6617561938b api[1465]: WHERE "api key"."key" = $1 [ 'p9mrepDmkWcfYRQ5cCumwfzqexmCWIEN' ]
Jun 17 16:19:27 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=193.27.228.221 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=60107 PROTO=TCP SPT=42542 DPT=3481 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 16:19:30 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 16:19:30 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 16:19:30 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 16:19:30 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 16:19:30 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T16:19:30.022Z, 2 ]
Jun 17 16:19:39 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 16:19:40 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 16:19:40 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 16:19:40 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 16:19:40 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 16:19:40 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T16:19:40.041Z, 2 ]
Jun 17 16:19:43 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=185.156.73.42 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=251 ID=30433 PROTO=TCP SPT=49121 DPT=3368 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 16:19:50 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 16:19:50 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 16:19:50 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 16:19:50 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 16:19:50 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T16:19:50.107Z, 2 ]
Jun 17 16:19:50 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=87.251.74.213 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=248 ID=19479 PROTO=TCP SPT=49410 DPT=2447 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 16:19:52 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 16:20:00 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 16:20:00 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 16:20:00 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 16:20:00 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 16:20:00 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T16:20:00.134Z, 2 ]
Jun 17 16:20:05 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 16:20:10 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 16:20:10 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 16:20:10 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 16:20:10 d6617561938b api[1465]: SET "last heartbeat" = $1
Jun 17 16:20:10 d6617561938b api[1465]: WHERE "service instance"."id" = $2 [ 2020-06-17T16:20:10.149Z, 2 ]
Jun 17 16:20:13 d6617561938b kernel: [UFW BLOCK] IN=ens3 OUT= MAC=56:00:02:d6:66:92:fe:00:02:d6:66:92:08:00 SRC=185.176.27.166 DST=136.244.108.255 LEN=40 TOS=0x00 PREC=0x00 TTL=247 ID=23138 PROTO=TCP SPT=58016 DPT=8128 WINDOW=1024 RES=0x00 SYN URGP=0 
Jun 17 16:20:17 d6617561938b api[1465]: Parsing GET /resin/device?$select=id&$filter=uuid eq 'dc31cc74f56c1516da4369eaee176c49'
Jun 17 16:20:20 d6617561938b api[1465]: Parsing PATCH /resin/service_instance(2)
Jun 17 16:20:20 d6617561938b api[1465]: Running PATCH /resin/service_instance(2)
Jun 17 16:20:20 d6617561938b api[1465]: UPDATE "service instance"
Jun 17 16:20:20 d6617561938b api[1465]: SET "last heartbeat" = $1

Complete log of device journal

https://pastebin.com/cMqs64AV

balena-bug.pdf (410.2 KB)

Hey, I took a look at the device logs that you posted, and saw the following log:

Error: self signed certificate in certificate chain

This implies that the balenaRootCa field in the config.json is not the same as the cert being used on the open-balena instance. Typically this cert is added to the config.json on image download, so it should be correct. Is there a chance you have changed your cert after downloading this image? Can you try redownloading an image and reflashing please?

I tried many times yesterday to re-download, configure with balena os configure and reflash but give me the same logs.
Maybe the issue is related to this? Failing registering device with balenaos-in-container

Hey! Thank you for your comment.

Could you please check the certificate on config.json and make sure the balenaRootCa value is valid (based64-encoded PEM format).
Then run run openssl s_client -connect api.your-domain.com:443 get the certificate and make sure it matches with the balenaRootCa.

let me know your results please

I tried to download the balena-cloud-intel-nuc-2.46.0+rev1-dev. Now i can see my device on balena cli!

So there is probably some issues with openbalena + images > 2.46.

This is the log of the working service if you need it
https://pastebin.com/caPUSmdh

Glad to hear that now it works. We will take a look if there is an issue on what you mentioned. Let us know if we can help you with anything else!