2017-09-17 3 views
0

나는 dcos를 운영합니다. 서비스를 만들었고 ip : port를 통해 액세스 할 수 있지만 마라톤 -lb와 동일한 작업을 수행하려고하면 도달 할 수 없습니다. 나는 꼬투리를 시도했습니다 http://marathon-lb.marathon.mesos:10000/ 10000은 포트 번호입니다. 여전히 연결이 거부됩니다.DCOS 연결이 마라톤 -lb에서 거부되었습니다.

{ 


"id": "/nginx-external", 
    "cmd": null, 
    "cpus": 0.1, 
    "mem": 65, 
    "disk": 0, 
    "instances": 1, 
    "acceptedResourceRoles": [], 
    "container": { 
    "type": "DOCKER", 
    "volumes": [], 
    "docker": { 
     "image": "nginx:1.7.7", 
     "network": "BRIDGE", 
     "portMappings": [ 
     { 
      "containerPort": 80, 
      "hostPort": 2000, 
      "servicePort": 10000, 
      "protocol": "tcp", 
      "labels": {} 
     } 
     ], 
     "privileged": false, 
     "parameters": [], 
     "forcePullImage": true 
    } 
    }, 
    "healthChecks": [ 
    { 
     "gracePeriodSeconds": 10, 
     "intervalSeconds": 2, 
     "timeoutSeconds": 10, 
     "maxConsecutiveFailures": 10, 
     "portIndex": 0, 
     "path": "/", 
     "protocol": "HTTP", 
     "ignoreHttp1xx": false 
    } 
    ], 
    "labels": { 
    "HAPROXY_GROUP": "external" 
    }, 
    "portDefinitions": [ 
    { 
     "port": 10000, 
     "protocol": "tcp", 
     "name": "default", 
     "labels": {} 
    } 
    ] 
} 

수있는 사람의 도움 :

여기에 서비스에 대한 내 JSON이다.

답변

1

public-ip:10000 (공개 IP 찾기에 대해서는 here 참조) 및 을 사용하는 클러스터 내부에서 모두 클러스터 외부에서 액세스합니다. 참고로 marathon-lb를 설치 (dcos package install marathon-lb)해야하고 marathon-lb.marathon.mesos은 클러스터 내부에서만 해결할 수 있습니다. 디버그 마라톤 파운드 문제에 대한 위해

내가 ususally 먼저 haproxy 통계 확인 : 클러스터 내에서 클러스터 external access

외부에서 https://dcos.io/docs/1.9/networking/marathon-lb/marathon-lb-advanced-tutorial/#deploy-an-external-load-balancer-with-marathon-lb

[email protected] ~ $ curl http://marathon-lb.marathon.mesos:10000/ 
<!DOCTYPE html> 
<html> 
<head> 
<title>Welcome to nginx!</title> 
<style> 
    body { 
     width: 35em; 
     margin: 0 auto; 
     font-family: Tahoma, Verdana, Arial, sans-serif; 
    } 
</style> 
</head> 
<body> 
<h1>Welcome to nginx!</h1> 
<p>If you see this page, the nginx web server is successfully installed and 
working. Further configuration is required.</p> 

<p>For online documentation and support please refer to 
<a href="http://nginx.org/">nginx.org</a>.<br/> 
Commercial support is available at 
<a href="http://nginx.com/">nginx.com</a>.</p> 

<p><em>Thank you for using nginx.</em></p> 
</body> 
</html> 
+0

감사합니다 많이 js84,이 실제로 문제를 해결하는 데 도움이. 설명해 주셔서 감사드립니다. – ChrisDave

관련 문제