2017-09-17 3 views
0

私はdcosを稼働しています。私はサービスを作りました。私はip:portを使ってアクセスすることができました。しかし、私がマラソン-lbで同じことをしようとすると、私はそれに到達できません。私はカールを試しましたhttp://marathon-lb.marathon.mesos:10000/ 10000はポート番号ですが、私はまだ接続が拒否されます。ここでDCOS接続がマラソン-lbで拒否されました

は、サービスのための私のJSONです:

{ 


"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": {} 
    } 
    ] 
} 

誰でも助けることができます。

答えて

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

感謝をalot js84、これは実際に問題を解決するのに役立ちました。説明してくれてありがとう。 – ChrisDave

関連する問題