# Logstash 1.5 rest plugin exception with rest-client and netrc

**URL:** <https://discuss.elastic.co/t/logstash-1-5-rest-plugin-exception-with-rest-client-and-netrc/1917>\
**Category:** Logstash\
**Created:** [June 4, 2015, 10:04am UTC](https://discuss.elastic.co/t/logstash-1-5-rest-plugin-exception-with-rest-client-and-netrc/1917 "2015-06-04T10:04:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hurb](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@hurb](https://discuss.elastic.co/u/hurb)\
**Post date:** [June 4, 2015, 10:04am UTC](https://discuss.elastic.co/t/logstash-1-5-rest-plugin-exception-with-rest-client-and-netrc/1917/1 "2015-06-04T10:04:44Z")

</div>

Hi guys,

I'm trying to write a Logstash filter plugin which uses [rest-client](https://rubygems.org/gems/rest-client) to communicate with a REST service. The plugin works fine on my development machine. However, as soon as I put it on a fresh logstash installation it throws the following exception when logstash receives an event:

```
Exception in filterworker {"exception"=>#<SystemCallError: Unknown error - Unknown Error (0) - /home/xxx/.netrc>, "backtrace"=>[
	"org/jruby/RubyFile.java:865:in `stat'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/netrc-0.10.3/lib/netrc.rb:43:in `check_permissions'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/netrc-0.10.3/lib/netrc.rb:52:in `read'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/rest-client-1.8.0/lib/restclient/request.rb:284:in `parse_url_with_auth'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/rest-client-1.8.0/lib/restclient/request.rb:175:in `execute'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/rest-client-1.8.0/lib/restclient/resource.rb:54:in `get'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-rest-0.1.0/lib/logstash/filters/rest.rb:50:in `filter'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/filters/base.rb:162:in `multi_filter'", 
	"org/jruby/RubyArray.java:1613:in `each'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/filters/base.rb:159:in `multi_filter'", "(eval):41:in `filter_func'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/pipeline.rb:219:in `filterworker'", 
	"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/pipeline.rb:156:in `start_filters'"
], :level=>:error}

```

(Logstash 1.5, JRuby 1.7.19 (1.9.3p551), Java 1.8.0\_45)

I wonder why it works on the dev machine and not on a new one which has the same versions of OS, Logstash and Java. Could this exception be caused by some missing development tools like bundler, gem etc.?

I found a similar [issue with the logstash-output-slack](https://github.com/cyli/logstash-output-slack/issues/1) plugin. Does anyone know how to solve it?

Thanks in advance  
hurb

---

<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:38am UTC](https://discuss.elastic.co/t/logstash-1-5-rest-plugin-exception-with-rest-client-and-netrc/1917/2 "2017-07-06T05:38:35Z")

</div>


