Artifactory Curl -X PUT 大文件 - 502 Bad Gateway 代理服务器收到来自上游服务器的无效响应/403 Bad props auth token [英] Artifactory Curl -X PUT large file - 502 Bad Gateway The proxy server received an invalid response from an upstream server / 403 Bad props auth token

查看:106
本文介绍了Artifactory Curl -X PUT 大文件 - 502 Bad Gateway 代理服务器收到来自上游服务器的无效响应/403 Bad props auth token的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Artifactory 版本:EnterpriseX 许可证 7.15.3 rev 71503900

Artifactory version: EnterpriseX license 7.15.3 rev 71503900

我对目标存储库具有管理员级别的访问权限.我正在尝试上传一个接近 10GB 长(气隙 .tgz)文件的工件.我收到以下错误.

I have admin level access on the target repository. I'm trying to upload an artifact which is close to 10GB long (air-gapped .tgz) file. I'm getting the following error.

当我尝试使用 Artifactory UI 上传文件(单击目标存储库上的部署"按钮)时,它会将我踢回登录屏幕,而上传显示 100% 完成,但用于将工件部署为的复选框/选项";捆绑神器"或根据用户定义的布局";未显示,该弹出窗口底部的部署"按钮也呈灰色.

When I try to upload the file using Artifactory UI (clicking Deploy button on the target repo), It kicks me out back to login screen, while the upload says 100% complete but check-box/options for deploying artifact as "bundle artifact" or as per user defined "Layout" is not showing up, Deploy button at the bottom of that pop-up window is also grayed out.

按照此处的文档尝试使用访问密钥卷曲:https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API 但它在很长一段时间(12-13 小时以上)后给我一个关于 502 Bad Gateway 的错误消息强>.

Tried curl using Access Key as per documentation here: https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API but it gives me an error mesg after a very long time (12-13+ hours) about 502 Bad Gateway.

我还尝试使用 -x "" 选项绕过代理或使用 no_proxy="10.20.30.40" 作为相同命令的前缀.curl .... 但得到同样的错误.试过 -u user:pass,给出同样的错误.Artifactory 设置/数据库配置已更改,以允许在超时前分配更多连接和更长的时间,但仍然出现相同的错误.

I also tried using -x "" option to bypass proxy or prefixed the same command with no_proxy="10.20.30.40" curl .... but getting the same error. Tried -u user:pass, gives same error. Artifactory settings/DB configuration has been changed to allow for more connections and longer time allotted before timeout but still getting the same error.

PS:请注意,第 2 行中的 0 低于 258M,即We are fullly Uploaded and fine 下的行告诉我,没有上传任何内容.

PS: Notice that 0 under 258M in the 2nd line, i.e. line under We are completely uploaded and fine that tells me, nothing is getting uploaded.

<代码> $卷曲-H英寸×-JFrog-艺术API:akfljkljkALDJALKDALKJDALKDJLASJDLAKDJALKDJALKDJALKDJALKDJALJKDLKAJFLANCMNLLgoEjcfZ-c7v58FmyaAUsJ8c0gFV6VVHp2WpvYbU7IftRyzirHEmsGJ3MRL0eZqCkyZYI_pkrcgXb3H2QcQ6RxDpbY2UYgX5AKQlrLhtb644wlBtK1VelsJ90d-6TPrr59ss-igGDhS-HUpSMAYMBl9cXQtT5hAR8Q"-X PUThttps://artifactory.company.com/artifactory/AlphaPipeline-PRJ-ProjectABCPipeline-Production-Local/Pipeline-release-3.0.0.tgz"-T Pipeline-release-3.0.0.tgz -v% Total % Received % Xferd Average Speed Time Time Time Current下载上传总花费的剩余速度0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* 正在尝试 10.20.30.40...* TCP_NODELAY 设置* 连接到 artifactory.company.com (10.20.30.40) 端口 443 (#0)* ALPN,提供 h2* ALPN,提供http/1.1* 密码选择:ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH* 成功设置证书验证位置:* CA文件:C:/tools/installed/Git/mingw64/ssl/certs/ca-bundle.crtCApath:无* TLSv1.2 (OUT)、TLS 标头、证书状态 (22):} [5 字节数据]* TLSv1.2 (OUT), TLS 握手, 客户端问候 (1):} [512 字节数据]* TLSv1.2 (IN)、TLS 握手、服务器问候 (2):{ [76 字节数据]* TLSv1.2 (IN)、TLS 握手、证书 (11):{ [4146 字节数据]* TLSv1.2 (IN)、TLS 握手、服务器密钥交换 (12):{ [333 字节数据]* TLSv1.2 (IN), TLS 握手, 服务器完成 (14):{ [4 字节数据]* TLSv1.2 (OUT)、TLS 握手、客户端密钥交换 (16):} [70 字节数据]* TLSv1.2 (OUT), TLS 更改密码, Client hello (1):} [1 字节数据]* TLSv1.2 (OUT),TLS 握手,完成 (20):} [16 字节数据]* TLSv1.2 (IN)、TLS 更改密码、客户端问候 (1):{ [1 字节数据]* TLSv1.2 (IN),TLS 握手,完成 (20):{ [16 字节数据]* SSL 连接使用 TLSv1.2/ABCDE-RSA-AES256-GCM-SHA384* ALPN,服务器接受使用 http/1.1* 服务器证书:* 主题:C=US;ST=丹佛;L=百年;O=Spotair 技术;CN=artifactory.company.com* 开始日期:格林威治标准时间 2021 年 2 月 24 日 20:54:47* 到期日期:2022 年 2 月 24 日 20:54:46 GMT* subjectAltName:主机artifactory.company.com";匹配证书的artifactory.company.com"* 发行人:C=US;O=Entrust, Inc.;OU=参见 www.entrust.net/legal-terms;OU=(c) 2012 Entrust, Inc. - 仅供授权使用;CN=委托证书颁发机构-L1K* SSL 证书验证正常.} [5 字节数据]>PUT/artifactory/AlphaPipeline-PRJ-ProjectABCPipeline-Production-Local/Pipeline-release-3.0.0.tgz HTTP/1.1>主办:artifactory.company.com>用户代理:curl/7.60.0>接受: */*>X-JFrog-艺术API:akfljkljkALDJALKDALKJDALKDJLASJDLAKDJALKDJALKDJALKDJALKDJALJKDLKAJFLANCMNLLgoEjcfZ-c7v58FmyaAUsJ8c0gFV6VVHp2WpvYbU7IftRyzirHEmsGJ3MRL0eZqCkyZYI_pkrcgXb3H2QcQ6RxDpbY2UYgX5AKQlrLhtb644wlBtK1VelsJ90d-6TPrr59ss-igGDhS-HUpSMAYMBl9cXQtT5hAR8Q>内容长度:11629208547>期望:100-继续>{ [5 字节数据]<HTTP/1.1 100 继续} [5 字节数据]99 10.8G 0 0 99 10.7G 0 357M 0:00:31 0:00:30 0:00:01 258M* 我们完全上传好了100 10.8G 0 0 100 10.8G 0 239k 13:11:33 13:11:33 --:--:-- 0{ [5 字节数据]<HTTP/1.1 502 错误网关<日期:格林威治标准时间 2021 年 7 月 7 日星期三 18:55:33<服务器:Apache/2.4.46 (Unix) OpenSSL/1.1.1k<内容长度:232<内容类型:文本/html;字符集=iso-8859-1<{ [232 字节数据]100 10.8G 0 232 100 10.8G 0 239k 13:11:33 13:11:33 --:--:-- 54<!DOCTYPE HTML PUBLIC "-//IETF//DPRJ HTML 2.0//EN>;<html><head><title>502 Bad Gateway</title></head><body><h1>坏网关</h1><p>代理服务器收到一个无效的来自上游服务器的响应.
</p></body></html>* 与主机 artifactory.company.com 的连接 #0 完好无损

另一个奇怪/烦人的事情:如果我在一个小文件(比如几个 KB)上使用相同的 API 访问密钥,那么我会立即遇到以下 403 Bad props auth token 错误.如果我传递另一个文件(ex: > 2MB)而不更改命令中的任何内容,则会出现上述 502 Bad Gateway 错误.

Another odd/annoying thing: If I use the same API Access Key on a small file (like few KBs) then I instantly hit the following 403 Bad props auth token error. If I pass another file (ex: > 2MB) without changing anything in the command, it gives me the above 502 Bad Gateway error.

{ [824 bytes data]
100  2576  100   824  100  1752    675   1437  0:00:01  0:00:01 --:--:--  2113{
  "errors" : [ {
    "status" : 403,
    "message" : "Bad props auth token: apiKey=my_long_apiAccessKeyHere."
  } ]
}

PS:使用 Artifactory GUI 上传文件时的相关帖子.Artifactory - 无法上传或查看 DEPLOY 按钮突出显示 - 无法上传工件 .tar .tgz

PS: Related post when using Artifactory GUI to upload the file. Artifactory - Can't upload or see DEPLOY button getting highlighted - can't upload artifact .tar .tgz

推荐答案

需要注意的一点是正在使用的 API 密钥,我在标题中看到了这一点,

One thing to notice is the API key being used, I see this in the header,

英寸×-JFrog-艺术API:akfljkljkALDJALKDALKJDALKDJLASJDLAKDJALKDJALKDJALKDJALKDJALJKDLKAJFLANCMNLLgoEjcfZ-c7v58FmyaAUsJ8c0gFV6VVHp2WpvYbU7IftRyzirHEmsGJ3MRL0eZqCkyZYI_pkrcgXb3H2QcQ6RxDpbY2UYgX5AKQlrLhtb644wlBtK1VelsJ90d-6TPrr59ss-igGDhS-HUpSMAYMBl9cXQtT5hAR8Q"

"X-JFrog-Art-Api:akfljkljkALDJALKDALKJDALKDJLASJDLAKDJALKDJALKDJALKDJALKDJALJKDLKAJFLANCMNLLgoEjcfZ-c7v58FmyaAUsJ8c0gFV6VVHp2WpvYbU7IftRyzirHEmsGJ3MRL0eZqCkyZYI_pkrcgXb3H2QcQ6RxDpbY2UYgX5AKQlrLhtb644wlBtK1VelsJ90d-6TPrr59ss-igGDhS-HUpSMAYMBl9cXQtT5hAR8Q"

您从何处生成 API 密钥?作为测试,您可以将凭据用作 -u :.此外,从配置文件页面生成 API 密钥并在标题中使用它.

From where did you generated the API key? As a test, can you use the credentials as -u :. Also, generate the API key from the profile page and use that in the header.

这篇关于Artifactory Curl -X PUT 大文件 - 502 Bad Gateway 代理服务器收到来自上游服务器的无效响应/403 Bad props auth token的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