Git Product home page Git Product logo

Comments (6)

igor47 avatar igor47 commented on August 19, 2024

the reason is that your haproxy section is at the same level of indentation as the application section, under services; haproxy should be a top-level key, at the same level as services instead of under it. currently, it looks like you have no haproxy section but two services, one application which a valid discovery method and one haproxy with no valid discovery method.

this took me a long time to spot. the point of YAML was to make writing these kinds of configs easier, but it still doesn't do an amazing job...

from synapse.

Jaykah avatar Jaykah commented on August 19, 2024

Thank you, Igor! Looks like this has taken me a step forward.

However, now I get:

/usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse/service_watcher.rb:28:in `create': Invalid discovery method ["zookeeper"] (ArgumentError)
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:72:in `block in create_service_watchers'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:71:in `each'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:71:in `create_service_watchers'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:18:in `initialize'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/bin/synapse:59:in `new'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/bin/synapse:59:in `<top (required)>'
    from /usr/local/bin/synapse:23:in `load'
    from /usr/local/bin/synapse:23:in `<main>'

I have tried to follow the project documentation, but it seems like it's a bit outdated (with YAML instead of JSON, and apparently the methods). Would be glad to help fix it up once I understand how to make it work.

from synapse.

igor47 avatar igor47 commented on August 19, 2024

why is it ["zookeeper"] in square brackets? are you accidentally creating a yaml list?

from synapse.

Jaykah avatar Jaykah commented on August 19, 2024

That's the thing, my YAML does not contain any square brackets, nor does it have the hyphen+space that indicates a list in the case of discovery method.

I have tried a number of variations, with no luck.

It currently looks like this:

services:
 application:
  default_servers:
    name: "default-app"
    host: "111.111.111.111"
    port: 443
  discovery:
    method: "zookeeper"
    path: "/services/application"
    hosts:
     - "xhbtr.site.com:2181"
     - "xhbtr2.site.com:2181"
     - "xhbtr3.site.com:2181"
  haproxy:
    port: 3213
    server_options: "check inter 2s rise 3 fall 2"
    listen:
     - "mode http"
     - "option httpchk /health"
     - "http-check expect string OK"
haproxy:
 reload_command: "sudo service haproxy reload"
 config_file_path: "/etc/haproxy/haproxy.cfg"
 socket_file_path: "/var/haproxy/stats.sock"
 do_writes: true
 do_reloads: true
 do_socket: false
 global:
  - "daemon"
  - "user haproxy"
  - "group haproxy"
  - "maxconn 4096"
  - "log     127.0.0.1 local0"
  - "log     127.0.0.1 local1 notice"
  - "stats   socket /var/haproxy/stats.sock mode 666 level admin"
 defaults:
  - "log      global"
  - "option   dontlognull"
  - "maxconn  2000"
  - "retries  3"
  - "timeout  connect 5s"
  - "timeout  client  1m"
  - "timeout  server  1m"
  - "option   redispatch"
  - "balance  leastconn"
 extra_sections:
  listen stats :3212:
   - "mode http"
   - "stats enable"
   - "stats uri /"
   - "stats refresh 5s"

from synapse.

Jaykah avatar Jaykah commented on August 19, 2024

Figured it out, had an extra space that I didn't notice.

from synapse.

Jaykah avatar Jaykah commented on August 19, 2024

--comment moved to a separate ticket--

from synapse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.