Marathon-consul - Integrates Marathon apps with Consul service discovery.

marathon-consul Build Status Coverage Status Go Report Card Download latest version

We no longer develop this project. If you'd like to take over and continue its maintenance, please fork this repository and let us know by Github issues.

Register Marathon Tasks as Consul Services for service discovery.

marathon-consul takes information provided by the Marathon event bus and forwards it to Consul agents. It also re-syncs all the information from Marathon to Consul on startup and repeats it with given interval.

Note: In the future release Event Bus (callbacks) will be considered deprecated and eventually removed in favor of Event Stream (SSE). Right now marathon-consul is supporting both solutions. SSE is provided as experimental feature, disabled by default (more).

Code

This project is based on

Differences

  • CiscoCloud/marathon-consul copies application information to Consul KV while allegro/marathon-consul registers tasks as Consul services (it is more similar to CiscoCloud/mesos-consul)
  • CiscoCloud/mesos-consul uses polling while allegro/marathon-consul uses Marathon's event bus to detect changes
  • CiscoCloud/marathon-consul is no longer developed (see comment)

Installation

Installing from source code

To simply compile and run the source code:

go run main.go [options]

To run the tests:

make test

To build the binary:

make build

Installing from binary distribution

Binary distribution of marathon-consul can be downloaded directly from the releases page. Download the build dedicated to your OS. After unpacking the archive, run marathon-consul binary. You can also add some options, for example:

marathon-consul --marathon-location=marathon.service.consul:8080 --sync-interval=5m --log-level=debug

Installing via APT package manager

If you are a Debian/Ubuntu user, you can easily install marathon-consul as a deb package using APT package manager. Both upstart and systemd service managers are supported. All releases are published as deb packages to our repository at Bintray.

To install marathon-consul with apt-get, simply follow the instructions:

# add our public key to apt
curl -s https://bintray.com/user/downloadSubjectPublicKey?username=allegro | sudo apt-key add -
# add the repository url
echo "deb http://dl.bintray.com/v1/content/allegro/deb /" | sudo tee /etc/apt/sources.list.d/marathon-consul.list
# update apt cache
sudo apt-get -y update
# install latest release of marathon-consul
sudo apt-get -qy install marathon-consul

Run it with service marathon-consul start. The configuration file is located at /etc/marathon-consul.d/config.json.

Installing with Docker

To build docker image run

make docker

Then you can run it with

docker run -d -P allegro/marathon-consul [options]

If you want to use SSL you will need to expose cert store to Docker. The Following line is only example, your cert store might be different depending on your system.

docker run '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt' -P  allegro/marathon-consul

Usage

Marathon masters

  • marathon-consul should be installed on all Marathon masters

Mesos agents

  • Consul Agents should be available on every Mesos agent.
  • Tasks will be registered at the Mesos slave they run on.

Tagging tasks

  • Task labels are used by marathon-consul to register tasks in Consul.
  • Only tasks which are labeled as consul will be registered in Consul. If the consul label is left blank like "consul": "", the task will be registered with the app name by default. A different name can be provided as the label's value, e.g. "consul": "customName". As an exception to this rule, for backward compatibility with the 0.3.x branch, a value of true is resolved to the default name.
  "id": "my-new-app",
  "labels": {
    "consul": ""
  }
  • Only services with tag specified by consul-tag property will be maintained. By default, "consul-tag": "marathon" is automatically added when the task is registered.
  • Labels with a value of tag are converted to consul-tags, and appear in Consul as ServiceTags.
  • For example, we can set these tags in an app definition like:
  "id": "my-new-app",
  "labels": {
    "consul": "",
    "varnish": "tag",
    "metrics": "tag"
  }
  • If marathon-consul registers the app with Consul, we can then query Consul and see these tags appear:
