lmenezes / cerebro

MIT License
5.54k stars 717 forks source link

centOS cerebro #297

Open LucaasThales opened 6 years ago

LucaasThales commented 6 years ago

I might be bad or something but i can't manage to make it run, I'm running a server under the lastest version of elasticsearch since kopf is no longer updated i have to turn out for the cerebro solution but, I got two cerebro a master one, and the basic one (0.7.3) with the bin with two cerebro a .bat and the other one extracted both of thee cerebro file on my desktop what should i do now ? the instruction are really unclear modified the conf file it start but nothing happen i also tried to put the cerebro-master in the eslactisearch plugin directory and configure it but nothing happend aswell

i couldn't figure out where to find or put the -dhttp:port and -dhttp:address

Found out something i put the cerebro in my /opt then i created a cerebro.service in /etc/systemd/system containing this script [Unit] Description=Elasticsearch - Cerebro Wants=network-online.target After=network-online.target

[Service] Environment=HOST=192.168.x.x Environment=PORT=9200

WorkingDirectory=/opt/cerebro/current

User=elasticsearch Group=elasticsearch

ExecStart=/opt/cerebro/current/bin/cerebro \ -Dhttp.port=${9200} \ -Dhttp.address=${192.168.x.x}

However i'm getting this error :

cerebro.service - Elasticsearch - Cerebro Loaded: loaded (/etc/systemd/system/cerebro.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since jeu. 2018-06-07 11:05:22 CEST; 6s ago Process: 2141 ExecStart=/opt/cerebro/current/bin/cerebro -Dhttp.port=${9200} -Dhttp.address=${192.168.x.x} (code=exited, status=200/CHDIR) Main PID: 2141 (code=exited, status=200/CHDIR)

Amorik commented 6 years ago

You'll find working examples of startup scripts under #87

On that note, you can add the Play Framework settings in the application conf file.

Example:

http = {
    port = "1234"
    address = "192.168..1.1"
}

SSL Example:

http = {
  port = "disabled"
}

https = {
  port = "1234"
}

play.server.https {
  keyStore = {
    path = "keystore.jks",
    password = "SuperSecretKeystorePassword"
  }
}

play.ws.ssl {
  trustManager = {
    stores = [
      { type = "JKS", path = "truststore.jks", password = "SuperSecretTruststorePassword"  }
    ]
  }
}
LucaasThales commented 6 years ago

Thanks

Basically i tried something else, i created a start.bat which contain cerebro -Dhttp.port=9000 -Dhttp.address=192.168.x.x

But this time i'm getting another error :

2018-06-08 09:12:44,054 - [ERROR] - from akka.io.TcpListener in application-akka.actor.default-dispatcher-5 Bind failed for TCP channel on endpoint [/192.168.10.30:9000] java.net.BindException: Cannot assign requested address: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at akka.io.TcpListener.liftedTree1$1(TcpListener.scala:56) at akka.io.TcpListener.(TcpListener.scala:53) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at akka.util.Reflect$.instantiate(Reflect.scala:65) at akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:96) at akka.actor.Props.newActor(Props.scala:213) at akka.actor.ActorCell.newActor(ActorCell.scala:563) at akka.actor.ActorCell.create(ActorCell.scala:589) at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:462) at akka.actor.ActorCell.systemInvoke(ActorCell.scala:484) at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282) at akka.dispatch.Mailbox.run(Mailbox.scala:223) at akka.dispatch.Mailbox.exec(Mailbox.scala:234) at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

I bet it's because one of the following port i put isn't open but i assure that my firewall disabled and my port is opened after this still getting the same error

victor-0807 commented 6 years ago

I wrote an article for installation as service, for reference. https://www.jianshu.com/p/e61c82af2e19