airbnb / nerve

A service registration daemon that performs health checks; companion to airbnb/synapse
MIT License
942 stars 151 forks source link

Nerve ParseError #57

Closed Jaykah closed 10 years ago

Jaykah commented 10 years ago

Hi Igor,

Hope all is well. I am trying to configure Nerve, and get the following issue:

/usr/local/lib/ruby/gems/2.1.0/gems/nerve-0.5.2/bin/nerve:48:in `rescue in parseconfig': uninitialized constant Psych::ParseError (NameError)
    from /usr/local/lib/ruby/gems/2.1.0/gems/nerve-0.5.2/bin/nerve:42:in `parseconfig'
    from /usr/local/lib/ruby/gems/2.1.0/gems/nerve-0.5.2/bin/nerve:63:in `block in <top (required)>'
    from /usr/local/lib/ruby/gems/2.1.0/gems/nerve-0.5.2/bin/nerve:63:in `each'
    from /usr/local/lib/ruby/gems/2.1.0/gems/nerve-0.5.2/bin/nerve:63:in `<top (required)>'
    from /usr/local/bin/nerve:23:in `load'
    from /usr/local/bin/nerve:23:in `<main>'

I have read about some issues with Psych, so tried installing 0.5.3 from github (since gem install nerve installs 0.5.2), but am not quite sure how to do that, since I have no ruby experience whatsoever (did git clone git://github.com/airbnb/nerve.git and gem install bundler and bundle install, but would get /bin/bash: nerve: command not found)

Would really appreciate pointers.

Thanks!

Jaykah commented 10 years ago

Ok, I managed to install the latest version from GitHub, however I still get the same error.

Please advise.

Jaykah commented 10 years ago

Ok, so it seems to be a YAML format issue.

Here's the config that I have:

---
  host: "1.2.3.4"
  port: 3000
  reporter_type: "zookeeper"
  zk_hosts: 
    - "localhost:2181"
  zk_path: "/nerve/services/your_http_service/services"
  check_interval: 2
  checks: 
    - 
      type: "http"
      uri: "/health"
      timeout: 0.2
      rise: 3
      fall: 2

Is it correct?