2016-03-31 12 views
1

artifactoryをドッカーする画像を押したときに、私は次のエラーを取得する:
v1ステータス405 - ドッキングウィンドウ - artifactory

Error: Status 405 trying to push repository abc-docker-local: "{\n \"errors\" : [ {\n \"status\" : 405,\n \"message\" : \"Method Not Allowed\"\n } ]\n}" 

私はnginxのを使用しています。私はv1としてレポを設定Artifactoryで

server_name localserver; 
rewrite^remoteserver/artifactory/api/docker/abc-docker-local/v1 redirect; 
if ($http_x_forwarded_proto = '') { 
    set $http_x_forwarded_proto $scheme; 
} 

location/{ 
     proxy_read_timeout 900; 
     proxy_pass_header Server; 
     proxy_cookie_path ~*^/.* /; 
     proxy_pass   http://remoteserver:9081/artifactory/api/docker/abc-docker-local/v1; 
     proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host; 
     proxy_set_header X-Forwarded-Port $server_port; 
     proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; 
     proxy_set_header Host    $http_host; 
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
} 

:私の設定ファイルは次のようになります。私もv2でテストしましたが、エンドポイントは返されません。 v2の正確なエラーは次のとおりです。結果が空白の場合は、必要な設定のすべてを挿入していない必要があり、事前

+1

することができます使用しているArtifactoryとドッカーのクライアントのバージョンを指定しますか? – danf

+0

ドッキングウィンドウバージョン クライアント: バージョン:1.8.2-EL7 APIのバージョン:1.20 パッケージのバージョン:ドッキングウィンドウ-1.8.2-10.el7.x86_64 ゴーバージョン:go1.4.2 内蔵: OS /アーチ: Linux/AMD64 サーバー: バージョン:1.8.2-EL7 APIのバージョン:1.20 パッケージのバージョン: 囲碁バージョン:go1.4.2 内蔵: OS /アーチ:両方は、API V2を使用するように設定しているLinux/AMD64 Artifactoryフロントエンドディスプレイ:Artifactoryバージョン4.2.2を実行しています ありがとう! – sat

+1

両方のバージョンの最後のバージョンでは、APIに多くの変更がありました。ドッカー1.10とArtifactory 4.7で試すことができますか? – danf

答えて

0


Index response didn't contain any endpoints 

感謝 - ここに私のサンドボックスからの例です: reverse proxy config

これは、Artifactoryサンドボックスが私のマシンである間に、リモートUbuntuマシンにインストールされているDocker 1.10(ただし、Docker 1.8と1.9で動作します)で私が使用するArtifactoryが生成した設定です。

(certs\myCert.cert)一般的ではありません、私が持っている証明書の場所は、ので、あなたのSSL証明書は、私はそれぞれポート4441V1V2ため4442を使用していることもあり、どこにそれを変更します。

#user nobody; 
worker_processes 1; 

#error_log logs/error.log; 
#error_log logs/error.log notice; 
#error_log logs/error.log info; 

#pid  logs/nginx.pid; 


events { 
    worker_connections 1024; 
} 


http { 
    include  mime.types; 
    default_type application/octet-stream; 

    #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 
    #     '$status $body_bytes_sent "$http_referer" ' 
    #     '"$http_user_agent" "$http_x_forwarded_for"'; 

    #access_log logs/access.log main; 

    sendfile  on; 
    #tcp_nopush  on; 

    #keepalive_timeout 0; 
    keepalive_timeout 65; 

    #gzip on; 

    ## add ssl entries when https has been set in config 
    ssl_certificate  certs\myCert.cert; 
    ssl_certificate_key certs\myCert.cert; 
    ssl_session_cache shared:SSL:1m; 
    ssl_prefer_server_ciphers on; 
    ## server configuration 
    server { 
     listen 443 ssl; 
     listen 9091 ; 

     server_name localhost; 
     if ($http_x_forwarded_proto = '') { 
      set $http_x_forwarded_proto $scheme; 
     } 
     ## Application specific logs 
     ## access_log /var/log/nginx/localhost-access.log timing; 
     ## error_log /var/log/nginx/localhost-error.log; 
     rewrite ^/$ /artifactory/webapp/ redirect; 
     rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect; 
     location /artifactory/ { 
     proxy_read_timeout 900; 
     proxy_pass_header Server; 
     proxy_cookie_path ~*^/.* /; 
     proxy_pass   http://localhost:8080/artifactory/; 
     proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory; 
     proxy_set_header X-Forwarded-Port $server_port; 
     proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; 
     proxy_set_header Host    $http_host; 
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
     } 
    } 

    ## server configuration 
    server { 
     listen 4441 ssl; 


     server_name localhost; 
     if ($http_x_forwarded_proto = '') { 
      set $http_x_forwarded_proto $scheme; 
     } 
     ## Application specific logs 
     ## access_log /var/log/nginx/localhost-access.log timing; 
     ## error_log /var/log/nginx/localhost-error.log; 
     rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/docker-local-v1/$1/$2; 
     client_max_body_size 0; 
     chunked_transfer_encoding on; 
     location /artifactory/ { 
     proxy_read_timeout 900; 
     proxy_pass_header Server; 
     proxy_cookie_path ~*^/.* /; 
     proxy_pass   http://localhost:8080/artifactory/; 
     proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory; 
     proxy_set_header X-Forwarded-Port $server_port; 
     proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; 
     proxy_set_header Host    $http_host; 
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
     } 
    } 

    ## server configuration 
    server { 
     listen 4442 ssl; 


     server_name localhost; 
     if ($http_x_forwarded_proto = '') { 
      set $http_x_forwarded_proto $scheme; 
     } 
     ## Application specific logs 
     ## access_log /var/log/nginx/localhost-access.log timing; 
     ## error_log /var/log/nginx/localhost-error.log; 
     rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/docker-local-v2/$1/$2; 
     client_max_body_size 0; 
     chunked_transfer_encoding on; 
     location /artifactory/ { 
     proxy_read_timeout 900; 
     proxy_pass_header Server; 
     proxy_cookie_path ~*^/.* /; 
     proxy_pass   http://localhost:8080/artifactory/; 
     proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory; 
     proxy_set_header X-Forwarded-Port $server_port; 
     proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; 
     proxy_set_header Host    $http_host; 
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
     } 
    } 
} 
+0

の下のコメントに私の質問を続けたので、同じマシンにartifactoryとnginxを持っていますか? これとは対照的に、nginxとdockerを1つのマシンに持ち、別のマシンにアーティファクトを持っています – sat

+0

内部ポート8081、外部ポート8443、ポート80にバインドされたドッカーレジストリ、APIはv2です(v1は設定に表示されません)。ページ)私はこのエラーが表示されます: *************************************** ***************************************** "エラー:ステータス400試行中リポジトリをプッシュするためにTomcat: "{\ n \"エラー: "[{\ n" "ステータス\":400、\ n \ "メッセージ\":\ "サポートされていないドッカーv1リポジトリで ' }] \ n} " ****************************************** ****************************************** 再びドッカーとnginxは同じVM。artifactoryは別のVMにあります – sat

+0

ドッカー1.9.1にアップデートした後、私はこのスポンサー: "不明:方法が許可されていません" 完全版はdocker-1.9.1-25.el7.x86_64 – sat

関連する問題