Title
#fleet
b

Bryan

11/10/2021, 6:59 PM
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

Zach Zeid

11/10/2021, 7:06 PM
. I should learn to read.
7:09 PM
doesn't look like your networking is squared away, how are you defining the mysql database connection in fleet?
b

Bryan

11/10/2021, 7:18 PM
exactly 🙂 I'm not sure how to define those settings
7:35 PM
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"
zwass

zwass

11/10/2021, 7:40 PM
@Bryan have you configured the mysql parameters? https://fleetdm.com/docs/deploying/configuration#my-sql
b

Bryan

11/10/2021, 7:57 PM
making progress 🙂 where is this config stored?
zwass

zwass

11/10/2021, 8:00 PM
The top of that linked doc provides that information 🙂
b

Bryan

11/10/2021, 8:08 PM
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
zwass

zwass

11/10/2021, 8:26 PM
Does that DB user need a password?
b

Bryan

11/10/2021, 8:27 PM
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)
8:28 PM
zwass

zwass

11/10/2021, 8:31 PM
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

Bryan

11/10/2021, 8:33 PM
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
9:39 PM
if I try running with CLI flags it's still trying to connect to the wrong host
zwass

zwass

11/10/2021, 11:06 PM
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.
11:08 PM
Can you try connecting via the MySQL CLI to ensure that the user has the appropriate permissions?
b

Bryan

11/11/2021, 4:27 PM
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
4:27 PM
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
4:32 PM
I added 'fleet prepare db' under "Post Arguments" I can't tell if it's running but the container doesn't stop now
4:34 PM
😍
Martavis Parker

Martavis Parker

11/11/2021, 4:39 PM
Awesome. I was going ask what you were seeing 🙂
b

Bryan

11/11/2021, 6:28 PM
this is where I'm currently at. So looks like I need to set up my certs
zwass

zwass

11/11/2021, 6:43 PM
Yep, or you can terminate TLS with a load balancer or proxy and have Fleet just serve HTTP. Either way works.
b

Bryan

11/11/2021, 8:49 PM
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?
zwass

zwass

11/11/2021, 8:51 PM
Yeah, you should now have the dashboard on port 8080
b

Bryan

11/11/2021, 8:58 PM
Woo! Thanks Everyone for the help! Looks like I may need to put together a guide for anyone else planning to use Unraid 😄
zwass

zwass

11/11/2021, 9:04 PM
That would be awesome! We'd happily promote anything you put together on our socials 🙂