Details

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

      Description

      Hello,

      I try to deploy a galera cluster with marathon on two VM (mysql1 : ip 192.168.33.101, mysql2 : ip 192.168.33.102). I need to expose docker container port on the docker host. Everything is working fine when launching containers with command line with -p 3306:3306 -p 4567:4567 but I don't manage to start it with marathon.

      Mesos : 0.21.1
      Marathon : 0.8.1

      I have a galera.json file (full content here : http://sttts.github.io/galera/mesos/2015/03/04/galera-on-mesos.html) to first launch a seed on mysql1. Once the seed is deployed and running, I can scale the number of nodes to join the cluster (I added a constraint to have only one node per machine so the first node will be deployed to mysql2).

      For both seed and node, I have the following settings :

      "docker": {
          "image": "trompx/mariadb:v1",
          "privileged": true,
          "network": "BRIDGE",
          "portMappings": [
              { "containerPort": 3306, "hostPort": 0, "protocol": "tcp" },
              { "containerPort": 8080, "hostPort": 0, "protocol": "tcp" }
          ]
      },
      

      I get with docker ps

      a336c860495b        trompx/mariadb:v1     "/start seed"          6 seconds ago       Up 5 seconds        4444/tcp, 4567/tcp, 4568/tcp, 0.0.0.0:31000->3306/tcp, 0.0.0.0:31001->8080/tcp   mesos-be605bee-1a58-45b7-9e5c-fc2a25afb87a
      

      "nmap -sT -p 3306,4567 192.168.33.101" gives:

      Starting Nmap 6.40 ( http://nmap.org ) at 2015-06-01 12:15 UTC
      Nmap scan report for mysql1 (192.168.33.101)
      Host is up (0.000039s latency).
      PORT     STATE  SERVICE
      3306/tcp closed mysql
      4567/tcp closed tram
      

      The seed healthcheck passes, but then when I try to scale the number of nodes (on mysql2), I get a "WSREP: wsrep::connect() failed: 7" error. The node cannot join the seed.

      So I tried to force the host port like :

      "docker": {
          "image": "trompx/mariadb:v1",
          "privileged": true,
          "network": "BRIDGE",
          "portMappings": [
              { "containerPort": 3306, "hostPort": 3306, "protocol": "tcp" },
              { "containerPort": 4567, "hostPort": 4567, "protocol": "tcp" },
              { "containerPort": 8080, "hostPort": 0, "protocol": "tcp" }
          ]
      },
      

      but then the seed container is not even deploying, it just stays on 0/1 with "deploying" status.

      I tried the following too as suggested here https://github.com/mesosphere/marathon/issues/751 :

      "docker": {
          "image": "trompx/mariadb:v1",
          "privileged": true,
          "network": "BRIDGE",
              "parameters": [
                     {"key":"publish", "value": "3306:3306"},
                     {"key":"publish", "value": "4567:4567"},
          ]
      },
      

      but I get

      HTTP ERROR: 500
      Problem accessing /v2/groups/. Reason:  
      Server Error
      Powered by Jetty://
      

      Any idea on why the container is not being deployed when setting the hostPath ? Or how I could just do the equivalent of -p 3306:3306 -p 4567:4567 in marathon ?

      Here someone is trying with args but without success : https://groups.google.com/forum/#!msg/marathon-framework/gS3KEFsXIGE/HJCLH_8_KxUJ

      Thank you

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: