d2iq-archive/marathon-lb

Error: "Task has no resolvable IP address - skip" when app has no ports

Opened this issue · 1 comments

bydga commented

After upgrading from MLB 1.8.0 to 1.12.2 we started to see this error in syslog. Tracking it down, we found out, that it is actually printed for each marathon task that doesn't have any ports defined.

We also upgraded marathon from 1.4 to 1.6 (theres the networking rework in 1.5) - so I cant actually say, when exactly this issue happened.

Anyways, we use MLB with --group external and we specify in each app sth like HAPROXY_n_GROUP=external - if we want the specific port to be public (sometimes app has more ports, some of them loadbalanced, some of them not.

However, for apps, that have no ports at all (and thus no HAPROXY_GROUP flag) - this message gets printed for each its task - which obviously makes syslog kinda unreadable...

bydga commented

any update on this?
the marathon app to reproduce is pretty simple - just do sth like

{
      "id": "/example-app",
      "args": [
        "coffee",
        "index.coffee"
      ],
      "container": {
        "type": "DOCKER",
        "docker": {
          "image": "awsid.dkr.ecr.us-west-2.amazonaws.com/img:ver"
        },
        "portMappings": [ ]
      },
      "cpus": 1,
      "instances": 2,
      "mem": 100,
      "networks": [ {"mode": "container/bridge"}]
    }

and run mlb - i run sth like:
./marathon_lb.py --log-level WARNING --sse --marathon http://mesos-test-master.priv --group external --skip-validation --haproxy-config /tmp/haproxy.cfg

and it logs:

2018-09-11 13:41:26,964 marathon_lb: Task has no resolvable IP address - skip
2018-09-11 13:41:26,968 marathon_lb: Task has no resolvable IP address - skip

Which is kinda dumb - since we run hunderds of tasks without ip/port exposed...
I would just remove: https://github.com/mesosphere/marathon-lb/blob/master/marathon_lb.py#L1746 or set verbosity of this line to debug - surely its not a warning.