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

When using default servers as fallback, synapse is looking for a Zookeeper method #71

Open
Jaykah opened this issue Jun 9, 2014 · 1 comment

Comments

@Jaykah
Copy link
Contributor

Jaykah commented Jun 9, 2014

Not sure if I am doing something wrong, or if that is a bug, but here it is:

After synapse fails to fetch backends from Zookeeper, and it falls back to default server list, it is still trying to find method "shuffle"

W, [2014-06-06T20:24:36.814618 #14]  WARN -- Synapse::ZookeeperWatcher: synapse: no backends for service application; using default servers: {"name"=>"default-app", "host"=>"111.111.111.111", "port"=>443}
I, [2014-06-06T20:24:36.817710 #14]  INFO -- Synapse::Synapse: synapse: regenerating haproxy config
E, [2014-06-06T20:24:36.818293 #14] ERROR -- Synapse::Synapse: synapse: encountered unexpected exception #<NoMethodError: undefined method `shuffle' for {"name"=>"default-app", "host"=>"111.111.111.111", "port"=>443}:Hash> in main thread
W, [2014-06-06T20:24:36.818395 #14]  WARN -- Synapse::Synapse: synapse: exiting; sending stop signal to all watchers
W, [2014-06-06T20:24:36.818452 #14]  WARN -- Synapse::ZookeeperWatcher: synapse: zookeeper watcher exiting
I, [2014-06-06T20:24:36.830512 #14]  INFO -- Synapse::ZookeeperWatcher: synapse: zookeeper watcher cleaned up successfully
/usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse/haproxy.rb:654:in `generate_backend_stanza': undefined method `shuffle' for {"name"=>"default-app", "host"=>"111.111.111.111", "port"=>443}:Hash (NoMethodError)
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse/haproxy.rb:551:in `block in generate_config'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse/haproxy.rb:548:in `each'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse/haproxy.rb:548:in `generate_config'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse/haproxy.rb:534:in `update_config'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:45:in `block in run'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:37:in `loop'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/lib/synapse.rb:37:in `run'
    from /usr/local/lib/ruby/gems/2.1.0/gems/synapse-0.10.0/bin/synapse:60:in `<top (required)>'
    from /usr/local/bin/synapse:23:in `load'
    from /usr/local/bin/synapse:23:in `<main>'
@igor47
Copy link
Collaborator

igor47 commented Jun 12, 2014

default servers should be a list; see this example, here: https://github.com/airbnb/synapse/blob/master/config/synapse.conf.json#L4-L10

based on the error message, i think you made it into a plan hash.

we should really let you know sooner if you don't configure it as a list. feel free to submit a PR to do this validation, or i'll get around to it sometime next week.

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

No branches or pull requests

2 participants