Hi I am trying to run the official graylog docker compose file, with the addition of a sidecar image added on, to be able to run all at once.
Originally I ran sidecar as usual, using a sidecar yaml, and enable and starting the service:
# The URL to the Graylog server API.
server_url: "http://172.23.180.197:9000/api/"
# The API token to use to authenticate against the Graylog server API.
# This field is mandatory
server_api_token: "7o32v0au1avfr9lusd6m7cc1kbofps2sgebkkj48bdt1p7lek6j"
As I am running wsl, I use the ip given under eth0 when I run ifconfig, and that all works fine.
But with the same set up I am having trouble setting up via docker. I understand you need the api token before running sidecar, so I thought I could get around this by running the normal docker-compose file, getting the api key, pasting it in and then adding on the build for my sidecar docker image on the end of the compose file.
But I keep getting these two errors which I can’t work out why:
level=error msg=“Error fetching server version Get "http://172.23.180.197:9000/api\”: read tcp 172.18.0.5:48366->172.23.180.197:9000: read: connection reset by peer"
level=error msg=“[UpdateRegistration] Bad response from Graylog server: 401 Unauthorized”
I have tried changing the server_url to 172.18.0.5:9000, but it did not work.
I am also very new to docker, so not sure if it could be my Dockerfile thats causing an issue:
FROM ubuntu:jammy
RUN apt-get update && \
apt-get install -y wget && \
wget https://packages.graylog2.org/repo/packages/graylog-sidecar-repository_1-5_all.deb && \
dpkg -i graylog-sidecar-repository_1-5_all.deb && \
apt-get update && \
apt-get install graylog-sidecar
RUN graylog-sidecar -service install
ADD ./data /data
CMD /usr/bin/graylog-sidecar -c /data/sidecar.yml
Any help would be awesome