Device authentication

Hello,

After I have flashed an image onto a device and boot the device I don’t see an authentication request in the web interface. Only after I reboot the device an authentication request will be shown. If I want to use the troubleshoot plugin I have to reboot one more time until I can login onto the device using the troubleshoot plugin. Is this the expected behavior?

Summay:

  • First boot: Device doesn’t send authentication request
  • Second boot: Device sends authentication request but troubleshoot is not yet working
  • Third boot: Now troubleshoot is also working

Output from mender-authd after first boot:

Jan 01 01:00:14 scarthgap systemd[1]: Started Mender authentication service.
Jan 01 01:00:15 scarthgap mender-auth[558]: record_id=1 severity=error time="1970-Jan-01 01:00:15.317118" name="Global" msg="Got error loading the private key from the keystore: No key in memory: Error loading private key from /var/lib/mender/mender-agent.pem: Failed to load the private key from: /var/lib/mender/mender-agent.pem error: error:80000002:system library::No such file or directory
Jan 01 01:00:15 scarthgap mender-auth[558]: System error, code=2, No such file or directory"
Jan 01 01:00:15 scarthgap mender-auth[558]: record_id=2 severity=info time="1970-Jan-01 01:00:15.317642" name="Global" msg="Generating new RSA key"
Jan 01 01:00:16 scarthgap mender-auth[558]: record_id=3 severity=info time="1970-Jan-01 01:00:16.326953" name="Global" msg="The authentication daemon is now ready to accept incoming authentication request"

The Mender versions I’m using are:

# mender-auth --version
4.0.3
# mender-connect --version
mender-connect version 2.2.1    runtime: go1.22.12