Hello, I tried to write my own docker-compose.yml ...
# fleet
a
Hello, I tried to write my own docker-compose.yml file to initiate the containers and set fleet up, but I encountered the following issues:
mysql    | 2021-02-24T12:15:39.082521Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql    | 2021-02-24T12:15:39.124073Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
mysql    | mbind: Operation not permitted
fleet_1  | Migrations completed.
fleet_1  | {"component":"service","err":null,"level":"info","method":"ListUsers","took":"1.5976ms","ts":"2021-02-24T12:15:56.4871854Z","user":"none"}
fleet_1  | {"address":"0.0.0.0:8080","msg":"listening","transport":"https","ts":"2021-02-24T12:15:56.4884663Z"}
fleet_1  | {"terminated":"open /tmp/server.cert: no such file or directory","ts":"2021-02-24T12:15:56.4908412Z"}
fleet3_fleet_1 exited with code 0
When I run "netstat -an" I can see active connections on the ports 3600(MySQL) and 6379(Redis), but none on port 8412. However I tried to do the same with MySQL 5.7.32 instead of MySQL 8.0, but I can't see any big difference:
mysql    | 2021-02-24T12:31:48.479241Z 0 [Note] mysqld: ready for connections.
mysql    | Version: '5.7.32-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
fleet_1  | Migrations completed.
mysql    | 2021-02-24T12:31:57.688914Z 3 [Note] Aborted connection 3 to db: 'kolide' user: 'root' host: '172.25.0.2' (Got an error reading communication packets)
fleet_1  | {"component":"service","err":null,"level":"info","method":"ListUsers","took":"883µs","ts":"2021-02-24T12:31:57.7522451Z","user":"none"}
fleet_1  | {"address":"0.0.0.0:8080","msg":"listening","transport":"https","ts":"2021-02-24T12:31:57.7531963Z"}
fleet_1  | {"terminated":"open /tmp/server.cert: no such file or directory","ts":"2021-02-24T12:31:57.7539713Z"}
mysql    | 2021-02-24T12:31:57.755718Z 4 [Note] Aborted connection 4 to db: 'kolide' user: 'root' host: '172.25.0.2' (Got an error reading communication packets)
fleet3_fleet_1 exited with code 0
. By the way, I also tried to run the fleet image I pulled from docker concurrently with MySQL and Redis, but once again there's some issues with the database:
ts=2021-02-24T12:59:17.5333641Z mysql="could not connect to db: dial tcp 127.0.0.1:3306: connect: connection refused, sleeping 14s"
Error initializing datastore: dial tcp 127.0.0.1:3306: connect: connection refused.
Does anyone have an advice on how to correctly set up fleet and all its dependencies? I uploaded the docker-compose.yml in the attachments.
z
What are you looking to achieve here? Perhaps you are best off using
fleetctl preview
which will automatically set you up a testing environment locally? It looks like your Fleet server is exiting because there is no certificate in
/tmp/server.cert
.