Hi! I hope this is the right forum to ask this question.
I have a metricbeat -> logstash -> elasticsearch pipeline. My logstash setup consists of multiple pipelines.
When I run metricbeat (when logstash/elasticsearch are active), I get the following error intermittently:
In metricbeat logs:
{"log.level":"error","@timestamp":"2024-07-02T06:53:56.454-0400","log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch","file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node: HTTP error 500 in : 500 Internal Server Error","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-07-02T06:53:56.454-0400","log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch","file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node_stats: HTTP error 500 in : 500 Internal Server Error","service.name":"metricbeat","ecs.version":"1.6.0"}
In logstash logs:
[2024-07-02T06:54:42,294][ERROR][logstash.agent ] Rack app {:error=>#<NameError: uninitialized constant Rack::Builder::URLMap>, :req=>#<Puma::Client:0x12b8 @ready=true>}
[2024-07-02T06:56:46,980][ERROR][logstash.agent ] Rack app {:error=>#<NameError: uninitialized constant Rack::Builder::URLMap>, :req=>#<Puma::Client:0x12bc @ready=true>}
[2024-07-02T06:56:46,987][ERROR][logstash.agent ] Rack app {:error=>#<NameError: uninitialized constant Rack::Builder::URLMap>, :req=>#<Puma::Client:0x12c0 @ready=true>}
[2024-07-02T07:00:20,952][ERROR][logstash.agent ] Rack app {:error=>#<NameError: uninitialized constant Rack::Builder::URLMap>, :req=>#<Puma::Client:0x12c4 @ready=true>}
[2024-07-02T07:46:24,826][ERROR][logstash.agent ] Rack app {:error=>#<NameError: uninitialized constant Rack::Builder::URLMap>, :req=>#<Puma::Client:0x12c8 @ready=true>}
What could be the cause of this error? Restarting logstash/metricbeat again gets rid of this error (but not always), but I would preferably like to get rid of it permanently.
The following are my config files:
metricbeat-8.12.1/modules.d/logstash-xpack.yml
- module: logstash
metricsets: ["node", "node_stats"]
xpack.enabled: true
period: 10s
hosts: ["${PROTOCOL}://${HOSTNAME}:${LS_HTTP_LOW_PORT}"]
logstash.yml
api.http.host: ${HOSTNAME}
api.http.port: ${LS_HTTP_LOW_PORT}-${LS_HTTP_HIGH_PORT}
I have checked, logstash is binding to LS_HTTP_LOW_PORT only and I'm still getting this error.