Hi James, Sorry to bring this up again. But I have marathon constantly logging because of using the host name from the host networking, instead of using its own task name marathon.xxx.xxx.xxx.mesos as a host name for which there is a certificate.
Do you have an example of setting the hostname via mesos json? Because I have no idea how to interpret the github link. [1] Dec 8 11:03:39 c02 marathon: ERROR Connection to leader refused. Dec 8 11:03:39 c02 #011akka.stream.ConnectionException: Hostname verification failed! Expected session to be for c03 Dec 8 11:03:40 c03 marathon: ERROR Connection to leader refused. Dec 8 11:03:40 c03 #011akka.stream.ConnectionException: Hostname verification failed! Expected session to be for c03 Dec 8 11:03:54 c02 marathon: ERROR Connection to leader refused. Dec 8 11:03:54 c02 #011akka.stream.ConnectionException: Hostname verification failed! Expected session to be for c03 Dec 8 11:03:55 c03 marathon: ERROR Connection to leader refused. Dec 8 11:03:55 c03 #011akka.stream.ConnectionException: Hostname verification failed! Expected session to be for c03 Dec 8 11:04:09 c02 marathon: ERROR Connection to leader refused. Dec 8 11:04:09 c02 #011akka.stream.ConnectionException: Hostname verification failed! Expected session to be for c03 Dec 8 11:04:10 c03 marathon: ERROR Connection to leader refused. -----Original Message----- Subject: Re: hostname in task > > > I read you can add a hostname option to the container in this > issue[0], however I still have the uuid. Is this in available in mesos 1.8? Yep. > Can I > somewhere read all these options? Like here[1] The Mesos API is defined in the ContainerInfo protobuf, but Im not sure how marathon maps that https://github.com/apache/mesos/blob/master/include/mesos/v1/mesos.proto#L3395 > > > [@ cni]# cat 2f261fa8-4985-4614-b712-f0785ca6ce04/hosts > 127.0.0.1 localhost > 192.168.123.32 2f261fa8-4985-4614-b712-f0785ca6ce04 > > [0] > https://reviews.apache.org/r/55191/ > [1] > http://mesosphere.github.io/marathon/api-console/index.html > > Using mesos 1.8 > And > > "container": { > "type": "MESOS", > "hostname": "test.example.com", > "docker": { > "image": "test", > "credential": null, > "forcePullImage": true > }, > "volumes": [ > { > "mode": "RW", > "containerPath": "/dev/log", > "hostPath": "/dev/log" > } > ] > },