{"action":"opened","issue":{"url":"https://api.github.com/repos/Xorlev/gatekeeper/issues/14","labels_url":"https://api.github.com/repos/Xorlev/gatekeeper/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Xorlev/gatekeeper/issues/14/comments","events_url":"https://api.github.com/repos/Xorlev/gatekeeper/issues/14/events","html_url":"https://github.com/Xorlev/gatekeeper/issues/14","id":56779731,"number":14,"title":"how to configure gatekeeper?","user":{"login":"bwahn","id":328604,"avatar_url":"https://avatars.githubusercontent.com/u/328604?v=3","gravatar_id":"","url":"https://api.github.com/users/bwahn","html_url":"https://github.com/bwahn","followers_url":"https://api.github.com/users/bwahn/followers","following_url":"https://api.github.com/users/bwahn/following{/other_user}","gists_url":"https://api.github.com/users/bwahn/gists{/gist_id}","starred_url":"https://api.github.com/users/bwahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwahn/subscriptions","organizations_url":"https://api.github.com/users/bwahn/orgs","repos_url":"https://api.github.com/users/bwahn/repos","events_url":"https://api.github.com/users/bwahn/events{/privacy}","received_events_url":"https://api.github.com/users/bwahn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-06T07:26:23Z","updated_at":"2015-02-06T07:26:23Z","closed_at":null,"body":"In AWS instance : Ubuntu 14.03\r\n\r\n$ cd \r\n$ pwd\r\n/home/ubuntu\r\n\r\n$ sudo apt-get update\r\n$ sudo apt-get install nginx\r\n$ sudo apt-get install sudo apt-get install openjdk-7-jdk\r\n$ sudo apt-get install maven2\r\n\r\n$ cd /usr/local\r\n$ wget http://apache.tt.co.kr/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz\r\n$ tar zxvf zookeeper-3.4.6.tar.gz\r\n$ cd zookeeper-3.4.6/\r\n$ cp conf/zoo_sample.cfg conf/zoo.cfg\r\n\r\n$ vi conf/zoo.cfg\r\ntickTime=2000\r\ninitLimit=10\r\nsyncLimit=5\r\ndataDir=/tmp/zookeeper\r\nclientPort=2181\r\nserver.1=localhost:2888:3888\r\nmaxClientCnxns=100\r\n\r\n$ sudo mkdir /tmp/zookeeper\r\n$ bin/zkServer.sh start\r\n\r\n$ cd\r\n$ git clone https://github.com/Xorlev/gatekeeper.git\r\n$ cd gatekeeper/\r\n$ mvn package\r\n$ cp gatekeeper.properties.default /etc/nginx/gatekeeper.properties\r\n\r\n$ vi /etc/nginx/gatekeeper.properties  // cluster_provider => discovery.impl\r\n..\r\ndiscovery.impl=com.xorlev.gatekeeper.discovery.ZookeeperClusterDiscovery\r\n..\r\n\r\n$ cp nginx.conf.mustache.default /etc/nginx/nginx.conf\r\n\r\n$ cp ./gatekeeper-agent/target/gatekeeper-agent-1.1.0-SNAPSHOT.jar /etc/nginx/\r\n\r\n$ cd /etc/nginx\r\n$ java -jar gatekeeper-agent-1.1.0-SNAPSHOT.jar /etc/nginx/gatekeeper.properties\r\n07:22:12.877 [main] INFO  com.xorlev.gatekeeper.AppConfig - Initializing config with file=[gatekeeper.properties]\r\n07:22:12.963 [main] WARN  c.n.c.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.\r\n07:22:12.964 [main] INFO  c.n.c.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.\r\n07:22:14.141 [main] INFO  c.n.config.DynamicPropertyFactory - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@379a935e\r\nException in thread \"main\" com.google.inject.CreationException: Guice creation errors:\r\n\r\n1) Error in custom provider, java.io.FileNotFoundException: nginx.conf.mustache (No such file or directory)\r\n  at com.xorlev.gatekeeper.GatekeeperModule.providesNginxConfigWriter(GatekeeperModule.java:74)\r\n  at com.xorlev.gatekeeper.GatekeeperModule.providesNginxConfigWriter(GatekeeperModule.java:74)\r\n  while locating com.xorlev.gatekeeper.nginx.NginxConfigWriter\r\n  at com.xorlev.gatekeeper.GatekeeperModule.configure(GatekeeperModule.java:42)\r\n  while locating com.xorlev.gatekeeper.handler.ConfigWriter\r\n\r\n1 error\r\n\tat com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)\r\n\tat com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)\r\n\tat com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)\r\n\tat com.google.inject.Guice.createInjector(Guice.java:96)\r\n\tat com.google.inject.Guice.createInjector(Guice.java:73)\r\n\tat com.google.inject.Guice.createInjector(Guice.java:62)\r\n\tat com.xorlev.gatekeeper.GatekeeperApplication.<init>(GatekeeperApplication.java:31)\r\n\tat com.xorlev.gatekeeper.GatekeeperApplication.main(GatekeeperApplication.java:65)\r\nCaused by: java.io.FileNotFoundException: nginx.conf.mustache (No such file or directory)\r\n\tat java.io.FileInputStream.open(Native Method)\r\n\tat java.io.FileInputStream.<init>(FileInputStream.java:146)\r\n\tat java.io.FileReader.<init>(FileReader.java:72)\r\n\tat com.xorlev.gatekeeper.nginx.NginxConfigWriter.<init>(NginxConfigWriter.java:29)\r\n\tat com.xorlev.gatekeeper.GatekeeperModule.providesNginxConfigWriter(GatekeeperModule.java:74)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)\r\n\tat com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)\r\n\tat com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)\r\n\tat com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)\r\n\tat com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)\r\n\tat com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)\r\n\tat com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)\r\n\tat com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)\r\n\tat com.google.inject.Scopes$1$1.get(Scopes.java:65)\r\n\tat com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)\r\n\tat com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)\r\n\tat com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)\r\n\tat com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)\r\n\tat com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)\r\n\tat com.google.inject.Scopes$1$1.get(Scopes.java:65)\r\n\tat com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)\r\n\tat com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)\r\n\tat com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)\r\n\tat com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051)\r\n\tat com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)\r\n\tat com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)\r\n\t... 6 more\r\n\r\n\r\nAnd)\r\n\r\n$ sudo service nginx restart\r\n * Restarting nginx nginx [failed]\r\n==> It may be /etc/nginx/nginx.conf <=== nginx.conf.default ( gatekeeper) \r\n\r\n$ tail -f /var/log/nginx/error.log\r\n\r\n2015/02/06 07:20:22 [emerg] 1035#0: unexpected \"{\" in /etc/nginx/nginx.conf:6\r\n\r\n"}}