Sidecar container failing to connect to graylog server

1. Describe your incident:
I have started graylog service with the help docker-compose file my graylog service is working fine I am able to access my graylog web interface . I wanted to send my application logs via sidecar So with the help of Dockerfile available for sidecar I started my sidecar conatiner.But my sidecar container unable to connect to graylog server

2. Describe your environment:

  • OS Information: Debian 10

  • Package Version:
    sidecar version - 1.0.1
    graylog-image -4.2

  • Service logs, configurations, and environment variables:


    level=error msg="[UpdateRegistration] Failed to report collector status to server: Put http://0.0.0.0:8007/api/sidecars/scorer: dial tcp 0.0.0.0:8007: connect: connection refused"

3. What steps have you already taken to try and solve the problem?

4. How can the community help?
Please suggest if anything thing is missing in the configuration.
Should my sidecar container should in same network as that of graylog?

Helpful Posting Tips: Tips for Posting Questions that Get Answers [Hold down CTRL and link on link to open tips documents in a separate tab]

Disclaimer! I’m kinda new to Graylog, but I’ll give this a try. I had the same kind of problem today, so hopefully this helps.

Put http://0.0.0.0:8007

This tells me that you got the wrong ip in your Collector configuration or in the sidecar.yml

In the sidecar configuration, if you have something like (or if this section is missing - add it)

output.logstash:
   hosts: ["0.0.0.0:8007"]

Change it to

output.logstash:
   hosts: ["<ip-to-logstash>:8007"]

If that checks out, check your sidecar.yml
Make sure that the first variable, on line three, points to your logstash server.

server_url:

Hello,

Judging from the error , It a graylog sidecar configuration issue.

GL sidecar configuration file should be located here.

vi /etc/graylog/sidecar/sidecar.yml

Think you missing the URL for the Graylog instance.

server_url: "http://192.168.1.20:9000/api/"

Example of mine: Basic configuration.

root@keycloak:~# cat  /etc/graylog/sidecar/sidecar.yml | egrep -v "^\s*(#|$)"
server_url: "http://192.168.1.20:9000/api/"
server_api_token: "1sdjiu5d6bjp2u44qrbvtjc74r2b79epb8us9n4vlp2bugrsr885"
node_id: "file:/etc/graylog/sidecar/node-id"
node_name: "keycloak101"
update_interval: 10
tls_skip_verify: true
send_status: true
list_log_files:
    - "/var/log/"
root@keycloak:~#

I used this documentation here

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.