将bundle加载到ConductR沙箱时解析异常(Windows)

时间:2016-11-04 11:01:28

标签: lagom

我正在尝试在Lightbend ConductR沙箱上部署一个lagom微服务,但是当我尝试加载该捆绑包时,它会抛出异常(与配置解析相关)。 这个步骤在具有相同项目的Ubuntu机器上运行良好。

以下是错误消息

Loading bundle to ConductR...
←[91m←[4mError←[0m: 400 Bad Request
←[91m←[4mError←[0m: Can't load bundle because malformed bundle conf is supplied.
com.typesafe.config.ConfigException$Parse: String: 14: List should have ] or a first element after the open [, instead had token: 'h' (backslash followed by 'h', this is not a valid escape sequence (quoted strings use JSON escaping, so usedouble-backslash \\ for literal backslash)) (if you want 'h' (backslash followed by 'h', this is not a valid escape sequence (quoted strings use JSON escaping, so use double-backslash \\ for literal backslash)) to be part of a string value, then double-quote it)

bundle.conf包含以下内容:

version              = "1"
name                 = "helloworld-impl"
compatibilityVersion = "1"
system               = "helloworld-impl"
systemVersion        = "1"
nrOfCpus             = 0.1
memory               = 402653184
diskSpace            = 200000000
roles                = ["web"]
components = {
  helloworld-impl = {
    description      = "helloworld-impl"
    file-system-type = "universal"
    start-command    = ["helloworld-impl\bin\helloworld-impl", "-J-Xms134217728", "-J-Xmx134217728", "-Dhttp.address=$HELLOSERVICE_BIND_IP", "-Dhttp.port=$HELLOSERVICE_BIND_PORT", "-Dplay.crypto.secret=68656c6c6f776f726c642d696d706c"]
    endpoints = {
      "helloservice" = {
        bind-protocol = "http"
        bind-port     = 0
        services      = ["http://:9000/helloservice", "http://:9000/api/hello?preservePath"]
      },
      "akka-remote" = {
        bind-protocol = "tcp"
        bind-port     = 0
        services      = []
      }
    }
  }
}

机器配置:

OS: Windows 7 Enterprise
Docker Toolbox installed
Python version: 3.6.0b2

1 个答案:

答案 0 :(得分:0)

错误消息告诉您错误:

  

<Customers> <Customer> <TotalPurchase>188.93</TotalPurchase> </Customer> <Customer> <TotalPurchase>2064.9</TotalPurchase> </Customer> </Customers>

问题在于值backslash followed by 'h', this is not a valid escape sequence (quoted strings use JSON escaping, so use double-backslash \\ for literal backslash)

这应该使用正斜杠,例如helloworld-impl\bin\helloworld-impl

相关问题