Shiping logs from kubernetes to elasticsearch using beats - Failed to connect: Get http://xxxxxx.us-central1.gcp.cloud.es.io:9243: read tcp 13.17.4.10:40766->31.177.77.2:9243: read: connection reset by peer

following

beats fails to ship logs
get the following log:

ERR Failed to connect: Get http://xxxxxx.us-central1.gcp.cloud.es.io:9243: read tcp 13.17.4.10:40766->31.177.77.2:9243: read: connection reset by peer
11:38:19.230  reload.go:222: INFO Dynamic config reloader stopped
11:38:19.230  crawler.go:135: INFO Crawler stopped
11:38:19.230  registrar.go:210: INFO Stopping Registrar
11:38:19.230  registrar.go:165: INFO Ending Registrar
11:38:19.231  forwarder.go:35: INFO Prospector outlet closed
11:38:19.234  metrics.go:51: INFO Total non-zero values: beat.info.uptime.ms=40449 beat.memstats.gc_next=25194960 beat.memstats.memory_alloc=13894472 beat.memstats.memory_total=43826552 filebeat.events.active=4130 filebeat.events.added=4140 filebeat.events.done=10 filebeat.harvester.closed=4 filebeat.harvester.open_files=16 filebeat.harvester.running=16 filebeat.harvester.started=20 libbeat.config.module.running=1 libbeat.config.module.starts=1 libbeat.config.reloads=2 libbeat.output.read.errors=6 libbeat.output.type=elasticsearch libbeat.output.write.bytes=1434 libbeat.pipeline.clients=0 libbeat.pipeline.events.active=4116 libbeat.pipeline.events.failed=4 libbeat.pipeline.events.filtered=20 libbeat.pipeline.events.published=4116 libbeat.pipeline.events.retry=150 libbeat.pipeline.events.total=4140 registrar.states.current=6 registrar.states.update=6 registrar.writes=8
11:38:19.234  metrics.go:52: INFO Uptime: 40.449909073s
11:38:19.234  beat.go:284: INFO filebeat stopped.


here is the full log:

Should that not be https (or maybe you should leave the protocol out)?

@Christian_Dahlqvist thanks!
I changed

        - name: ELASTICSEARCH_HOST
          value: xxxxxxxxxxx.us-central1.gcp.cloud.es.io

to

        - name: ELASTICSEARCH_HOST
          value: https://xxxxxxxxxxx.us-central1.gcp.cloud.es.io

now I dont get failed to connect , but still filebeat fails with the log:

