1
votes

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?

2

2 Answers

1
votes

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
0
votes

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