• RAE
  • RAE upgrade gone wrong

Hey guys!, i just started working with my RAE and the first thing i tried was to upgrade it to the lates version.
I was able to register it and tried then to upgrade through SSH using the guide in the getting started docs
However after the file was downloaded RAE restarted i lost access to it over wifi, i was able to SSH into it this time using the USB-C interface and noticed that the wifi interface was off, but it was worse, the robothub service is just not running

The issue seems to be due to some SQL tables not being installed

Heres the full log output:

root@rae:~# robothub-ctl logs
41 02:34:56  I  root/agent : cors: false
41 02:34:56  I  root/agent : changing ownership of '/home/robothub'
41 02:35:08  I  root/agent : directory structure created 
{
  "foldersToPrepare": [
    "/home/robothub/data/detections",
    "/home/robothub/data/logs",
    "/home/robothub/data/sources",
    "/home/robothub/data",
    "/run/robothub",
    "/run/robothub/agent",
    "/home/robothub/data/tunnel"
  ]
}
41 02:35:08  I  root/agent : unique machine id: 4d66dbd19a6d2e83a8de542f533de9aea95c2e9f33cff9d639df020530de3d19
41 02:35:08  I  root/agent : rootless process spawned
Started RobotHub Agent.
41 02:35:10  I  logger : NODE_ENV: production
41 02:35:10  I  logger : loading bootstrap configuration from "/etc/robothub-agent/agent.toml"
41 02:35:11  I  user/agent : initializing unprivileged process
41 02:35:11  I  user/agent : dropping privileges...
41 02:35:11  I  user/agent : rootless PID: 2003
41 02:35:11  I  user/agent : member of groups (for device access): dialout, plugdev
41 02:35:11  I  user/agent : reloading configuration...
41 02:35:11  I  user/agent : loading bootstrap configuration from "/etc/robothub-agent/agent.toml"
[2024-02-10 02:35:11.508] [warning] USB protocol not available - If running in a container, make sure that the following is set: "-v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule='c 189:* rmw'"
41 02:35:12  I  user/agent : imported entrypoint
41 02:35:12  I  user/agent : imported local broker
41 02:35:12  E  user/agent : failed to initialize context 
{
  "error": {
    "code": "SQLITE_ERROR",
    "message": "table devices_status has no column named bootloader_version",
    "name": "SqliteError",
    "stack": "SqliteError: table devices_status has no column named bootloader_version\n    at Database.prepare (file:///usr/libexec/robothub/robothub-agent.mjs:196509:26)\n    at new AgentDevicesStatus (file:///usr/libexec/robothub/robothub-agent.mjs:157625:28)\n    at databaseBuilder (file:///usr/libexec/robothub/robothub-agent.mjs:198569:23)\n    at initializeContext (file:///usr/libexec/robothub/robothub-agent.mjs:233984:22)\n    at file:///usr/libexec/robothub/robothub-agent.mjs:234075:45\n    at file:///usr/libexec/robothub/robothub-agent.mjs:26737:16"
  }
}
41 02:35:12  E  user/agent : init crashed! 
{
  "error": {
    "cause": {
      "code": "SQLITE_ERROR",
      "message": "table devices_status has no column named bootloader_version",
      "name": "SqliteError",
      "stack": "SqliteError: table devices_status has no column named bootloader_version\n    at Database.prepare (file:///usr/libexec/robothub/robothub-agent.mjs:196509:26)\n    at new AgentDevicesStatus (file:///usr/libexec/robothub/robothub-agent.mjs:157625:28)\n    at databaseBuilder (file:///usr/libexec/robothub/robothub-agent.mjs:198569:23)\n    at initializeContext (file:///usr/libexec/robothub/robothub-agent.mjs:233984:22)\n    at file:///usr/libexec/robothub/robothub-agent.mjs:234075:45\n    at file:///usr/libexec/robothub/robothub-agent.mjs:26737:16"
    },
    "message": "Unable to initialize configuration!",
    "name": "Error",
    "stack": "Error: Unable to initialize configuration!\n    at initializeContext (file:///usr/libexec/robothub/robothub-agent.mjs:234040:11)\n    at file:///usr/libexec/robothub/robothub-agent.mjs:234075:45\n    at file:///usr/libexec/robothub/robothub-agent.mjs:26737:16"
  }
}
41 02:35:12  I  root/agent : rootless process exited with [object Object]

I have tried resetting the device, but no luck.
I can enable the interface and get internet access and i have tried to reinstall various versions of the agent, but the issue remains
Any ideas about how to fix this issue? any help will be greatly appreciated.

  • AndresArrieta

    Thank you for the detailed steps; we discovered that the URL to the firmware in our docs is incorrect and points to a non-RAE firmware. Sorry for the trouble.

    The correct one in this case is:

    mender --install https://luxonisos.fra1.digitaloceanspaces.com/build/1.14-rae+6263cb8c60f2cbfc80cc523f2b37581eb38139aa/luxonisos-1.14-rae.dm-verity.mender && reboot

    Also note that if you are using RobotHub, you can easily upgrade through the Web UI using the "Upgrade available" button. That always installs the correct FW for your device.

jakaskerl

I basically followed these steps:

  1. Connected RAE to the Wifi using the QR code method
  2. Found the IP and Added it to the robothub
  3. Connected to RAE through SSH
  4. Ran the command mender --install https://luxonisos.fra1.digitaloceanspaces.com/release/1.14/luxonisos-1.14.dm-verity.mender && reboot
  5. RAE restarted (from what i could see in the screen of it) but never came online again.

    AndresArrieta

    Thank you for the detailed steps; we discovered that the URL to the firmware in our docs is incorrect and points to a non-RAE firmware. Sorry for the trouble.

    The correct one in this case is:

    mender --install https://luxonisos.fra1.digitaloceanspaces.com/build/1.14-rae+6263cb8c60f2cbfc80cc523f2b37581eb38139aa/luxonisos-1.14-rae.dm-verity.mender && reboot

    Also note that if you are using RobotHub, you can easily upgrade through the Web UI using the "Upgrade available" button. That always installs the correct FW for your device.

      8 days later