Hi folks - trying to test out Fleet to see if it h...
# fleet
e
Hi folks - trying to test out Fleet to see if it has the functionality my org is looking for. Looking to test it locally using
fleetctl preview
and running into some issues. Not sure if this is the right forum, but I’ll throw details in a thread if anyone can lend a hand.
Running
fleetctl preview
on MacOS 14 (M1) is throwing this error:
Copy code
Pulling Docker dependencies...
time="2024-01-24T12:05:56-07:00" level=warning msg="The \"FLEET_LICENSE_KEY\" variable is not set. Defaulting to a blank string."
time="2024-01-24T12:05:56-07:00" level=warning msg="The \"FLEET_LICENSE_KEY\" variable is not set. Defaulting to a blank string."
 fleet02 Skipped - Image is already being pulled by fleet01 
 mysql01 Pulling 
 redis01 Pulling 
 fleet01 Pulling 
2024/01/24 12:05:56 must use ASL logging (which requires CGO) if running as root
2024/01/24 12:05:56 must use ASL logging (which requires CGO) if running as root
2024/01/24 12:05:56 must use ASL logging (which requires CGO) if running as root
error getting credentials - err: exit status 1, out: ``

Error: Failed to run `docker-compose`
Not sure what creds it’s looking for - I would think no key is needed to run the preview experience?
g
This would be a great place @Evan Romasco-Kelly! What version of
fleetctl
would you have going (current is 4.43.3 as of this message)? Recommend in the order these commands if using npm
sudo npm install -g fleetctl
(latest fleetctl as a global package)
sudo fleetctl
(this finishes up the install)
fleetctl preview
(non sudo) Also have noticed some issues with older versions of Docker on Apple Silicon and they've mostly addressed issues in the latest versions.
e
Great - much appreciated, just updated fleetctl (and Docker earlier today)
Missed the
sudo fleetctl
command in the docs here: https://fleetdm.com/try-fleet/fleetctl-preview
Yeah - so getting this error when running `fleetctl preview`:
Copy code
Error: downloading dependencies: unzip download contents: open /Users/myuser/.fleet/preview/.env: permission denied

This error can usually be resolved by fixing the permissions on the /Users/evanromascokelly/.fleet directory, or re-running this command with sudo.
Here are the permissions for the ~/.fleet director:
drwxrwxr-x  4 root       staff  128 Jan 24 15:35 .fleet
and for ~/.fleet/preview/.env:
-rw-r--r--  1 root staff  42 Jan 24 15:22 .env
So maybe staff needs rw on ~/.fleet/preview/.env ?
g
Hmmm possibly, can also attempt
fleetctl preview reset
(might need to try this one as sudo) then try the
fleetctl preview
e
Same error after
sudo fleetctl preview reset
and
fleetctl preview
k
@Evan Romasco-Kelly Sorry Fleetctl is being a pill! Can you try the following for me: 1.
npm remove —purge fleetctl
2.
sudo npm remove —purge fleetctl
3.
npm i -g fleetctl
If you get a permissions error here (pretty common), there’s a good guide here for getting past them. I like the NVM option personally, but any of the solutions are fine. 4. Try running
fleetctl preview
again
e
Hi Kathy - much appreciated for the help. So reinstalled node using NVM, was able to install fleetctl again, but got this error when doing so:
Copy code
Error: downloading dependencies: unzip download contents: open /Users/myuser/.fleet/preview/.env: permission denied

This error can usually be resolved by fixing the permissions on the /Users/myuser/.fleet directory, or re-running this command with sudo.
k
Interesting. I wonder if that folder didn't get removed for some reason during the uninstall (it should have, but weird things happen).
Try deleting the .fleet directory and installing one more time.
If that doesn't do the trick, the path of least resistance might be to just download the binary rather than relying on npm having permissions just right 🙂
Though you could try
npx fleetctl preview
just for giggles.
e
Deleting the .fleet dir worked, thanks so much!
k
Nice! I’ll add that to the list for the next time something like this comes up :)