【问题标题】:appId: error.pattern when create application in MarathonappId: error.pattern 在 Marathon 中创建应用程序时
【发布时间】:2020-10-21 03:10:45
【问题描述】:

我正在尝试使用 Web 控制台在 Marathon 中创建应用程序。这是 JSON 文件:

{
    "id": "TestSpringApplication",
    "cmd": "/usr/bin/java -jar -Dspring.profiles.active=test /spring-boot-rest-example-0.5.0.war",
    "cpus": 1,
    "mem": 32.0,
    "networks": [ { "mode": "container/bridge" } ],
    "container": {
      "type": "DOCKER",
      "docker": {
        "image": "openjdk:8-jre-alpine"
      },
      "portMappings": [
        { "containerPort": 8090, "hostPort": 8090 }, {"containerPort": 8091, "hostPort": 8091 }],
      "volumes" : [
          {
          "containerPath": "/",
          "mode": "RW",
          "hostPath": "/root/spring-boot-rest-example/target"
          }
        ]
    }
}

但是当我把它放在盒子里时,却出现了这个错误:

你的配置有问题

appId:error.pattern

有人遇到过这个问题吗?我搜索了很多文档,但没有找到任何有用的东西

【问题讨论】:

    标签: docker containers mesos marathon mesosphere


    【解决方案1】:

    AppID(又名PathID 必须满足特定条件

    由一系列以斜线分隔的名称组成的 pod 的唯一标识符。 每个名称必须至少包含 1 个字符,并且只能包含数字 (0-9)、短划线 (-)、点 (.) 和小写字母 (a-z)。名称可能没有开始

    并匹配

    ^(\/?((\.\.)|(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9]))?($|\/))+$
    

    https://github.com/mesosphere/marathon/blob/7523b83799cd4ac0d3ce7ce0392edf77fd84e418/docs/docs/rest-api/public/api/v2/types/stringTypes.raml#L23-L31

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多