Comments (6)
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.
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.
why is it ["zookeeper"]
in square brackets? are you accidentally creating a yaml list?
from synapse.
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.
Figured it out, had an extra space that I didn't notice.
from synapse.
--comment moved to a separate ticket--
from synapse.
Related Issues (20)
- Extending cookie_value_method HOT 1
- In DNS service watcher, re-resolve every $TTL HOT 1
- AWS Auto Scaling Group watcher HOT 1
- Allow name in the DNS service watcher's ping method to configurable
- HAProxy with ActiveMQ HOT 2
- Obtain AWS credentials from IAM Instance Profile HOT 1
- ec2tag watcher needs to back off if Client.RequestLimitExceeded is returned HOT 1
- ZookeeperWatcher does not handle NoNode failures HOT 4
- docker-api v1.32 dropped support for Ruby 1.9 HOT 1
- discovery fails if Zookeeper tree is read only
- service_conf_dir no longer a valid top level config key HOT 2
- Unexpected error when migrating from Synapse-0.13.8 to Synapse-0.14.3 HOT 6
- ec2tag watcher fails if metadata service is unavailable during a credential refresh HOT 1
- No support for relative server_port overrides HOT 1
- used Synapse to replace RDS HOT 1
- Synapse and HAProxy seamless reloads HOT 10
- Provide a way to disable datadog stats
- Zookeeper watcher with autoscale servers
- Doc: README uses YAML config in Example Migration but only mentions JSON format in Configuration
- Gem does not build on arm64 platform
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synapse.