I haven't been able to find any guides specific to...
# fleet
b
I haven't been able to find any guides specific to running Fleet in Unraid. Seems like it would be pretty straight forward. I'm actually pretty new to using dockers and I've only been using Unraid for a couple of months. Here's my current docker setup. Fleet is failing here:
ts=2021-11-10T17:57:37.435547058Z mysql="could not connect to db: dial tcp 127.0.0.1:3306: connect: connection refused, sleeping 14s"
Failed to start: initializing datastore: dial tcp 127.0.0.1:3306: connect: connection refused
z
. I should learn to read.
doesn't look like your networking is squared away, how are you defining the mysql database connection in fleet?
b
exactly 🙂 I'm not sure how to define those settings
ts=2021-11-10T19:34:26.036154553Z mysql="could not connect to db: Error 1045: Access denied for user 'fleet'@'172.17.0.1' (using password: NO), sleeping 8s"
z
@Bryan have you configured the mysql parameters? https://fleetdm.com/docs/deploying/configuration#my-sql
b
making progress 🙂 where is this config stored?
z
The top of that linked doc provides that information 🙂
1
b
I sent env variables in docker settings, seems to take it when I dump config but the logs are still erroring out when I start the docker
z
Does that DB user need a password?
b
it's blank now, but when the docker starts it's trying to connect to 172.17.0.1 (fleet) instead of 172.17.0.2 (mysql)
z
In this screenshot (https://osquery.slack.com/archives/C01DXJL16D8/p1636574926105500?thread_ts=1636570775.103300&cid=C01DXJL16D8) it looks like it's configured for the correct IP. Do you still get an error about the other IP?
b
when I start the docker I get the errors highlighted in pink, when I log into the console of the docker and run "fleet config_dump" it shows the correct IP
if I try running with CLI flags it's still trying to connect to the wrong host
z
172.17.0.3 is the IP of the server that is trying to initiate the connection, so I don't think it's trying to connect to the wrong host. You'd be getting a different error (like
could not connect to db: dial tcp: ...
) if it was trying to connect to a host where the MySQL server is not running.
Can you try connecting via the MySQL CLI to ensure that the user has the appropriate permissions?
b
Thank you @zwass I slept on it and revisited the mysql permissions, I had created the fleet user under localhost instead of 172.17.0.1 ... one step further now
When I try to start the docker, it fails immediately and I see this in the logs now. I'm not sure how to run the prepare db command
I added 'fleet prepare db' under "Post Arguments" I can't tell if it's running but the container doesn't stop now
😍
m
Awesome. I was going ask what you were seeing 🙂
b
this is where I'm currently at. So looks like I need to set up my certs
z
Yep, or you can terminate TLS with a load balancer or proxy and have Fleet just serve HTTP. Either way works.
b
ok 🙂 getting closer but stuck again. Is there an administration page for Fleet that's supposed to load at :8080? or do I need the separate UI docker for that?
z
Yeah, you should now have the dashboard on port 8080
b
Woo! Thanks Everyone for the help! Looks like I may need to put together a guide for anyone else planning to use Unraid :D
z
That would be awesome! We'd happily promote anything you put together on our socials 🙂