curl -X GET http://localhost:8500/v1/catalog/service/my-new-app
...
"ServiceName": "my-new-app",
"ServiceTags": [
  "marathon",
  "varnish",
  "metrics",
  "marathon-task:my-new-app.6a95bb03-6ad3-11e6-beaf-080027a7aca0"
],

  • Every service registration contains an additional tag marathon-task specifying the Marathon task id related to this registration.
  • If there are multiple ports in use for the same app, note that only the first one will be registered by marathon-consul in Consul.

If you need to register your task under multiple ports, refer to Advanced usage section below.

Task healthchecks

  • At least one HTTP healthcheck should be defined for a task. The task is registered when Marathon marks it as alive.
  • The provided HTTP healthcheck will be transferred to Consul.
  • See this for more details.

Command healthchecks

Healthchecks commands are registered in Consul with a simple variable substitution.

  • $HOST is replaced by task hostname.
  • $PORT0, $PORT1... are replaced by port number defined in task.

Using a special shell syntax can break this variable substitution ($HOST, ${PORT0} ...)

Sync

  • The scheduled Marathon-consul sync may run in two modes:
    • Only on node that is the current Marathon-leader, marathon-leader parameter should be set to hostname:port the current node appears in the Marathon cluster. This mode is enabled by default and the marathon-leader property is set to the hostname resolved by OS. Note that there is a difference between marathon-leader and marathon-location: marathon-leader is used for node leadership detection (should be set to cluster-wide node name), while marathon-location is used for connection purpose (may be set to localhost)
    • On every node, sync-force parameter should be set to true
  • If marathon-consul fails on startup sync and you see following error "Can't get Consul services: No Consul client available in agents cache" it may be caused by empty consul agents cache. If this occurs try configuring --consul-local-agent-host to Consul Master or Consul agent.

Options

