Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Can't start osqueryd test instances via docker-compose on Linux #2127

Closed
nyanshak opened this issue Nov 1, 2019 · 0 comments · Fixed by #2319
Closed

Can't start osqueryd test instances via docker-compose on Linux #2127

nyanshak opened this issue Nov 1, 2019 · 0 comments · Fixed by #2319

Comments

@nyanshak
Copy link
Contributor

nyanshak commented Nov 1, 2019

What version of fleet are you using (fleet version --full)?

d453ca3 (master)

What operating system are you using?

Linux

uname -a
Linux <hostname> 5.3.7-arch1-2-ARCH #1 SMP PREEMPT @1572002934 x86_64 GNU/Linux

What did you do?

Following tools/osquery/README.md:

export KOLIDE_OSQUERY_VERSION="latest"
export ENROLL_SECRET="<secret>"
docker-compose up

What did you expect to see?

4 test hosts connecting to fleet locally

What did you see instead?

centos7-osquery_1   | W1101 02:15:39.805672     8 tls_enroll.cpp:75] Failed enrollment request to https://host.docker.internal:8080/api/v1/osquery/enroll (Request error: Host not found (authoritative)) retrying...

It looks like previously, this file used extra_hosts block in compose file to add an extra host called dockerhost set to the env var $LOCALHOST, then used dockerhost in the tls_hostname in the flag file.

In #2019, this was changed to use host.docker.internal instead, with tls_hostname set to host.docker.internal, to enable starting osquery instances with less configuration.

However, Docker on Linux does not add the host.docker.internal DNS name, so this prevents starting the osqueryd test containers from connecting to fleet on Linux machines.

nyanshak added a commit to nyanshak/fleet that referenced this issue Oct 7, 2020
* Fix kolide#2127 by allowing users to specify addresses other than
`host.docker.internal` for the `tls_hostname` in the example.
nyanshak added a commit to nyanshak/fleet that referenced this issue Oct 7, 2020
* Fix kolide#2127 by allowing users to specify addresses other than
`host.docker.internal` for the `tls_hostname` in the example.
zwass pushed a commit that referenced this issue Oct 9, 2020
* Use YAML anchors to avoid repeating config blocks
* Use docker volumes to persist data for mysql
* Allow setting `FLEET_SERVER` (fixes #2127) when using the docker-compose file to spin up multiple osquery clients
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant