Elasticsearch and Mesos using Jar files - failed to bind to [1001]


(dino) #1

HI everyone.

I am trying to deploy ES over mesos.

    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: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.


(system) #2