OS and kernel version below:
Operating System: TorizonCore Upstream 6.6.1+build.12 (kirkstone)
Kernel: Linux 6.1.84-6.6.1+git.347385861c50
I copied the command from the web UI:
curl -fsSL https://app.torizon.io/statics/scripts/provision-device.sh | sudo bash -s -- -t [token info] && sudo systemctl restart aktualizr fluent-bit
I reinstalled the OS from scratch from the Toradex easy installer, I will post what I am doing step by step that’s resulting in this behavior.
- On boot, with no modifications other than a password change. Run web UI command:
curl -fsSL https://app.torizon.io/statics/scripts/provision-device.sh | sudo bash -s -- -t [token info] && sudo systemctl restart aktualizr fluent-bit
Result:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
- Grab and add certificate:
sudo mkdir -p /usr/local/share/ca-certificates/
openssl s_client -showcerts -connect kc.torizon.io:443 </dev/null 2>/dev/null | sed -n '/BEGIN/,/END/p' > /tmp/torizon.crt
sudo cp /tmp/torizon.crt /usr/local/share/ca-certificates/torizon.crt
sudo update-ca-certificates
Result:
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
rehash: warning: skipping torizon.pem,it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
- Run web UI provisioning command again with a new token:
curl -fsSL https://app.torizon.io/statics/scripts/provision-device.sh | sudo bash -s -- -t [new token info] && sudo systemctl restart aktualizr fluent-bit
Result:
Checking dependencies...
== Registering device (deviceID: colibri-imx6-04836707) in system, and downloading credentials.
== Backing up any existing ota device creds
jq: error: Could not open file /var/sota/import/info.json: No such file or directory
jq: error: Could not open file /var/sota/import/info.json: No such file or directory
== Extracing device credentials from archive
Archive: device.zip
inflating: client.pem
inflating: pkey.pem
inflating: root.crt
inflating: info.json
inflating: gateway.url
== Success!
Device has been registered with the system and credentials are in place!
{
"registeredName": "Firm-Granola",
"deviceID": "colibri-imx6-04836707-1dfe7b",
"deviceUuid": "1dfe7ba7-94f5-452b-933c-ea6a5616f3df",
"createdAt": "2024-04-23T12:45:54Z"
}
== Restarting services...
Restarting aktualizr...
Restarting fluent-bit...
Removing RAC files...
Aktualizr should automatically connect with the server. For logs run: sudo journalctl -f -u aktualizr*
sudo journalctl -f -u aktualizr*
Result:
Apr 23 12:46:19 colibri-imx6-04836707 aktualizr-torizon[5044]: curl error 60 (http code 0): SSL peer certificate or SSH remote key was not OK
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: curl error 60 (http code 0): SSL peer certificate or SSH remote key was not OK
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: PROXY: initializing...
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: PROXY: using TCP port 8850.
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: Offline Updates are disabled
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: PROXY: starting thread.
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: PROXY: listening to connections...
Apr 23 12:46:21 colibri-imx6-04836707 aktualizr-torizon[5044]: curl error 60 (http code 0): SSL peer certificate or SSH remote key was not OK
Apr 23 12:46:22 colibri-imx6-04836707 aktualizr-torizon[5044]: curl error 60 (http code 0): SSL peer certificate or SSH remote key was not OK
Apr 23 12:46:24 colibri-imx6-04836707 aktualizr-torizon[5044]: curl error 60 (http code 0): SSL peer certificate or SSH remote key was not OK
Thanks,
Jon