1

I am starting Mesos and Marathon using the following commands:

sudo service mesos-master start

sudo service marathon start

By default, Mesos is run on port 5050 and Marathon is run on port 8080. How can I change these default ports?

halfer
  • 19,824
  • 17
  • 99
  • 186
Chintamani
  • 1,076
  • 7
  • 23
  • 47

2 Answers2

1

The previous answer is for the marathon and mesos-master startup scripts which parse your options either in /etc/marathon/conf or /etc/mesos-master

You can also do it from the command line if you are not using the marathon startup scripts.

Marathon:

java <java_opts> -jar <marathon_jar> --http_port=8081

In Marathon you can also do it through an env variable under /etc/default/marathon

MARATHON_HTTP_PORT=8081

Mesos Master:

/usr/sbin/mesos-master --zk=zk://zk1:2181,zk2:2181,zk3:2181/mesos --port=5051 --log_dir=/var/log/mesos --cluster=mycluster --hostname=master --ip=<x.x.x.x> --quorum=2 --roles=myrole1,myrole2 --work_dir=/var/lib/mesos
Rico
  • 58,485
  • 12
  • 111
  • 141
0

For marathon

create file named http_port in /etc/marathon/conf/ with port you want

for example

cat 8081 > /etc/marathon/conf/http_port

For mesos master

create file named port in /etc/mesos-master/ with port you want

for example

cat 6060 > /etc/mesos-master/port
Dino L.
  • 137
  • 8