08:35:47.409927 metrics.go:39: INFO Non-zero metrics in the last 30s: beat.info.uptime.ms=30002 beat.memstats.gc_next=30422496 beat.memstats.memory_alloc=15212880 beat.memstats.memory_total=141696232 filebeat.events.active=4119 filebeat.events.added=13031 filebeat.events.done=8912 filebeat.harvester.open_files=20 filebeat.harvester.running=20 filebeat.harvester.started=20 libbeat.config.module.running=1 libbeat.config.module.starts=1 libbeat.config.reloads=2 libbeat.output.read.bytes=157671 libbeat.output.type=elasticsearch libbeat.output.write.bytes=8987379 libbeat.pipeline.clients=2 libbeat.pipeline.events.active=4117 libbeat.pipeline.events.filtered=20 libbeat.pipeline.events.published=13008 libbeat.pipeline.events.retry=50 libbeat.pipeline.events.total=13029 libbeat.pipeline.queue.acked=8892 registrar.states.current=20 registrar.states.update=8912 registrar.writes=184
08:35:48.006481 filebeat.go:323: INFO Stopping filebeat
08:35:48.006524 crawler.go:109: INFO Stopping Crawler
08:35:48.006536 crawler.go:119: INFO Stopping 0 prospectors
08:35:48.006559 reload.go:222: INFO Dynamic config reloader stopped
08:35:48.006580 reload.go:222: INFO Dynamic config reloader stopped
08:35:48.006589 crawler.go:135: INFO Crawler stopped
08:35:48.006613 registrar.go:210: INFO Stopping Registrar
08:35:48.006640 registrar.go:165: INFO Ending Registrar
08:35:48.007093 forwarder.go:35: INFO Prospector outlet closed
08:35:48.014069 metrics.go:51: INFO Total non-zero values: beat.info.uptime.ms=30331 beat.memstats.gc_next=33630224 beat.memstats.memory_alloc=30452528 beat.memstats.memory_total=143441184 filebeat.events.active=4116 filebeat.events.added=13026 filebeat.events.done=8910 filebeat.harvester.closed=1 filebeat.harvester.open_files=16 filebeat.harvester.running=16 filebeat.harvester.started=17 libbeat.config.module.running=1 libbeat.config.module.starts=1 libbeat.config.reloads=2 libbeat.output.read.bytes=157857 libbeat.output.type=elasticsearch libbeat.output.write.bytes=9566414 libbeat.pipeline.clients=0 libbeat.pipeline.events.active=4116 libbeat.pipeline.events.failed=1 libbeat.pipeline.events.filtered=17 libbeat.pipeline.events.published=13008 libbeat.pipeline.events.retry=50 libbeat.pipeline.events.total=13026 libbeat.pipeline.queue.acked=8892 registrar.states.current=17 registrar.states.update=8909 registrar.writes=185
08:35:48.014112 metrics.go:52: INFO Uptime: 30.331515461s
08:35:48.014121 beat.go:284: INFO filebeat stopped.
08:35:48.002759 filebeat.go:323: INFO Stopping filebeat
08:35:48.002784 crawler.go:109: INFO Stopping Crawler
08:35:48.002806 crawler.go:119: INFO Stopping 0 prospectors
08:35:48.002830 reload.go:222: INFO Dynamic config reloader stopped
08:35:48.002847 reload.go:222: INFO Dynamic config reloader stopped
08:35:48.002854 crawler.go:135: INFO Crawler stopped
08:35:48.002861 registrar.go:210: INFO Stopping Registrar
08:35:48.002888 registrar.go:165: INFO Ending Registrar
08:35:48.003162 forwarder.go:35: INFO Prospector outlet closed
08:35:48.003223 forwarder.go:35: INFO Prospector outlet closed
08:35:48.003251 forwarder.go:35: INFO Prospector outlet closed
08:35:48.009565 metrics.go:51: INFO Total non-zero values: beat.info.uptime.ms=30602 beat.memstats.gc_next=30422496 beat.memstats.memory_alloc=17696448 beat.memstats.memory_total=144179800 filebeat.events.active=4116 filebeat.events.added=13231 filebeat.events.done=9115 filebeat.harvester.closed=3 filebeat.harvester.open_files=17 filebeat.harvester.running=17 filebeat.harvester.started=20 libbeat.config.module.running=1 libbeat.config.module.starts=1 libbeat.config.reloads=2 libbeat.output.read.bytes=161229 libbeat.output.type=elasticsearch libbeat.output.write.bytes=9187054 libbeat.pipeline.clients=0 libbeat.pipeline.events.active=4116 libbeat.pipeline.events.failed=3 libbeat.pipeline.events.filtered=20 libbeat.pipeline.events.published=13208 libbeat.pipeline.events.retry=50 libbeat.pipeline.events.total=13231 libbeat.pipeline.queue.acked=9092 registrar.states.current=20 registrar.states.update=9112 registrar.writes=189
08:35:48.009588 metrics.go:52: INFO Uptime: 30.602265961s
08:35:48.009595 beat.go:284: INFO filebeat stopped.

here is the full log:

Uhm,

From the log it looks like everything worked, and then a normal stop was triggered, are you sure you didn't delete the pod? You can get the history with kubectl describe

This topic was automatically closed after 21 days. New replies are no longer allowed.