2017-05-09 8 views
0

openstack에서 3 노드 떼를 실행했습니다. 동일한 오버레이 네트워크를 사용하여 실행중인 두 개의 도커 서비스가 있습니다. 하나는 Nexus 3 개인 저장소이고 다른 하나는 nginx 역방향 프록시입니다. nginx만이 노출 된 포트를 가지고 있습니다.504 도커 웜 오버레이 네트워크의 게이트웨이 백엔드에 대한 시간 초과

[email protected]:/# nslookup nexus   
Server:  127.0.0.11 
Address: 127.0.0.11#53 

Non-authoritative answer: 
Name: nexus 
Address: 10.0.0.6 

wget을 :

이 설정은 잘하지만 간헐적으로 나는 504 내가 Nginx에 컨테이너를 타고 ...

nslookup을 얻을 (아마도 액세스되지 않는 많은 시간 후) 작동

[email protected]:/# wget -O- nexus:8081 
--2017-05-09 23:23:18-- http://nexus:8081/ 
Resolving nexus (nexus)... 10.0.0.6 
Connecting to nexus (nexus)|10.0.0.6|:8081... failed: Connection timed out. 
Retrying. 

--2017-05-09 23:25:26-- (try: 2) http://nexus:8081/ 
Connecting to nexus (nexus)|10.0.0.6|:8081... ^C 
[email protected]:/# 

핑 :

[email protected]:/# ping nexus 
PING nexus (10.0.0.6): 56 data bytes 
64 bytes from 10.0.0.6: icmp_seq=0 ttl=64 time=0.077 ms 
64 bytes from 10.0.0.6: icmp_seq=1 ttl=64 time=0.098 ms 
64 bytes from 10.0.0.6: icmp_seq=2 ttl=64 time=0.054 ms 
64 bytes from 10.0.0.6: icmp_seq=3 ttl=64 time=0.071 ms 
^C--- nexus ping statistics --- 
4 packets transmitted, 4 packets received, 0% packet loss 
round-trip min/avg/max/stddev = 0.054/0.075/0.098/0.000 ms 
[email protected]:/# 

은 그래서 넥서스 컨테이너 주소를 찾을 수 있습니다.

