Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when receiving Errno::ETIMEDOUT that should be rescued #9

Closed
awaage opened this issue Feb 9, 2017 · 2 comments
Closed

Error when receiving Errno::ETIMEDOUT that should be rescued #9

awaage opened this issue Feb 9, 2017 · 2 comments

Comments

@awaage
Copy link

awaage commented Feb 9, 2017

I believe this line needs to also rescue the Errno::ETIMEDOUT exception:

https://github.com/kontera-technologies/graphite-api/blob/master/lib/graphite-api/connector.rb#L34

Reproducing:

client = GraphiteAPI.new(graphite: "10.10.100.161:2003") 
c = client.instance_variable_get("@connectors")
m = 'pulse-stag.site_101.aw 339.0 1485488850'

# Publish message
c.publish m
D, [2017-01-27T18:08:31.519220 #28605] DEBUG -- : [:connector_group, :publish, 39, [GraphiteAPI::Connector 10.10.100.161:2003]]
D, [2017-01-27T18:08:31.519315 #28605] DEBUG -- : [:connector, :puts, "10.10.100.161:2003", "pulse-stag.site_101.aw 339.0 1485488850"]
 => ["pulse-stag.site_101.aw 339.0 1485488850"] 

# Wait for 30 minutes... then publish again 

2.2.0 :149 > c.publish m
D, [2017-01-27T18:39:00.801402 #28605] DEBUG -- : [:connector_group, :publish, 39, [GraphiteAPI::Connector 10.10.100.161:2003]]
D, [2017-01-27T18:39:00.801480 #28605] DEBUG -- : [:connector, :puts, "10.10.100.161:2003", "pulse-stag.site_101.aw 339.0 1485488850"]
Errno::ETIMEDOUT: Connection timed out
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:33:in `write'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:33:in `puts'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:33:in `puts'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:22:in `block (2 levels) in publish'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:22:in `map'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:22:in `block in publish'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:22:in `each'
        from /usr/local/rvm/gems/ruby-2.2.0/gems/graphite-api-0.1.6/lib/graphite-api/connector.rb:22:in `publish'
        from (irb):149
        from /usr/local/rvm/rubies/ruby-2.2.0/bin/irb:11:in `<main>'
@eranb eranb closed this as completed in aa7083e Feb 9, 2017
@eranb
Copy link
Member

eranb commented Feb 9, 2017

@awaage I pushed a new version, graphite-api-0.1.7.gem

thanks

@awaage
Copy link
Author

awaage commented Feb 9, 2017

@eranb thanks for the quick fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants