Agent version mismatch, client=3.1.2, agent=4.0.7 (CODE: 10001)

Hi, I had to restore my device and after as it seems successful start of the agent:

pi@raspberrypi:~ $ R3_REGISTRATION_CODE="xxxxx" sh -c "$(curl -L https://downloads.remote.it/cli/install_cli.sh)"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10317  100 10317    0     0  26867      0 --:--:-- --:--:-- --:--:-- 26937
licensekey: xxxxx
Creating registration file
* Distribution: raspbian

* OS: Raspbian

* Installing the remoteit CLI package for arm-v6

* CLI Installion:

command: curl -L https://downloads.remote.it/cli/latest/remoteit.arm-v6-linux --output /tmp/remoteit
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2939k  100 2939k    0     0  2351k      0  0:00:01  0:00:01 --:--:--     0
 ✓ status : OK, execute: remoteit agent stop
 ✓ status : OK, agent stopped
 ✓ status : OK, execute: remoteit tools install
 ✓ status : OK, tools installed to: '/usr/bin/connectd', '/usr/bin/muxer', '/usr/bin/demuxer', '/usr/bin/schannel'
 ✓ status : OK, execute: remoteit agent install
 ✓ status : OK, agent installed and started

I am receiving the below error msg on my raspberry pi zero:

pi@raspberrypi:~ $ sudo remoteit status
 × Agent version mismatch, client=3.1.2, agent=4.0.7 (CODE: 10001)

What could be the issue?

looks like there are multiple versions of software there.

Can you :

which remoteit

and

ps auwx | grep remoteit

I think that your service is starting with the newer software and your path has preference to the older software.

I think those commands should sort out if that is the case.

-Mike

Indeed, as I can see from the printout:


pi@raspberrypi:~ $ ps auwx | grep remoteit
root     20261  0.0  2.7 542192 12284 ?        Ssl  13:57   0:28 /usr/bin/remoteit run --config /etc/remoteit/config.json
pi       30814  0.0  0.4   7432  2056 pts/1    S+   23:47   0:00 grep --color=auto remoteit
pi@raspberrypi:~ $ which remoteit
/usr/local/bin/remoteit
pi@raspberrypi:~ $ sudo remoteit version
3.1.2
pi@raspberrypi:~ $ sudo /usr/bin/remoteit version
4.0.7

So, I removed everything and run again the curl command and now I am getting:

pi@raspberrypi:~ $ sudo remoteit status
 ✓ status : OK, execute: remoteit status

 owner: fotis.karelas@gmail.com, deviceRegistered: false, services: 0, connections: 0

ok so there is no registration.

Check /etc/remoteit/config.json should exist, if not something went wrong

do not post the contents of that file here.

It seems that you possibly installed both the remote.it device package and the CLI when you restored.
Do you really need the CLI or just the device package? The difference being that the CLI will allow your raspberry pi to make connections from that device to another device. If you only need to support inbound connections, then you just need the device package.
Once you determine that, then you can uninstall the extra package and install the correct one.
If you just need to support inbound connections only, we need to uninstall the CLI by doing the following

# Remove remoteit directory
rm -rf /etc/remoteit

# Remove New CLI if exists
sudo remoteit uninstall --yes

# # Manually remove remoteit binary, sometimes the uninstaller fails to remove it
sudo rm /usr/bin/remoteit

# Remove Old CLI and device package if exists
sudo apt-get remove -y --purge remoteit

Then we will need to install the device package and re-register the device by restoring it. Run the following command, replacing xxxx with the restore code for the device.

R3_REGISTRATION_CODE="xxxx" sh -c "$(curl -L https://downloads.remote.it/remoteit/install_agent.sh)"

If you truly need the CLI, then uninstall the device package by running:

sudo apt purge remoteit

Then we will need to install the CLI and re-register the device by restoring it, run the following command, replacing xxxx with the restore code for the device.

R3_REGISTRATION_CODE="xxxx" sh -c "$(curl -L https://downloads.remote.it/cli/install_cli.sh)"