Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-3672

Mesos fetcher not working on docker apps?

    Details

    • Type: Task
    • Status: Resolved
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Installed Marathon 0.15. Then I tries to start prometheus:

      {
        "id": "prometheus",
        "args": ["-config.file=$MESOS_SANDBOX/prometheus.yml"],
        "cpus": 50,
        "mem": 1024,
        "ports": [9090,9093],
        "requirePorts": true,
        "instances": 1,
        "constraints": [["hostname", "UNIQUE"]],
        "acceptedResourceRoles": [ "*" ],
        "container": {
          "type": "DOCKER",
          "docker": {
            "image": "prom/prometheus:0.16.2",
            "network": "HOST"
          }
        },
        "uris": [
          "http://mesos-master.aws.cmcrc.com/prometheus.yml"
        ]
      }
      

      The prometheus.yml is a standard prometheus config file. Like this:

      global:
        scrape_interval:     15s # By default, scrape targets every 15 seconds.
        evaluation_interval: 15s # By default, scrape targets every 15 seconds.
        external_labels:
            monitor: 'codelab-monitor'
      rule_files:
        # - "first.rules"
        # - "second.rules"
      scrape_configs:
        - job_name: 'prometheus'
          scrape_interval: 5s
          scrape_timeout: 10s
          target_groups:
            - targets: ['localhost:9090']
        - job_name: mesos-slave
          dns_sd_configs:
          - refresh_interval: 15s
            type: A
            port: 9104
            names:
            - slave.mesos
      

      The problem is that prometheus will respond as
      time="2016-02-08T01:54:40Z" level=error msg="Couldn't load configuration (-config.file=$MESOS_SANDBOX/prometheus.yml): open $MESOS_SANDBOX/prometheus.yml: no such file or directory" source="main.go:208"

      In the mesos-master, the file is listed:

      -rw-r--r--  1   root    root    1 KB    Feb 08 12:54     prometheus.yml  Download
      -rw-r--r--  1   root    root    2 KB    Feb 08 12:54     stderr  Download
      -rw-r--r--  1   root    root    1 KB    Feb 08 12:54     stdout
      

      But in the container path, the file does not exist:
      ls /var/lib/mesos/slave/slaves/..../executors/prometheus.e77ca7c5-ce06-11e5-ad23-96dfddec601a/runs/8024bff8-5aa7-45b7-a910-eac102d1f985

      Nothing...

      So where is the file? Why is it not mounted?

      Luck!
      Guimo

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              GitHub_Spritekin Spritekin (Inactive)
              Team:
              Orchestration Team
              Watchers:
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: