# AGENT not reachable, please run 'remoteit agent restart' (CODE: 101)

**URL:** <https://forum.remote.it/t/agent-not-reachable-please-run-remoteit-agent-restart-code-101/761>\
**Category:** Troubleshooting\
**Created:** [April 11, 2023, 6:36am UTC](https://forum.remote.it/t/agent-not-reachable-please-run-remoteit-agent-restart-code-101/761 "2023-04-11T06:36:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardburt](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@richardburt](https://forum.remote.it/u/richardburt)\
**Post date:** [April 11, 2023, 6:36am UTC](https://forum.remote.it/t/agent-not-reachable-please-run-remoteit-agent-restart-code-101/761/1 "2023-04-11T06:36:01Z")

</div>

I’m testing on some machines (via CLI) and about 1 in 5 machines throws up the error:

`AGENT not reachable, please run 'remoteit agent restart' (CODE: 101)`

Restarting the agent does nothing and SSH port fails to register.

Latest version etc.

Any suggestions?

This is the script I’m using to remote deploy:

```auto
remoteit reset --yes
remoteit unregister --yes
remoteit signout --yes
remoteit agent uninstall --yes
remoteit uninstall --yes
taskkill /f /im remoteit*
rm -r -force 'C:\ProgramData\remoteit*'
rm -r -force 'C:\Windows\System32\remoteit*'

cd /temp
curl.exe -k -o remoteit.exe https://downloads.remote.it/cli/v3.0.30/remoteit.x86_64-win.exe
mv .\remoteit.exe C:\Windows\System32\remoteit.exe
cd /windows/system32
remoteit agent install
remoteit signin --user xxx@yyy.com --pass xyz
remoteit register --name "$(hostname)"
remoteit add --name "SSH" --port 22 --type 28
remoteit agent restart
remoteit status

```

---

<div class="post-metadata">

**Author:** ![bstrech](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.remote.it/bstrech/32/266_2.png) [@bstrech](https://forum.remote.it/u/bstrech)\
**Post date:** [April 11, 2023, 4:15pm UTC](https://forum.remote.it/t/agent-not-reachable-please-run-remoteit-agent-restart-code-101/761/2 "2023-04-11T16:15:28Z")

</div>

Are there any difference with the other computers that do not fail? CPU, memory, Windows versions and previous version of remoteit?

Did these computers have remote.it before? Is that the reason you are uninstalling? You typically can just uninstall and it will unregister the device. However if you are just looking to replace the binary and install a new version you should be able to replace the binary and restart the process, this will avoid de-registering and registering the device over and over.  
Check what is stored in PATH for remoteit and verify that it is correct.

---

<div class="post-metadata">

**Author:** ![richardburt](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@richardburt](https://forum.remote.it/u/richardburt)\
**Post date:** [April 12, 2023, 4:04am UTC](https://forum.remote.it/t/agent-not-reachable-please-run-remoteit-agent-restart-code-101/761/3 "2023-04-12T04:04:28Z")

</div>

All of the machines are Windows 10 or 11.

Most of the machines had traces of remoteit from a previous trial over a year ago but they where uninstalled but not fully hence the start of the script removing existing traces.

The binary is being install in c:/windows/system32 so def is stored in PATH.

The devices log into my account and register. At that point they are shown as `Platform: Unknown` and I cannot get any further.

Where (if any) are the logs stored so I can check them out?

When doing a status on machines with the 101 error code I get:

```auto
✓ Fetching status

 owner: xxx@yyy.com, deviceRegistered: false, services: 0, connections: 0

```

---

<div class="post-metadata">

**Author:** ![bstrech](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.remote.it/bstrech/32/266_2.png) [@bstrech](https://forum.remote.it/u/bstrech)\
**Post date:** [April 17, 2023, 6:59pm UTC](https://forum.remote.it/t/agent-not-reachable-please-run-remoteit-agent-restart-code-101/761/4 "2023-04-17T18:59:40Z")

</div>

Hello Richard,  
This could be because the original process fails to be killed and you are still running the old process or the daemon is not really running.

When using the CLI, you can get your logs and configuration files using these instructions:

**Windows**

%ProgramData%\remoteit\

If you are open to a debug session, please send me a PM and I will send you a link to schedule an online debug session.
