# Redis: Error fetching data for metricset i/o timeout error

**URL:** https://discuss.elastic.co/t/redis-error-fetching-data-for-metricset-i-o-timeout-error/302813
**Category:** Beats
**Tags:** metricbeat
**Created:** [April 20, 2022, 12:42pm UTC](https://discuss.elastic.co/t/redis-error-fetching-data-for-metricset-i-o-timeout-error/302813 "2022-04-20T12:42:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Duane\_DSouza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/duane_dsouza/32/99836_2.png) [@Duane\_DSouza](https://discuss.elastic.co/u/Duane_DSouza)
#### Post date: [April 20, 2022, 12:42pm UTC](https://discuss.elastic.co/t/redis-error-fetching-data-for-metricset-i-o-timeout-error/302813/1 "2022-04-20T12:42:59Z")

</div>

Hi ,

I am trying to use metricbeat (version 8.1.2) module for Redis.  
Redis cluster is managed [app.redislabs.com](http://app.redislabs.com)  
Also tried with Redis service for the Google Cloud Platform.

Here is config:

```-
  metricsets: ["info", "keyspace"]
  hosts: ["redis-16058.internal.xxxxxxxxx.ec2.cloud.redislabs.com:16058"]
  password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  enabled: true
  period: 10s
  xpack.enabled: true

```

# Redis hosts

hosts: ["[redis-16058.xxxxxxxxx.ec2.cloud.redislabs.com:16058](http://redis-16058.xxxxxxxxx.ec2.cloud.redislabs.com:16058)"]

# Redis AUTH password. Empty by default.

password: (blank if no auth. Tried with password as well as without)

I am getting below errors:

```auto

{"log.level":"error","@timestamp":"2022-04-20T12:33:49.090Z","log.origin":{"file.name":"module/wrapper.go","file.line":254},"message":"Error fetching data for metricset redis.keyspace: Failed to fetch redis info for keyspaces: dial tcp 10.69.19.83:6379: i/o timeout","service.name":"metricbeat","ecs.version":"1.6.0"}

{"log.level":"error","@timestamp":"2022-04-20T12:33:51.488Z","log.origin":{"file.name":"redis/redis.go","file.line":70},"message":"Error retrieving INFO stats: dial tcp 10.69.19.83:6379: i/o timeout","service.name":"metricbeat","ecs.version":"1.6.0"}

{"log.level":"error","@timestamp":"2022-04-20T12:33:51.488Z","log.origin":{"file.name":"module/wrapper.go","file.line":254},"message":"Error fetching data for metricset redis.info: failed to fetch redis info: dial tcp 10.69.19.83:6379: i/o timeout","service.name":"metricbeat","ecs.version":"1.6.0"}

```

However I can connect via redis-cli to the host. Ping returns Pong.

Also If i try to connect to my local redis running on localhost I am able to see the metrics.  
Using `hosts: ["127.0.0.1:6379"]`

Any suggestion on what could be the reason?

Thanks!

---

<div class="post-metadata">

### Author: ![TiagoQueiroz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagoqueiroz/32/107061_2.png) [@TiagoQueiroz](https://discuss.elastic.co/u/TiagoQueiroz)
#### Post date: [April 21, 2022, 1:58pm UTC](https://discuss.elastic.co/t/redis-error-fetching-data-for-metricset-i-o-timeout-error/302813/2 "2022-04-21T13:58:35Z")

</div>

Hi @Duane_DSouza,

based on the logs you posted it seems to be a network connectivity issue, not a Metricbeat issue.

> However I can connect via redis-cli to the host. Ping returns Pong.

Are you running `redis-cli` from the same machine running Metricbeat and with the same credentials?

Is there any firewall or proxy that might be affecting the network connectivity?

---

<div class="post-metadata">

### Author: ![Duane\_DSouza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/duane_dsouza/32/99836_2.png) [@Duane\_DSouza](https://discuss.elastic.co/u/Duane_DSouza)
#### Post date: [April 21, 2022, 2:49pm UTC](https://discuss.elastic.co/t/redis-error-fetching-data-for-metricset-i-o-timeout-error/302813/3 "2022-04-21T14:49:49Z")

</div>

Thanks @TiagoQueiroz ,

Yes I am running redis-cli from the same machine running metricbeat and using the same credentials.

```auto
redis-cli -h redis-16058.xxxxxxxxxxxx.ec2.cloud.redislabs.com -p 16058 -a Qa0c9NE3qAFV3B5x49NouDzOen94auNA

```

Except that metricbeat is deployed in a docker container.  
I am not connected to any proxy or firewall.

I am now seeing this issue in the logs. I have moved past the earlier issue.

```auto
{"log.level":"error","@timestamp":"2022-04-21T14:44:58.245Z","log.origin":{"file.name":"metrics/metrics.go","file.line":306},"message":"error determining cgroups version: error reading /proc/909352/cgroup: open /proc/909352/cgroup: no such file or directory","service.name":"metricbeat","ecs.version":"1.6.0"}

```

AM i missing something?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 19, 2022, 4:50pm UTC](https://discuss.elastic.co/t/redis-error-fetching-data-for-metricset-i-o-timeout-error/302813/4 "2022-05-19T16:50:12Z")

</div>

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