Flyctl Doctor reports errors consistently

I only used flyctl doctor for the first time today while debugging secret setting issues that turned out to be related to the maintenance/downtime from today, so I’m unable to report if this ever worked.

Here’s what I currently see:

Agent         	couldn't ping agent: dial unix /Users/robcole/.fly/fly-agent.sock: connect: no such file or directory
Docker (local)	PASS
Probe (app)   	failed establishing agent connection: agent: failed to start
Token         	PASS
Unix socket   	PASS

When I checked the directory, everything seemed ok:

➜  .fly ls -al
total 16
drwx------   6 robcole  staff   192 Feb  7 14:56 .
drwxr-xr-x+ 99 robcole  staff  3168 Feb  7 14:57 ..
drwx------   3 robcole  staff    96 Feb  7 14:56 agent-logs
-rw-------   1 robcole  staff   545 Feb  7 14:56 config.yml
srwxr-xr-x   1 robcole  staff     0 Feb  7 14:56 fly-agent.sock
-rw-------   1 robcole  staff   277 Feb  7 14:56 state.yml

I removed the ~/.ssh directory and re-auth’d to fly and re-auth’d, but everything was still in the same state. Flyctl is installed via homebrew, latest version for me, and I had the story with brew uninstall for flyctl and reinstall.

Do you see an error with flyctl agent run?

➜  recollection git:(add-link-indexing) flyctl agent run
2022/02/07 16:09:35.645020 srv another instance of the agent is already running
Error another instance of the agent is already running


It looks like another instance of the agent is already running. Please stop it before starting a new one.

Trying to stop the existing agent:

➜  recollection git:(add-link-indexing) flyctl agent stop
Error failed dialing agent: dial unix /Users/robcole/.fly/fly-agent.sock: connect: no such file or directory

If you run ps aux | grep "flyctl agent" do you see an entry like this?

kurt             63861   0.0  0.1 409705664  22352 s004  S     3:36PM   0:24.44 fly agent run /Users/kurt/.fly/agent-logs/1703893049.log

You can kill -9 <pid> to stop it manually.

2 Likes

Thanks!