jf
03/23/2020, 2:23 PMvagrant up
, I'm getting this error:
default: [+] Generating /opt/osctrl/config/admin.json configuration
default: {
default: "admin": {
default: "listener": "127.0.0.1",
default: "port": "9001",
default: "host": "10.10.10.5",
default: "auth": "db",
default: "logging": "db"
default: }
default: }
default: ln:
default: failed to create symbolic link '/opt/osctrl/tmpl_admin/components/page-head.html'
default: : Protocol error
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Any thoughts on what I can do to get past this?javuto
03/27/2020, 12:00 AMjavuto
04/01/2020, 1:59 AMDavid Cowen
05/09/2020, 9:52 PMcrimsonknave
07/14/2020, 7:43 PMStatus Logs
and Result Logs
for a node? They are both empty for the docker demo.edub
07/14/2020, 8:37 PMconfig.cpp:1214] Refreshing configuration state
tls.cpp:253] TLS/HTTPS POST request to URI: <https://172.18.222.177/dev/config>
{"node_key":"a19372cbf11bfee5081a1e2ed8b2ed69dad7a997"}
{"node_invalid":true}
which causes client to re-enrolledub
07/14/2020, 9:38 PMtp-utils.go:98: ---------------- request
POST /dev/config HTTP/1.0
[1B blob data]
{"node_key":"38a8ab00081345148383816a2e52d1b23f9af0b7"}
---------------- end
osctr-tls logs
handlers.go:295: Configuration: {NodeInvalid:true}
client
http-utils.go:98: ---------------- request
POST /dev/enroll HTTP/1.0
[1B blob data]
{"enroll_secret":"q7mCq.....uuid":"F645A1F0-...-...-...-F027A8B7D3F7"}}}
---------------- end
server
handlers.go:231: Response: {NodeKey:93eab8bc35bc9343f788bb60a65b1cf0f9f9a57a NodeInvalid:false}
client
http-utils.go:98: ---------------- request
POST /dev/enroll HTTP/1.0
[1B blob data]
{"enroll_secret":"q7mCq.....uuid":"F645A1F0-...-...-...-F027A8B7D3F7"}}}
---------------- end
server
handlers.go:231: Response: {NodeKey:446fd3cc66d3bbf538538ae06296b851e27b126b NodeInvalid:false}
handlers.go:293: Configuration: {
"options": {
"schedule_splay_percent": 0,
"verbose": true,
"disable_events": true,
"disable_audit": false
}
}
client
http-utils.go:98: ---------------- request
POST /dev/log HTTP/1.0
[1B blob data]
{"node_key":"93eab8bc35bc9343f788bb60a65b1cf0f9f9a57a"...."message":"TLS/HTTPS POST request to URI: <https://172.18.222.177/dev/read>","version":"4.3.0"}]}
---------------- end
server
handlers.go:366: Response: {NodeInvalid:true}
dabm
01/07/2021, 9:58 AMjavuto
05/31/2021, 8:03 AMRizhkov Andrew
06/21/2022, 6:46 AMgit clone <https://github.com/jmpsec/osctrl.git>
cd osctrl/deploy/docker
cp conf/tls/openssl.cnf.example conf/tls/openssl.cnf
nano conf/tls/openssl.cnf
openssl req -x509 -new -nodes -keyout conf/tls/tls.key -out conf/tls/tls.crt -config conf/tls/openssl.cnf
uuidgen | shasum -a 256 | awk '{print $1}'
mv env.example .env
nano .env
cd /home/andrewri/Downloads/osctrl
./deploy/docker/dockerize.sh -u -b -f
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './deploy/docker/docker-compose-prod.yml'
I tried to download version 0.2.7 and install it. Repeated the same steps. The error reappears.
[+] Building containers from deploy/docker/docker-compose-prod.yml and using ./.env
WARNING: The NGINX_VERSION variable is not set. Defaulting to a blank string.
WARNING: The OSCTRL_VERSION variable is not set. Defaulting to a blank string.
WARNING: The OSQUERY_VERSION variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_DB_NAME variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_DB_USERNAME variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_DB_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The JWT_SECRET variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_VERSION variable is not set. Defaulting to a blank string.
ERROR: The Compose file './deploy/docker/docker-compose-prod.yml' is invalid because:
services.osctrl-admin.build contains unsupported option: 'target'
services.osctrl-api.build contains unsupported option: 'target'
services.osctrl-cli.build contains unsupported option: 'target'
services.osctrl-tls.build contains unsupported option: 'target'
services.ubuntu-osquery.build contains unsupported option: 'target'
What am I doing wrong? Ubuntu Server 20.04Rizhkov Andrew
06/21/2022, 11:30 PM/deploy/docker/Dockerfile-osctrl-prod
and /deploy/docker/docker-compose-prod.yml
files from version 0.2.7 to 0.2.9. In the root folder (and not in /deploy/docker/
, as I originally did), I executed cp .env.example .env
and changed the configuration for myself. Run ./deploy/docker/dockerize.sh -u -b -f
. Compilation started and ended with an error:
Step 7/52 : RUN go build -o bin/osctrl-tls tls/*.go
---> Running in 0ff4198914a6
malformed import path "tls/.go": invalid char ''
ERROR: Service 'osctrl-api' failed to build: The command '/bin/sh -c go build -o bin/osctrl-tls tls/*.go' returned a non-zero code: 1
Rizhkov Andrew
06/22/2022, 12:09 AM"tls/*.go": invalid char '*'
javuto
07/01/2022, 9:17 PMjavuto
07/10/2022, 12:43 PMEric Ruiz Gimenez
11/07/2022, 8:20 PMEric Ruiz Gimenez
11/07/2022, 8:24 PMFrancesco Gianantoni
12/25/2022, 9:35 AMGitHub
01/01/2023, 5:52 PMGitHub
01/01/2023, 5:56 PM<https://github.com/jmpsec/osctrl/tree/main|main>
by javuto
<https://github.com/jmpsec/osctrl/commit/000d4270d38d254523fdcd75319328fbb669b14c|000d4270>
- Handle osquery upgrade in enroll oneliner
<https://github.com/jmpsec/osctrl/commit/c6405805096d1e017731c414e330cbd35b08923f|c6405805>
- Merge pull request #329 from jmpsec/osquery-update-oneliner
jmpsec/osctrlGitHub
01/01/2023, 11:47 PMGitHub
01/01/2023, 11:50 PM<https://github.com/jmpsec/osctrl/tree/main|main>
by javuto
<https://github.com/jmpsec/osctrl/commit/302a45e0568aea5d58d540888fe2a68589651a10|302a45e0>
- Using env variables for S3 configurations
<https://github.com/jmpsec/osctrl/commit/83c38ba22141f1ff22cec3ed4a9e2485812ea6a0|83c38ba2>
- Merge pull request #330 from jmpsec/s3-env-config-fix
jmpsec/osctrlGitHub
01/05/2023, 12:45 AMosctrl-tls
by environment_id
and node_id
jmpsec/osctrlGitHub
01/05/2023, 1:28 AM<https://github.com/jmpsec/osctrl/tree/main|main>
by javuto
<https://github.com/jmpsec/osctrl/commit/12e52fc2bb68a68541712d3f12169cffd0a7900e|12e52fc2>
- Keep track of ingested data
<https://github.com/jmpsec/osctrl/commit/e55b15c86213e72e6de4ec2b472d5d3908eeced5|e55b15c8>
- Merge pull request #331 from jmpsec/ingested-bytes-storage
jmpsec/osctrlGitHub
01/05/2023, 6:20 PMGitHub
01/05/2023, 6:22 PM<https://github.com/jmpsec/osctrl/tree/main|main>
by javuto
<https://github.com/jmpsec/osctrl/commit/3a3d522e9c2429617db17375edc8db321286049e|3a3d522e>
- Using sh instead of bash for better compatibility
<https://github.com/jmpsec/osctrl/commit/00af1a48caba21df799beacb03206a1c727b0aad|00af1a48>
- Merge pull request #332 from jmpsec/fix-enroll-script
jmpsec/osctrlGitHub
01/08/2023, 12:41 PM_OS
variable for enrolling
jmpsec/osctrl
✅ All checks have passed
4/4 successful checksGitHub
01/08/2023, 12:43 PM<https://github.com/jmpsec/osctrl/tree/main|main>
by javuto
<https://github.com/jmpsec/osctrl/commit/404aba0528699a5d0600dcf2698c2c6ac03c182a|404aba05>
- Small fix for enroll.sh
<https://github.com/jmpsec/osctrl/commit/bcdd75062dcc9225c978b7733a5e74e960628393|bcdd7506>
- Merge pull request #333 from jmpsec/fix-scripts-2
jmpsec/osctrlGitHub
01/11/2023, 4:30 PMbytea
for PostgreSQL and in golang that is translated to json.RawMessage
which is an alias of []byte
. In some cases the content was triggering an encoding error that would prevent nodes to be enrolled:
handlers.go:284: error creating node Create failed to encode args[20]: unable to encode json.RawMessage{...} into binary format for bytea (OID 17): cannot find encode plan
Using just an string
, (TEXT
in pg) solves the issue.
jmpsec/osctrlGitHub
01/11/2023, 4:37 PM<https://github.com/jmpsec/osctrl/tree/main|main>
by javuto
<https://github.com/jmpsec/osctrl/commit/b6e9b84fa8ed870d2bcf158cf83026b8c0107208|b6e9b84f>
- Fix for encoding error enrolling new nodes
<https://github.com/jmpsec/osctrl/commit/b929e824103a50034b1340e6b6c9fef3176d8a69|b929e824>
- Merge pull request #334 from jmpsec/encoding-error-bytea
jmpsec/osctrlGitHub
01/19/2023, 10:37 PM./deploy/docker/dockerize.sh -u -b -f -J -D
[+] ROOTDIR=.
[+] DOCKERDIR=./deploy/docker
[+] Preparing certificates for osctrl
[+] Generating deploy/docker/conf/tls/osctrl.key and deploy/docker/conf/tls/osctrl.crt with OpenSSL
[+] Generated a 65 bytes JWT secret
OSCTRL_VERSION=0.3.1
OSQUERY_VERSION=5.6.0
NGINX_VERSION=1.21.1-alpine
POSTGRES_VERSION=10-alpine
POSTGRES_DB_NAME=osctrl
POSTGRES_DB_USERNAME=osctrl
POSTGRES_DB_PASSWORD=osctrl
REDIS_PASSWORD=osctrl
JWT_SECRET=
[+] Building containers from deploy/docker/docker-compose-dev.yml and using ./.env
postgres uses an image, skipping
Building osctrl-api
Sending build context to Docker daemon 7.362MB
Step 1/47 : FROM golang:latest AS osctrl-tls
---> 8295ad49803f
Step 2/47 : ENV GO111MODULE=on
---> Using cache
---> 6d8609b1626e
Step 3/47 : RUN apt-get update -y && apt-get install zip curl -y
---> Using cache
---> 366c516edee0
Step 4/47 : ARG POSTGRES_DB_NAME
---> Using cache
---> 7273ccf2cb69
Step 5/47 : ARG POSTGRES_DB_USERNAME
---> Using cache
---> 95e7d0334cd9
Step 6/47 : ARG POSTGRES_DB_PASSWORD
---> Using cache
---> 32f897bfb3bd
Step 7/47 : ARG JWT_SECRET
---> Using cache
---> 54f1464a540e
Step 8/47 : RUN useradd -ms /bin/bash osctrl-tls
---> Running in 85cfe40adc14
Removing intermediate container 85cfe40adc14
---> 5a897f7c6fae
Step 9/47 : RUN mkdir -p /opt/osctrl/
---> Running in 4228624a8af4
Removing intermediate container 4228624a8af4
---> 13d81ecd7c56
Step 10/47 : RUN mkdir -p /opt/osctrl/bin
---> Running in 8b71285c95a9
Removing intermediate container 8b71285c95a9
---> a1288275f202
Step 11/47 : RUN mkdir -p /opt/osctrl/config
---> Running in 8590ae5ca1db
Removing intermediate container 8590ae5ca1db
---> a474b1e8756f
Step 12/47 : RUN go build -o /opt/osctrl/bin/osctrl-tls tls/*.go
---> Running in 7586c50d3fad
malformed import path "tls/*.go": invalid char '*'
The command '/bin/sh -c go build -o /opt/osctrl/bin/osctrl-tls tls/*.go' returned a non-zero code: 1
ERROR: Service 'osctrl-api' failed to build : Build failed
make: *** [Makefile:170: docker_dev] Error 1
Any idea?
Thanks in advance !
jmpsec/osctrl