# Getting exception while sending events from logstash shipper

**URL:** <https://discuss.elastic.co/t/getting-exception-while-sending-events-from-logstash-shipper/42230>\
**Category:** Logstash\
**Created:** [February 19, 2016, 11:03am UTC](https://discuss.elastic.co/t/getting-exception-while-sending-events-from-logstash-shipper/42230 "2016-02-19T11:03:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kishore](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kishore](https://discuss.elastic.co/u/Kishore)\
**Post date:** [February 19, 2016, 11:03am UTC](https://discuss.elastic.co/t/getting-exception-while-sending-events-from-logstash-shipper/42230/1 "2016-02-19T11:03:54Z")

</div>

I am getting below error while sending events from logstash shipper to Redis, Kindly any one can help on this issue, where as i am not facing this issue for other servers.

_:exception=\>#\<Redis::CannotConnectError: Error connecting to Redis on **.**.\*\*\*.\*\*\*.ec2.internal:7004 (Redis::TimeoutError)\>, :backtrace=\>["/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:332:in `establish_connection'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:94:in`connect'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:280:in `with_reconnect'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:93:in`connect'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:351:in `ensure_connected'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:208:in`process'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:293:in `logging'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:207:in`process'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis/client.rb:113:in `call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis.rb:1030:in`rpush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis.rb:57:in `synchronize'", "/opt/logstash/vendor/jruby/lib/ruby/1.9/monitor.rb:211:in`mon\_synchronize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis.rb:57:in `synchronize'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/redis-3.2.2/lib/redis.rb:1029:in`rpush'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-redis-2.0.2/lib/logstash/outputs/redis.rb:169:in `receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.1-java/lib/logstash/outputs/base.rb:81:in`handle'", "(eval):584:in `output_func'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.1-java/lib/logstash/pipeline.rb:277:in`outputworker'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.1.1-java/lib/logstash/pipeline.rb:194:in `start\_outputs'"], :level=\>:warn}_

---

<div class="post-metadata">

**Author:** ![Python\_Coder](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Python\_Coder](https://discuss.elastic.co/u/Python_Coder)\
**Post date:** [February 19, 2016, 2:25pm UTC](https://discuss.elastic.co/t/getting-exception-while-sending-events-from-logstash-shipper/42230/2 "2016-02-19T14:25:34Z")

</div>

could you provide the output section of your LS config file?  
in addition, redis binds to 127.0.0.1 which is the loop back address, did you change the bind address to your redis server IP address?

---

<div class="post-metadata">

**Author:** ![Kishore](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kishore](https://discuss.elastic.co/u/Kishore)\
**Post date:** [February 19, 2016, 2:32pm UTC](https://discuss.elastic.co/t/getting-exception-while-sending-events-from-logstash-shipper/42230/3 "2016-02-19T14:32:02Z")

</div>

Below is the output config for LS, I configured the same on other servers where events are reaching the redis and it is failing for some servers (These are cloud based servers, I am facing this issue mostly for cross region VPC's).

I have changed the redis configuration according requirement.

output  
{  
redis  
{  
host =\> ["\*\*\*\*\*\*\*\*\*:7000", "\*\*\*\*\*\*\*\*\*:7001", "\*\*\*\*\*\*\*\*\*:7002", "\*\*\*\*\*\*\*\*\*:7003", "\*\*\*\*\*\*\*\*\*:7004", "\*\*\*\*\*\*\*\*\*:7005"]  
data\_type =\> "list"  
key =\> "syslog"  
}

}

---

<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:** [July 6, 2017, 5:10am UTC](https://discuss.elastic.co/t/getting-exception-while-sending-events-from-logstash-shipper/42230/4 "2017-07-06T05:10:37Z")

</div>