bash-4.2$ curl -v http://nexus:8081/ 
* About to connect() to nexus port 8081 (#0) 
* Trying 10.0.0.6... 
* Connected to nexus (10.0.0.6) port 8081 (#0) 
> GET/HTTP/1.1 
> User-Agent: curl/7.29.0 
> Host: nexus:8081 
> Accept: */* 
> 
< HTTP/1.1 200 OK 
< Date: Tue, 09 May 2017 23:23:03 GMT 
< Server: Nexus/3.1.0-04 (OSS) 
< X-Frame-Options: SAMEORIGIN 
< X-Content-Type-Options: nosniff 
< Content-Type: text/html 
< Last-Modified: Tue, 09 May 2017 23:23:03 GMT 
< Pragma: no-cache 
< Cache-Control: post-check=0, pre-check=0 
< Expires: 0 
< Content-Length: 4659 
< 

<!DOCTYPE html> 
<html> 
<head> 
    <title>Nexus Repository Manager</title> 

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    <meta name="description" content="Nexus Repository Manager"/> 
    <meta http-equiv="X-UA-Compatible" content="IE=9"/> 


    <!--[if lt IE 9]> 
    <script>(new Image).src="http://nexus:8081/static/rapture/resources/favicon.ico?_v=3.1.0-04"</script> 
    <![endif]--> 
    <link rel="icon" type="image/png" href="http://nexus:8081/static/rapture/resources/favicon-32x32.png?_v=3.1.0-04" sizes="32x32"> 
    <link rel="mask-icon" href="http://nexus:8081/static/rapture/resources/safari-pinned-tab.svg?_v=3.1.0-04" color="#5bbad5"> 
    <link rel="icon" type="image/png" href="http://nexus:8081/static/rapture/resources/favicon-16x16.png?_v=3.1.0-04" sizes="16x16"> 
    <link rel="shortcut icon" href="http://nexus:8081/static/rapture/resources/favicon.ico?_v=3.1.0-04"> 
    <meta name="msapplication-TileImage" content="http://nexus:8081/static/rapture/resources/mstile-144x144.png?_v=3.1.0-04"> 
    <meta name="msapplication-TileColor" content="#00a300"> 



      <link rel="stylesheet" type="text/css" href="http://nexus:8081/static/rapture/resources/loading-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nexus:8081/static/rapture/resources/baseapp-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nexus:8081/static/rapture/resources/nexus-rapture-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nexus:8081/static/rapture/resources/nexus-proximanova-plugin-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nexus:8081/static/rapture/resources/nexus-coreui-plugin-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nexus:8081/static/rapture/resources/nexus-proui-plugin-prod.css?_v=3.1.0-04"> 

    <script type="text/javascript"> 
    function progressMessage(msg) { 
     if (console && console.log) { 
     console.log(msg); 
     } 
     document.getElementById('loading-msg').innerHTML=msg; 
    } 
    </script> 
    </head> 
<body class="x-border-box"> 

<div id="loading-mask"></div> 
<div id="loading"> 
    <div id="loading-background"> 
    <img id="loading-logo" src="http://nexus:8081/static/rapture/resources/images/loading-logo.png?_v=3.1.0-04"/> 
    <img id="loading-product" src="http://nexus:8081/static/rapture/resources/images/loading-product.png?_v=3.1.0-04"/> 
    <div class="loading-indicator"> 
     <img id="loading-spinner" src="http://nexus:8081/static/rapture/resources/images/loading-spinner.gif?_v=3.1.0-04"/> 
     <span id="loading-msg">Loading ...</span> 
    </div> 
    </div> 

    <div id="code-load" class="x-hide-display"> 

        <script type="text/javascript">progressMessage('Loading baseapp-prod.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/baseapp-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading extdirect-prod.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/extdirect-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading bootstrap.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/bootstrap.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading nexus-rapture-prod.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/nexus-rapture-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading nexus-coreui-plugin-prod.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/nexus-coreui-plugin-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading nexus-proui-plugin-prod.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/nexus-proui-plugin-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading app.js');</script> 
       <script type="text/javascript" src="http://nexus:8081/static/rapture/app.js?_v=3.1.0-04"></script> 

      <script type="text/javascript">progressMessage('Initializing ...');</script> 
    </div> 
</div> 

<form id="history-form" class="x-hide-display"> 
    <input type="hidden" id="x-history-field"/> 
    <iframe id="x-history-frame"></iframe> 
</form> 

</body> 
</html> 
* Connection #0 to host nexus left intact 
bash-4.2$ 
: 나는 저장소 URL에 액세스하지만 다른 곳에서, 나는 504 오류를 Ping 할 수 있지만 (떼의 다른 노드에서) 넥서스 용기 자체에 포트 8081

에 연결할 수 없습니다 여기

, 내가 Nginx에 컨테이너를 Ping 할 수 있습니다 :

bash-4.2$ ping nginx_nexus 
PING nginx_nexus (10.0.0.8) 56(84) bytes of data. 
64 bytes from 10.0.0.8 (10.0.0.8): icmp_seq=1 ttl=64 time=0.089 ms 
64 bytes from 10.0.0.8 (10.0.0.8): icmp_seq=2 ttl=64 time=0.066 ms 
64 bytes from 10.0.0.8 (10.0.0.8): icmp_seq=3 ttl=64 time=0.047 ms 
64 bytes from 10.0.0.8 (10.0.0.8): icmp_seq=4 ttl=64 time=0.076 ms 
^C 
--- nginx_nexus ping statistics --- 
4 packets transmitted, 4 received, 0% packet loss, time 2999ms 
rtt min/avg/max/mdev = 0.047/0.069/0.089/0.017 ms 
bash-4.2$ 

참고 : 나는 nginx를 통해 넥서스에 액세스하려고 할 때 지금까지, 나는 "504 게이트웨이 시간 초과"를 얻을 외부의 관점에서 리버스 프록시. 그러나 넥서스 컨테이너에서 다음 명령을 실행하면 오류가 사라집니다.

bash-4.2$ curl -v nginx_nexus 
* About to connect() to nginx_nexus port 80 (#0) 
* Trying 10.0.0.8... 
* Connected to nginx_nexus (10.0.0.8) port 80 (#0) 
> GET/HTTP/1.1 
> User-Agent: curl/7.29.0 
> Host: nginx_nexus 
> Accept: */* 
> 
< HTTP/1.1 200 OK 
< Server: nginx/1.13.0 
< Date: Tue, 09 May 2017 23:33:44 GMT 
< Content-Type: text/html 
< Content-Length: 4681 
< Connection: keep-alive 
< Keep-Alive: timeout=5 
< X-Frame-Options: SAMEORIGIN 
< X-Content-Type-Options: nosniff 
< Last-Modified: Tue, 09 May 2017 23:33:44 GMT 
< Pragma: no-cache 
< Cache-Control: post-check=0, pre-check=0 
< Expires: 0 
< 

<!DOCTYPE html> 
<html> 
<head> 
    <title>Nexus Repository Manager</title> 

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    <meta name="description" content="Nexus Repository Manager"/> 
    <meta http-equiv="X-UA-Compatible" content="IE=9"/> 


    <!--[if lt IE 9]> 
    <script>(new Image).src="http://nginx_nexus/static/rapture/resources/favicon.ico?_v=3.1.0-04"</script> 
    <![endif]--> 
    <link rel="icon" type="image/png" href="http://nginx_nexus/static/rapture/resources/favicon-32x32.png?_v=3.1.0-04" sizes="32x32"> 
    <link rel="mask-icon" href="http://nginx_nexus/static/rapture/resources/safari-pinned-tab.svg?_v=3.1.0-04" color="#5bbad5"> 
    <link rel="icon" type="image/png" href="http://nginx_nexus/static/rapture/resources/favicon-16x16.png?_v=3.1.0-04" sizes="16x16"> 
    <link rel="shortcut icon" href="http://nginx_nexus/static/rapture/resources/favicon.ico?_v=3.1.0-04"> 
    <meta name="msapplication-TileImage" content="http://nginx_nexus/static/rapture/resources/mstile-144x144.png?_v=3.1.0-04"> 
    <meta name="msapplication-TileColor" content="#00a300"> 



      <link rel="stylesheet" type="text/css" href="http://nginx_nexus/static/rapture/resources/loading-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nginx_nexus/static/rapture/resources/baseapp-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nginx_nexus/static/rapture/resources/nexus-rapture-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nginx_nexus/static/rapture/resources/nexus-proximanova-plugin-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nginx_nexus/static/rapture/resources/nexus-coreui-plugin-prod.css?_v=3.1.0-04"> 
      <link rel="stylesheet" type="text/css" href="http://nginx_nexus/static/rapture/resources/nexus-proui-plugin-prod.css?_v=3.1.0-04"> 

    <script type="text/javascript"> 
    function progressMessage(msg) { 
     if (console && console.log) { 
     console.log(msg); 
     } 
     document.getElementById('loading-msg').innerHTML=msg; 
    } 
    </script> 
    </head> 
<body class="x-border-box"> 

<div id="loading-mask"></div> 
<div id="loading"> 
    <div id="loading-background"> 
    <img id="loading-logo" src="http://nginx_nexus/static/rapture/resources/images/loading-logo.png?_v=3.1.0-04"/> 
    <img id="loading-product" src="http://nginx_nexus/static/rapture/resources/images/loading-product.png?_v=3.1.0-04"/> 
    <div class="loading-indicator"> 
     <img id="loading-spinner" src="http://nginx_nexus/static/rapture/resources/images/loading-spinner.gif?_v=3.1.0-04"/> 
     <span id="loading-msg">Loading ...</span> 
    </div> 
    </div> 

    <div id="code-load" class="x-hide-display"> 

        <script type="text/javascript">progressMessage('Loading baseapp-prod.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/baseapp-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading extdirect-prod.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/extdirect-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading bootstrap.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/bootstrap.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading nexus-rapture-prod.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/nexus-rapture-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading nexus-coreui-plugin-prod.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/nexus-coreui-plugin-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading nexus-proui-plugin-prod.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/nexus-proui-plugin-prod.js?_v=3.1.0-04"></script> 
        <script type="text/javascript">progressMessage('Loading app.js');</script> 
       <script type="text/javascript" src="http://nginx_nexus/static/rapture/app.js?_v=3.1.0-04"></script> 

      <script type="text/javascript">progressMessage('Initializing ...');</script> 
    </div> 
</div> 

<form id="history-form" class="x-hide-display"> 
    <input type="hidden" id="x-history-field"/> 
    <iframe id="x-history-frame"></iframe> 
</form> 

</body> 
</html> 
* Connection #0 to host nginx_nexus left intact 
bash-4.2$ 

이것은 간헐적으로 발생합니다. 몇 시간 후에 저장소를 사용하지 않으면 "504 Gateway Time-out"을 다시 발견하고 해결하기 위해 swarm 노드와 nexus 컨테이너에 로그인하고 다시 말려 야합니다. 504 오류에 대한 해결책을 찾도록 도와주세요. 컨테이너가 동일한 호스트에서 실행 중이며 오버레이 네트워크가 사용되지 않은 경우이 문제는 존재하지 않습니다.

+0

이 문제를 해결할 수있는 해결책이 있습니까? – simdrouin

+0

오픈 스택 업그레이드로 문제가 사라졌습니다. 더 이상 버전 정보 나 설정 정보가 없어서 더 자세한 정보를 제공 할 수 없습니다. – Anu

답변

0

오픈 스택 업그레이드로 문제가 사라졌습니다. 더 이상 버전 정보 나 설정 정보가 없어서 더 자세한 정보를 제공 할 수 없습니다.