jby
11/03/2021, 2:07 PMosquery-in-a-box
, but one of the docker containers just crashes immediately after start…
docker logs fleet-preview-server_fleet02_1
panic: unreachable
goroutine 1 [running]:
<http://github.com/fleetdm/goose.(*Client).GetDBVersion(0xc00003c300|github.com/fleetdm/goose.(*Client).GetDBVersion(0xc00003c300>, 0xc0005c81a0, 0x0, 0x0, 0x0)
<http://github.com/fleetdm/goose@v0.0.0-20210209032905-c3c01484bacb/migrate.go:208|github.com/fleetdm/goose@v0.0.0-20210209032905-c3c01484bacb/migrate.go:208> +0x348
<http://github.com/fleetdm/fleet/v4/server/datastore/mysql.(*Datastore).MigrationStatus(0xc0000d5680|github.com/fleetdm/fleet/v4/server/datastore/mysql.(*Datastore).MigrationStatus(0xc0000d5680>, 0x1b08370, 0xc0000bc068, 0xc, 0xc000040015, 0x5)
<http://github.com/fleetdm/fleet/v4/server/datastore/mysql/mysql.go:296|github.com/fleetdm/fleet/v4/server/datastore/mysql/mysql.go:296> +0x8c
main.createPrepareCmd.func2(0xc0000de840, 0xc0004fbc10, 0x0, 0x1)
<http://github.com/fleetdm/fleet/v4/cmd/fleet/prepare.go:50|github.com/fleetdm/fleet/v4/cmd/fleet/prepare.go:50> +0x1af
<http://github.com/spf13/cobra.(*Command).execute(0xc0000de840|github.com/spf13/cobra.(*Command).execute(0xc0000de840>, 0xc0004fbc00, 0x1, 0x1, 0xc0000de840, 0xc0004fbc00)
<http://github.com/spf13/cobra@v1.1.1/command.go:854|github.com/spf13/cobra@v1.1.1/command.go:854> +0x2c2
<http://github.com/spf13/cobra.(*Command).ExecuteC(0xc0000df340|github.com/spf13/cobra.(*Command).ExecuteC(0xc0000df340>, 0xc00063ff58, 0x1, 0x1)
<http://github.com/spf13/cobra@v1.1.1/command.go:958|github.com/spf13/cobra@v1.1.1/command.go:958> +0x375
<http://github.com/spf13/cobra.(*Command).Execute(...)|github.com/spf13/cobra.(*Command).Execute(...)>
<http://github.com/spf13/cobra@v1.1.1/command.go:895|github.com/spf13/cobra@v1.1.1/command.go:895>
main.main()
<http://github.com/fleetdm/fleet/v4/cmd/fleet/main.go:29|github.com/fleetdm/fleet/v4/cmd/fleet/main.go:29> +0x1d3
Luke Heath
11/03/2021, 3:36 PMdocker-compose down
then docker system prune --volumes
then docker-compose up
.jby
11/03/2021, 3:38 PMLuke Heath
11/03/2021, 3:38 PMfleetctl preview
for your build instead. It uses osquery-in-a-box
under the hood, but provides more functionality and control.osquery-in-a-box
directly?jby
11/03/2021, 3:39 PMLuke Heath
11/03/2021, 3:40 PMjby
11/03/2021, 3:41 PMLuke Heath
11/03/2021, 4:19 PMfleetctl preview
on your machine and expose it via something like ngrok: https://ngrok.com/jby
11/03/2021, 4:49 PMLuke Heath
11/03/2021, 4:49 PMjby
11/03/2021, 4:50 PMfleetctl preview
require MySQL and redis?Luke Heath
11/03/2021, 4:50 PMfleetctl preview
provides.jby
11/03/2021, 4:50 PMfleetctl preview
setup MySQL and redis as well?Benjamin Edwards
11/03/2021, 4:51 PMjby
11/03/2021, 4:52 PMfleetctl preview
then? npm? docker?Luke Heath
11/03/2021, 4:56 PMfleetctl preview
runs osquery-in-a-box
under the hood, and provides other helpful functionalityfleetctl preview
you need to have Docker installedfleetctl preview
docker instances will look like:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fd61d6341794 dactiv/osquery:4.5.1-ubuntu16.04 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-ubuntu16-osquery-1
7935bfcb8871 dactiv/osquery:4.5.1-ubuntu14.04 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-ubuntu14-osquery-1
efce9d727e87 dactiv/osquery:4.5.1-centos6 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-centos6-osquery-1
14dc3de0acdf dactiv/osquery:4.5.1-ubuntu18.04 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-ubuntu18-osquery-1
d4e9ce15eec5 dactiv/osquery:4.5.1-centos8 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-centos8-osquery-1
b7160c76bda0 dactiv/osquery:4.5.1-centos7 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-centos7-osquery-1
bdfe2961d612 dactiv/osquery:4.5.1-ubuntu20.04 "osqueryd --flagfile…" 5 seconds ago Up 3 seconds fleet-preview-devices-ubuntu20-osquery-1
01446d708fdd fleetdm/fleet:latest "sh -c '/usr/bin/fle…" 8 seconds ago Up 7 seconds 0.0.0.0:1337->1337/tcp fleet-preview-server-fleet02-1
32e4d80634a4 fleetdm/fleet:latest "sh -c '/usr/bin/fle…" 34 seconds ago Up 32 seconds 0.0.0.0:8412->8412/tcp fleet-preview-server-fleet01-1
c69a15ae6517 mysql:5.7 "docker-entrypoint.s…" 34 seconds ago Up 33 seconds 33060/tcp, 0.0.0.0:3308->3306/tcp fleet-preview-server-mysql01-1
4bf61565a4aa redis:6 "docker-entrypoint.s…" 7 days ago Up 33 seconds 6379/tcp fleet-preview-server-redis01-1
jby
11/03/2021, 4:57 PMfleetctl
on my Linux-server then?Luke Heath
11/03/2021, 4:58 PMnpm
jby
11/03/2021, 4:59 PMBenjamin Edwards
11/03/2021, 5:00 PMjby
11/03/2021, 5:00 PMnpm install -g fleetctl
/usr/bin/fleetctl -> /usr/lib/node_modules/fleetctl/run.js
/usr/lib
└─┬ fleetctl@4.5.0
├─┬ axios@0.21.4
│ └── follow-redirects@1.14.5
├─┬ rimraf@3.0.2
│ └─┬ glob@7.2.0
│ ├── fs.realpath@1.0.0
│ ├─┬ inflight@1.0.6
│ │ └── wrappy@1.0.2
│ ├── inherits@2.0.4
│ ├─┬ minimatch@3.0.4
│ │ └─┬ brace-expansion@1.1.11
│ │ ├── balanced-match@1.0.2
│ │ └── concat-map@0.0.1
│ ├── once@1.4.0
│ └── path-is-absolute@1.0.1
└─┬ tar@6.1.11
├── chownr@2.0.0
├── fs-minipass@2.1.0
├── minipass@3.1.5
├── minizlib@2.1.2
├── mkdirp@1.0.4
└── yallist@4.0.0
fleetctl preview
/usr/lib/node_modules/fleetctl/run.js:43
const install = async () => {
^
SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)
Benjamin Edwards
11/03/2021, 5:01 PMjby
11/03/2021, 5:02 PMnodejs-6.17.1-1.el7.x86_64
fleetctl preview
Installing fleetctl v4.5.0...
Install completed.
Downloading dependencies from production into /root/.fleet/preview...
Pulling Docker dependencies...
The FLEET_LICENSE_KEY variable is not set. Defaulting to a blank string.
Pulling mysql01 ... error
Pulling redis01 ... done
Pulling fleet01 ... error
Pulling fleet02 ... error
ERROR: for fleet01 Impossible to perform platform-targeted pulls for API version < 1.35
ERROR: for mysql01 Impossible to perform platform-targeted pulls for API version < 1.35
ERROR: for fleet02 Impossible to perform platform-targeted pulls for API version < 1.35
Impossible to perform platform-targeted pulls for API version < 1.35
Impossible to perform platform-targeted pulls for API version < 1.35
Impossible to perform platform-targeted pulls for API version < 1.35
Failed to run docker-compose
Luke Heath
11/03/2021, 5:19 PMjby
11/03/2021, 5:19 PMLoaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
This system is not registered with an entitlement server. You can use subscription-manager to register.
<https://download.docker.com/linux/rhel/7Server/x86_64/stable/repodata/repomd.xml>: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
<https://access.redhat.com/articles/1320623>
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
<https://download.docker.com/linux/rhel/7Server/x86_64/stable/repodata/repomd.xml>: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
Luke Heath
11/03/2021, 5:32 PMjby
11/03/2021, 5:32 PMLuke Heath
11/03/2021, 5:33 PMjby
11/03/2021, 5:34 PMLuke Heath
11/03/2021, 5:34 PMjby
11/03/2021, 5:34 PMLuke Heath
11/03/2021, 5:35 PMjby
11/03/2021, 7:15 PMLuke Heath
11/03/2021, 7:23 PMjby
11/03/2021, 8:01 PMLuke Heath
11/04/2021, 9:06 PM