mesos / elasticsearch

Elasticsearch on Mesos
Apache License 2.0
242 stars 92 forks source link

Using Jar files - failed to bind to [1001] #585

Closed dinoba closed 7 years ago

dinoba commented 7 years ago

I am using this tutorial (http://mesos-elasticsearch.readthedocs.io/en/latest/#how-to-install-on-marathon) to deploy elasticsearch over Marathon. This is my Marathon request

{ "id": "/elasticsearch", "cmd": "java -jar mesos-elasticsearch-scheduler-1.0.1.jar --frameworkUseDocker false --zookeeperMesosUrl zk://192.168.1.21:2181,192.168.1.22:2181,192.168.1.23:2181/mesos --frameworkName elasticsearch --elasticsearchClusterName mesos-elasticsearch --elasticsearchCpu 0.5 --elasticsearchRam 512 --elasticsearchDisk 1024 --elasticsearchNodes 1 --elasticsearchSettingsLocation /home/dino/elasticsearch.yml", "cpus": 1, "mem": 1300, "disk": 0, "instances": 0, "env": { "JAVA_OPTS": "-Xms1g -Xmx1g" }, "portDefinitions": [ { "port": 31000, "protocol": "tcp", "labels": {} } ], "uris": [ "https://github.com/mesos/elasticsearch/releases/download/1.0.1/mesos-elasticsearch-scheduler-1.0.1.jar" ], "fetch": [ { "uri": "https://github.com/mesos/elasticsearch/releases/download/1.0.1/mesos-elasticsearch-scheduler-1.0.1.jar", "extract": false, "executable": false, "cache": false } ] }

And this is my error log

I1011 15:04:42.649909 7621 fetcher.cpp:498] Fetcher Info: {"cache_directory":"\/tmp\/mesos\/fetch\/slaves\/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1\/root","items":[{"action":"BYPASS_CACHE","uri":{"extract":true,"value":"http:\/\/slave1:34882\/get\/public\/elasticsearch.tar.gz"}},{"action":"BYPASS_CACHE","uri":{"extract":true,"value":"\/home\/dino\/elasticsearch.yml"}}],"sandbox_directory":"\/var\/lib\/mesos\/slaves\/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1\/frameworks\/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001\/executors\/elasticsearch_192.168.1.18_20161011T150442.461Z\/runs\/9e62fa64-cbef-488b-a8ae-188ec16c5c3c","user":"root"} I1011 15:04:42.652412 7621 fetcher.cpp:409] Fetching URI 'http://slave1:34882/get/public/elasticsearch.tar.gz' I1011 15:04:42.652427 7621 fetcher.cpp:250] Fetching directly into the sandbox directory I1011 15:04:42.652446 7621 fetcher.cpp:187] Fetching URI 'http://slave1:34882/get/public/elasticsearch.tar.gz' I1011 15:04:42.652457 7621 fetcher.cpp:134] Downloading resource from 'http://slave1:34882/get/public/elasticsearch.tar.gz' to '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c/elasticsearch.tar.gz' I1011 15:04:42.749299 7621 fetcher.cpp:84] Extracting with command: tar -C '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c' -xf '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c/elasticsearch.tar.gz' I1011 15:04:43.124155 7621 fetcher.cpp:92] Extracted '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c/elasticsearch.tar.gz' into '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c' I1011 15:04:43.124197 7621 fetcher.cpp:547] Fetched 'http://slave1:34882/get/public/elasticsearch.tar.gz' to '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c/elasticsearch.tar.gz' I1011 15:04:43.124204 7621 fetcher.cpp:409] Fetching URI '/home/dino/elasticsearch.yml' I1011 15:04:43.124209 7621 fetcher.cpp:250] Fetching directly into the sandbox directory I1011 15:04:43.124233 7621 fetcher.cpp:187] Fetching URI '/home/dino/elasticsearch.yml' I1011 15:04:43.124248 7621 fetcher.cpp:167] Copying resource with command:cp '/home/dino/elasticsearch.yml' '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c/elasticsearch.yml' W1011 15:04:43.126762 7621 fetcher.cpp:289] Copying instead of extracting resource from URI with 'extract' flag, because it does not seem to be an archive: /home/dino/elasticsearch.yml I1011 15:04:43.126803 7621 fetcher.cpp:547] Fetched '/home/dino/elasticsearch.yml' to '/var/lib/mesos/slaves/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1/frameworks/7cb695a7-3336-4fcd-8fcf-670fae5f1cad-0001/executors/elasticsearch_192.168.1.18_20161011T150442.461Z/runs/9e62fa64-cbef-488b-a8ae-188ec16c5c3c/elasticsearch.yml' I1011 15:04:43.250669 7615 exec.cpp:161] Version: 1.0.1 I1011 15:04:43.252912 7628 exec.cpp:236] Executor registered on agent 7cb695a7-3336-4fcd-8fcf-670fae5f1cad-S1 Exception in thread "main" BindTransportException[Failed to bind to [1001]]; nested: ChannelException[Failed to bind to: /0.0.0.0:1001]; nested: SocketException[Permission denied]; Likely root cause: java.net.SocketException: Permission denied at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Refer to the log for complete error details.

What am I doing wrong here.

dinoba commented 7 years ago

installed using docker