Argument Default Description
config-file Path to a JSON file to read configuration from. Note: Will override options set earlier on the command line
consul-auth false Use Consul with authentication
consul-auth-password The basic authentication password
consul-auth-username The basic authentication username
consul-enable-tag-override false Disable the anti-entropy feature for all services
consul-ignored-healthchecks A comma separated blacklist of Marathon health check types that will not be migrated to Consul, e.g. command,tcp
consul-local-agent-host Consul Agent hostname or IP that should be used for startup sync and service listing operations
consul-name-separator . Separator used to create default service name for Consul
consul-get-services-retry 3 Number of retries on failure when performing requests to Consul. Each retry uses different cached agent
consul-max-agent-failures 3 Max number of consecutive request failures for agent before removal from cache
consul-port 8500 Consul port
consul-ssl false Use HTTPS when talking to Consul
consul-ssl-ca-cert Path to a CA certificate file, containing one or more CA certificates to use to validate the certificate sent by the Consul server to us
consul-ssl-cert Path to an SSL client certificate to use to authenticate to the Consul server
consul-ssl-verify true Verify certificates when connecting via SSL
consul-tag marathon Common tag name added to every service registered in Consul, should be unique for every Marathon-cluster connected to Consul
consul-timeout 3s Time limit for requests made by the Consul HTTP client. A Timeout of zero means no timeout
consul-token The Consul ACL token
events-queue-size 1000 Size of events queue
event-max-size 4096 Maximum size of event to process (bytes)
listen :4000 Accept connections at this address
log-file Save logs to file (e.g.: /var/log/marathon-consul.log). If empty logs are published to STDERR
log-format text Log format: JSON, text
log-level info Log level: panic, fatal, error, warn, info, or debug
marathon-location localhost:8080 Marathon URL
marathon-password Marathon password for basic auth
marathon-protocol http Marathon protocol (http or https)
marathon-ssl-verify true Verify certificates when connecting via SSL
marathon-timeout 30s Time limit for requests made by the Marathon HTTP client. A Timeout of zero means no timeout
marathon-username Marathon username for basic auth
marathon-leader Marathon cluster-wide node name (defaults to :8080), the some leader specific calls will be made only if the specified node is the current Marathon-leader. Set to * to always act like a Leader.
metrics-interval 30s Metrics reporting interval
metrics-location Graphite URL (used when metrics-target is set to graphite)
metrics-prefix default Metrics prefix (default is resolved to .<app_name>
metrics-target stdout Metrics destination stdout or graphite (empty string disables metrics)
sentry-dsn Sentry DSN. If it's not set sentry will be disabled
sentry-env Sentry environment
sentry-level error Sentry alerting level (info
sentry-timeout 1s Sentry hook initialization timeout
sse-retries 0 Number of times to recover SSE stream.
sse-retry-backoff 0s Configuration of initial time between retries to recover SSE stream.
sync-enabled true Enable Marathon-consul scheduled sync
sync-force false Force leadership-independent Marathon-consul sync (run always)
sync-interval 15m0s Marathon-consul sync interval
workers-pool-size 10 Number of concurrent workers processing events

Endpoints

Endpoint Description
/health healthcheck - returns OK

Advanced usage

Register under multiple ports

If you need to map your Marathon task into multiple service registrations in Consul, you can configure marathon-consul via Marathon's portDefinitions:

  "id": "my-new-app",
  "labels": {
    "consul": "",
    "common-tag": "tag"
  },
  "portDefinitions": [
    {
      "labels": {
        "consul": "my-app-custom-name"
      }
    },
    {
      "labels": {
        "consul": "my-app-other-name",
        "specific-tag": "tag"
      }
    }
  ]

This configuration would result in two service registrations:

curl -X GET http://localhost:8500/v1/catalog/service/my-app-custom-name
...
"ServiceName": "my-app-custom-name",
"ServiceTags": [
  "marathon",
  "common-tag",
  "marathon-task:my-new-app.6a95bb03-6ad3-11e6-beaf-080027a7aca0"
],
"ServicePort": 31292,
...

curl -X GET http://localhost:8500/v1/catalog/service/my-app-other-name
...
"ServiceName": "my-app-other-name",
"ServiceTags": [
  "marathon",
  "common-tag",
  "specific-tag",
  "marathon-task:my-new-app.6a95bb03-6ad3-11e6-beaf-080027a7aca0"
],
"ServicePort": 31293,
...

If any port definition contains the consul label, then advanced configuration mode is enabled. As a result, only the ports containing this label are registered, under the name specified as the label's value – with empty value resolved to default name. Names don't have to be unique – you can have multiple registrations under the same name, but on different ports, perhaps with different tags. Note that the consul label still needs to be present in the top-level application labels, even though its value won't have any effect.

Tags configured in the top-level application labels will be added to all registrations. Tags configured in the port definition labels will be added only to corresponding registrations.

All registrations share the same marathon-task tag.

Migration to version 1.x.x

Until 1.x.x marathon-consul would register services in Consul with registration id equal to related Marathon task id. Since 1.x.x registration ids are different and an additional tag, marathon-task, is added to each registration.

If you update marathon-consul from version 0.x.x to 1.x.x, expect the synchronization phase during the first startup to reregister all healthy services managed by marathon-consul to the new format. Unhealthy services will get deregistered in the process.

SSE Support

While using SSE please consider:

  • SSE is using Web module config for queues, event sizes, in the future will be moved to sse module,
  • SSE is using marathon-leader config for determining current leader, when this value match leader returned by marathon (/v2/leader endpoint) then SSE is started on this instance,
  • when enabled SSE is spawning its own own set of workers and separated dispatcher,
  • be advised to disable marathon callback subscription when enabling SSE, otherwise it might result in doubling registers and deregisers.

HTTP callbacks support

Marathon-Consul does not support HTTP callbacks. Marathon deprecated support for HTTP callbacks in 1.4. This mechanism is no longer available starting from Marathon 1.5.

Known limitations

The following section describes known limitations in marathon-consul.

  • In Marathon when a deployment changing the application's service name (by changing its labels) is being stopped, it changes app's configuration anyway. This means we loose the link between the app and the services registered with the old name in Consul. Later on, if another deployment takes place, new services are registered with a new name, the old ones are not being deregistered though. A scheduled sync is required to wipe them out.

Release

To release new version of marathon-consul follow steps:

  1. Commit all changes you need for release to master branch.
  2. git checkout master
  3. git checkout -b release/<version> e.g., git checkout -b release/1.3.1
  4. make version v=<version> e.g., make version v=1.3.1
  5. git push
  6. Create pull request from branch release/<version> to master.
  7. Once pull request gets merged put tag on this commit (remember to update your master with git pull) git tag <version> -f e.g., git tag 1.3.1 -f. Create annotated tag with release notes in it.
  8. Travis will automatically prepare github release from tag on master. Go there and update release notes.
  9. Copy github release to bintray.

License

Marathon-consul is released under the Apache 2.0 license (see LICENSE)

Owner
Allegro Tech
Allegro Tech Open Source Projects
Allegro Tech
Comments
  • marathon-consul loses connectivity to marathon

    marathon-consul loses connectivity to marathon

    Hi Everyone,

    I don't see an open ticket on this, so I doubt anyone else is seeing this (and I cannot replicate on my five-node cluster at home). With 1.3.3 on my work cluster marathon-consul periodically loses connectivity to marathon with connection refused exceptions. marathon-consul restarts five times--each time logging that it is getting a connection refused from marathon--eventually staying in a connection refused state and therefore failing to capture marathon events from the event stream.

    Maybe marathon-consul should continue to attempt to reconnect as opposed to getting into a state where it gives up?

    --John

  • marathon-consul does not recover from connection refused in leader retrieval

    marathon-consul does not recover from connection refused in leader retrieval

    Connection error to co-located Marathon server instance results in marathon-consul restart after 5 connection errors with the following message:

     level=warning msg="Error on http request" Location="******:8080" Protocol="http" error="Get http://******:8080/v2/leader: dial tcp ******:8080: getsockopt: connection refused" statusCode"???" 
    

    This message is followed by:

    level=fatal msg="Leader poll failed. Check marathon and previous errors. Exiting" error="Failed to get a leader after 5 retries"
    

    This look happens three times and then, on the fourth iteration, marathon-consul gets into an endless loop of the following:

    level=debug "Asking Marathon for leader" Location="******:8080"
    level=debug "Sending GET request to marathon" Location="******:8080" Protocol=http Uri="/v2/leader"
    level=debug "I am not leader" 
    

    When I discovered this last round of error messages was ocurring, I was able to curl this URL from the host box, so it seems marathon-consul got in a state that the leader check failed irrespective of return of connectivity to the co-located marathon instance.

    I recommend making a plugin framework that enables different options for handling failure of the co-located marathon instance. One possibility would be to enable passing a comma-delimited marathon urls analogous to a list of zookeepers.

  • Sync is failling when no agents stored in cache

    Sync is failling when no agents stored in cache

    In rare cases when marathon-consul is commencing sync there could be no agents available in the cache. For example just after start-up.

    It results in following error:

    {
      "error" : "Can't get Consul services: No Consul client available in agents cache",
      "level" : "error",
      "msg" : "An error occured while performing sync",
      "time" : "2017-02-28T10:44:15+01:00"
    }
    

    And sync is dropped.

    This is happening because agent cache is fed on registrations and de-registrations. While sync at the beginning is calling for list of applications and to do that agent cache must not be empty.

    Summarizing: no register/de-register before sync -> marathon-consul will fail on sync.

    To resolve, we could place consul-master in configuration as a fall-back agent-replacement and use in the case of nil cache.

  • marathon leader should be retrieved from Marathon on startup

    marathon leader should be retrieved from Marathon on startup

    Hi Everyone,

    First of all, marathon-consul is a great product--well done! I've been running it for a week and it's working exactly as advertised.

    The only area of concern is that the marathon-leader config parameter is static and therefore marathon-consul could fail on a restart if the marathon leader changes. If the marathon-leader parameter is replaced with a call to the /v2/leader REST endpoint this would ensure correct configuration in the event of a marathon leader change.

    Thanks

    --John

  • Separate service id from task

    Separate service id from task

    Consul service used to be registered under the same id as its related marathon task id. This PR separates these two ids. Marathon task id is remembered in service's marathon-task tag. Also did some refactorings: extracted Service and ServiceId domain types, and also ServiceRegistry interface to make things more clear by hiding Consul internals.

    I'm still working on this PR, going to cleanup some code and verify that all branches are covered with tests. But the main idea is there, so waiting for your feedback.

    It's a prerequisite to #89, because we would register more than one service for a given marathon task.

  • error=Can't get Consul services: No Consul client available in agents cache

    error=Can't get Consul services: No Consul client available in agents cache

    Hello,

    I apologize ahead of time. I am new to Mesos/Marathon and even newer with allegro/marathon-consul. I have read the README and based my command on the example therein:

    ./marathon-consul --marathon-location=our-marathonservers.service.consul=8181 --sync-interval=2m --sync-force=true --log-level=debug
    
    • My infrastructure has a fully-working consul fabric
    • All servers in the infrastructure are resolvable by hostname.node.consul.
    • The services they avail are resolvable by servicename.node.consul.
    • All servers have consul accessible via localhost:8500,8600

    I presumed that config-file meant a consul configuration. I pointed it to the configuration file that already exists in the host. This is the same command with the config-file specified:

    ./marathon-consul --config-file=/etc/consul/config.json --marathon-location=marathon.service.consul=8181 --sync-interval=2m --sync-force=true --log-level=debug
    

    Running either commands above gives this error:

    error=Can't get Consul services: No Consul client available in agents cache
    

    Could someone please help me? Thank you.

  •  support leader discovery logic so can support port other than 8080

    support leader discovery logic so can support port other than 8080

    I have no go experience but I thought I would give this a shot. Basically we run Marathon in port 8800 and can not use the marathon-consul feature of having it sync only on the master because marathon-consul can only support finding masters if they run on port 8080 due to the hardcoding of that in the resolveHostname function. This may not be the exact code that you would use but I hope at least I have come close. Thanks!

  • Multiple registrations

    Multiple registrations

    This PR enabled registering multiple service instances for a given marathon app, e.g. with different ports, names or tags. These additional registration details can be provided in portDefinitions part of the marathon app configuration. Previous configuration method, via app-level labels, is still supported and that has not changed.

    I'm going to commit changes in README on Monday ;)

  • Support multiple ports

    Support multiple ports

    Most of our marathon apps have only one portMapping but sometimes we have an app with multiple ports where one of the ports will be used for (http) health checks.

    In newer versions of marathon you can specify labels for each port in the "portMappings". Maybe this is something we can use to register services in consul?

    Example marathon app:

    {
      "id": "/hello-world",
      "cpus": 0.1,
      "mem": 256,
      "instances": 1,
      "container": {
        "type": "DOCKER",
        "docker": {
          "image": "my-hello-world:latest",
          "network": "BRIDGE",
          "portMappings": [
            {
              "containerPort": 8080,
              "hostPort": 0,
              "protocol": "tcp",
              "name": "api",
              "labels": { 
                  "consul": "helloworld-api"
              }
            },
            {
              "containerPort": 8081,
              "hostPort": 0,
              "protocol": "tcp",
              "name": "actuator",
              "labels": {
                  "consul": "helloworld-health"
              }
            }
          ]
       }
      },
      "healthChecks": [
        {
          "path": "/health",
          "protocol": "HTTP",
          "portIndex": 1,
          "gracePeriodSeconds": 300,
          "intervalSeconds": 10,
          "timeoutSeconds": 10,
          "maxConsecutiveFailures": 3,
          "ignoreHttp1xx": false
        }
      ]
    }
    
  • Speed up consul services deregistration during sync

    Speed up consul services deregistration during sync

    | New | Loops | Speed [ns/op] | | --- | --- | --- | | BenchmarkDeregisterConsulServicesThatAreNotInMarathonApps10x2-4 | 300000 | 4684 | | BenchmarkDeregisterConsulServicesThatAreNotInMarathonApps100x2-4 | 30000 | 53626 | | BenchmarkDeregisterConsulServicesThatAreNotInMarathonApps100x100-4 | 300 | 5359705 |

    | Old | Loops | Speed [ns/op] | | --- | --- | --- | | BenchmarkDeregisterConsulServicesThatAreNotInMarathonApps10x2-4 | 200000 | 6307 | | BenchmarkDeregisterConsulServicesThatAreNotInMarathonApps100x2-4 | 2000 | 608956 | | BenchmarkDeregisterConsulServicesThatAreNotInMarathonApps100x100-4 | 1 | 1460033471 |

    Generated with go test ./sync -bench=.

  • Deb package should not replace configs

    Deb package should not replace configs

    When you install marathon-consul from deb it will overwrite /etc/marathon-consul.d/config.json. Instead user should be asked what should happen.

    https://www.debian.org/doc/debian-policy/ch-files.html#s-config-files

  • APT repository not signed

    APT repository not signed

    Following the instructions for adding the key and APT repository, get the following on Ubuntu 20.04

    sudo apt-get -y update
    Ign:1 http://dl.bintray.com/v1/content/allegro/deb  InRelease
    Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
    Get:3 http://dl.bintray.com/v1/content/allegro/deb  Release [815 B]
    Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
    Ign:5 http://dl.bintray.com/v1/content/allegro/deb  Release.gpg
    Get:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
    Get:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
    Reading package lists... Done
    E: The repository 'http://dl.bintray.com/v1/content/allegro/deb  Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    Also noticed that releases post 1.4.2 are not on bintray. Is this intentional?

  • Change FindTaskById function

    Change FindTaskById function

    This change will fix issue: https://github.com/allegro/marathon-consul/issues/296

    It makes the FindTaskById function to match also on the first part of an id, so marathon-consul will be compatible with version 1.9 of marathon.

    To avoid matching on too little information, also the requirement of at least a length of an id with 36 chars.

  • Task ID wrong in health status event

    Task ID wrong in health status event

    Hi,

    we are looking to upgrade marathon, and also marathon consul. We are testing with Version: 1.4.2 (from apt) and marathon 1.9.

    We see that when an application is stopped (by scaling to 0 instances) and then starting by setting 1 instance, the application is not registered in consul (the unregister works fine though). We see the following in the marathon-consul log where I grep the instance UUID:

    `grep b98f6bf3-eb61-11e9-af4c-02423f927891 /var/log/marathon-consul.log

    time="2019-10-10T13:27:38Z" level=info msg="Got StatusEvent" Id=demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891._app.1 TaskStatus="TASK_STARTING"

    time="2019-10-10T13:27:38Z" level=debug msg="Not handled task status" Id=demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891._app.1 taskStatus="TASK_STARTING"

    time="2019-10-10T13:27:38Z" level=info msg="Got StatusEvent" Id=demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891._app.1 TaskStatus="TASK_RUNNING"

    time="2019-10-10T13:27:38Z" level=debug msg="Not handled task status" Id=demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891._app.1 taskStatus="TASK_RUNNING"

    time="2019-10-10T13:27:41Z" level=info msg="Got HealthStatusEvent" Id=demo_hello-world.b98f6bf3-eb61-11e9-af4c-02423f927891

    time="2019-10-10T13:27:41Z" level=error msg="Task not found" Id=demo_hello-world.b98f6bf3-eb61-11e9-af4c-02423f927891

    time="2019-10-10T13:27:41Z" level=info msg="Got HealthStatusEvent" Id=demo_hello-world.b98f6bf3-eb61-11e9-af4c-02423f927891

    time="2019-10-10T13:27:41Z" level=error msg="Task not found" Id=demo_hello-world.b98f6bf3-eb61-11e9-af4c-02423f927891 `

    So the "Got HealthStatusEvent" registers the following instanceID: demo_hello-world.b98f6bf3-eb61-11e9-af4c-02423f927891 where we see that the instance ID is demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891

    So I thought that the marathon event endpoint returns an incorrect instanceid and went on to capture the traffic with tcpflow (tcpflow -i eth1 -c port 8080 >> ~/tcpdump2) that goes through the events endpoint:

    grep b98f6bf3-eb61-11e9-af4c-02423f927891 ~/tcpdump2 data: {"instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","condition":"Scheduled","runSpecId":"/demo/hello-world","agentId":null,"host":null,"runSpecVersion":"2019-10-10T13:27:36.878Z","timestamp":"2019-10-10T13:27:36.906Z","eventType":"instance_changed_event"} data: {"instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","condition":"Provisioned","runSpecId":"/demo/hello-world","agentId":"6b0d8829-4681-4638-bbe2-121d950e241e-S0","host":"10.141.141.10","runSpecVersion":"2019-10-10T13:27:36.878Z","timestamp":"2019-10-10T13:27:37.746Z","eventType":"instance_changed_event"} data: {"slaveId":"6b0d8829-4681-4638-bbe2-121d950e241e-S0","taskId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891._app.1","taskStatus":"TASK_STARTING","message":"","appId":"/demo/hello-world","host":"10.141.141.10","ipAddresses":[{"ipAddress":"127.0.1.1","protocol":"IPv4"}],"ports":[31338],"version":"2019-10-10T13:27:36.878Z","eventType":"status_update_event","timestamp":"2019-10-10T13:27:38.063Z"} data: {"instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","condition":"Starting","runSpecId":"/demo/hello-world","agentId":"6b0d8829-4681-4638-bbe2-121d950e241e-S0","host":"10.141.141.10","runSpecVersion":"2019-10-10T13:27:36.878Z","timestamp":"2019-10-10T13:27:38.063Z","eventType":"instance_changed_event"} data: {"slaveId":"6b0d8829-4681-4638-bbe2-121d950e241e-S0","taskId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891._app.1","taskStatus":"TASK_RUNNING","message":"","appId":"/demo/hello-world","host":"10.141.141.10","ipAddresses":[{"ipAddress":"127.0.1.1","protocol":"IPv4"}],"ports":[31338],"version":"2019-10-10T13:27:36.878Z","eventType":"status_update_event","timestamp":"2019-10-10T13:27:38.769Z"} data: {"instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","condition":"Running","runSpecId":"/demo/hello-world","agentId":"6b0d8829-4681-4638-bbe2-121d950e241e-S0","host":"10.141.141.10","runSpecVersion":"2019-10-10T13:27:36.878Z","timestamp":"2019-10-10T13:27:38.769Z","eventType":"instance_changed_event"} data: {"appId":"/demo/hello-world","instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","version":"2019-10-10T13:27:36.878Z","alive":true,"eventType":"health_status_changed_event","timestamp":"2019-10-10T13:27:41.919Z"} data: {"appId":"/demo/hello-world","instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","version":"2019-10-10T13:27:36.878Z","alive":true,"eventType":"health_status_changed_event","timestamp":"2019-10-10T13:27:41.929Z"} data: {"instanceId":"demo_hello-world.instance-b98f6bf3-eb61-11e9-af4c-02423f927891","runSpecId":"/demo/hello-world","healthy":true,"runSpecVersion":"2019-10-10T13:27:36.878Z","timestamp":"2019-10-10T13:27:41.929Z","eventType":"instance_health_changed_event"}

    And I see no instanceID that lacks the "instance-" prefix. I haven't found anything that resembles this problem and am not sure whether this is a marathon or a marathon-consul problem.

    The error is thrown by events/event_handler.go (line 142)

  • Documents on deployment with consul?

    Documents on deployment with consul?

    I am not familiar with consul. I thought I need to run a consul server along with marathon-consul in Mesos-master. And run consul-agent in each Mesos-agent ? I am a bit confused on the relationship between marathon-consul and consul-server, because there is no config about consul-server address...

  • USER network mode can't register to consul

    USER network mode can't register to consul

    I'm using USER mode network with calico and try to run mesos-consul but I see the logs:

    INFO[0218] Syncing services finished. Stats, registerd: 1 (failed: 0), deregister: 0 (failed: 0). but can't find the service on consul

    HOST network mode is ok

  • "consul" label naming case sensitivity

    Hi. It took me some time to figure out that "consul" label name was case sensitive. All other labels I use are uppercase, so this one stands out now. Why not make it case insensitive? Another suggestion regarding the naming is to make it more descriptive and specific. Perhaps something along the lines of "consul_custom_service_name" - long but descriptive, at least for me. Thanks

A service registry and service discovery implemention for kitex based on etcd

kitex etcd Introduction kitexetcd is an implemention of service registry and service discovery for kitex based on etcd. Installation go get -u github.

Feb 18, 2022
Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and deadline support. MIT Licensed.

socket Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and d

Dec 14, 2022
Jun 20, 2022
Envoy-eds-server - Envoy EDS server is a working Envoy Discovery Service implementation

envoy-eds-server Intro Envoy EDS server is a working Envoy Discovery Service imp

Apr 2, 2022
DNS service discovery library for Go

Discovery DNS service discovery library for Go Documentation see pkg.go.dev Installation

Mar 10, 2022
Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service.

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service. Program can take large input files.

Feb 6, 2022
Consul Load-Balancing made simple
Consul Load-Balancing made simple

Notes From release 1.5.15 onward, fabio changes the default GOGC from 800 back to the golang default of 100.

Dec 27, 2022
Consul Load-Balancing made simple
Consul Load-Balancing made simple

Notes From release 1.5.15 onward, fabio changes the default GOGC from 800 back to the golang default of 100. Apparently this made some sense back in t

Dec 31, 2022
golang consul tools

中文文档 consult A consul key/value tool for golang Usage install go get -u github.com/xxjwxc/consult@master New Config conf := consulkv.NewConfig() With

Mar 6, 2022
Check DNS and optionally Consul and serve the status from a Web page

dns-checker Table of contents Preamble Compiling the program Keepalived and LVS Available options Setting up systemd Preamble This application checks

Nov 7, 2021
Kong and Consul Lab For Golang

Kong and Consul Lab Prerequisites docker Deploy Consul Server docker run -d -p 8500:8500 -p 8600:8600/udp --name=consul-server consul agent -server -u

Nov 25, 2021
Consul K/V Store Implementation For Go
Consul K/V Store Implementation For Go

Consul K/V Store Implementation For Go Enables Consul to be used as a configuration source in go applications Dynamic Configuration with Consul's Key/

Jun 7, 2022
Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:
Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:

peerdiscovery Pure-go library for cross-platform thread-safe local peer discovery using UDP multicast. I needed to use peer discovery for croc and eve

Jan 8, 2023
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • License • Join Discord Subfinder is a subdomain discovery tool that

Jan 4, 2023
Libp2p chat with discovery and pubsub

Dicovery - pubsub chat with libp2p How to test Run boostrap node $ go run main/main.go --port 35005 --nick boot --pk XDLjuaVJ2yKQ2zHMmsee5PGHtDHmkkvFA

Jul 3, 2022
Data Availability Sampling (DAS) on a Discovery-v5 DHT overlay

Implementing Data Availability Sampling (DAS) There's a lot of history to unpack here. Vitalik posted about the "Endgame": where ethereum could be hea

Nov 12, 2022
CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.
CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.

CoreRAD CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed. To get started with

Nov 14, 2022
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites by using passive online sources
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites by using passive online sources

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Jan 1, 2023
webrpc is a schema-driven approach to writing backend services for modern Web apps and networks
webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

webrpc is a schema-driven approach to writing backend servers for the Web. Write your server's api interface in a schema format of RIDL or JSON, and t

Jan 7, 2023