我正在尝试使用端口映射运行 sonarqube docker 容器,以在 9050 而不是默认的 9000 上公开 ui。此命令运行良好:
docker run -d --name sonarqube -p 9050:9000 -p 9092:9092 sonarqube
但是通过马拉松发生了以下错误:
2016.05.23 12:12:40 错误 web[oaccC[.[.[/]] 向类 org.sonar.server.platform.PlatformServletContextListener org.elasticsearch.client.transport.NoNodeAvailableException 的侦听器实例发送上下文初始化事件的异常:无配置的节点可用:[] at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:305) ~[elasticsearch-1.7.5.jar:na]
{
"id": "/sonarqube",
"cmd": null,
"cpus": 1,
"mem": 500,
"disk": 800,
"instances": 0,
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "sonarqube",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 9000,
"hostPort": 9050,
"servicePort": 10105,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 9092,
"hostPort": 9092,
"servicePort": 10106,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 9001,
"hostPort": 9051,
"servicePort": 10107,
"protocol": "tcp",
"labels": {}
}
],
"privileged": false,
"parameters": [],
"forcePullImage": false
}
},
"portDefinitions": [
{
"port": 10105,
"protocol": "tcp",
"labels": {}
},
{
"port": 10106,
"protocol": "tcp",
"labels": {}
},
{
"port": 10107,
"protocol": "tcp",
"labels": {}
}
]
}