首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过Jenkins的卷曲有时只起作用。

通过Jenkins的卷曲有时只起作用。
EN

Stack Overflow用户
提问于 2017-11-13 14:48:39
回答 1查看 754关注 0票数 0

我想在Jenkins管道中使用curl命令通过ftp上传一些文件。我使用的命令如下所示:

代码语言:javascript
复制
sh "curl --verbose -T my.file --proxytunnel --proxy http://${PROXY_USER}:${PROXY_PASS}@MYPROXY:MYPROXYPORT ftp://${AZURE_USER}:${AZURE_PASS}@MYSITE.ftp.azurewebsites.windows.net/site/wwwroot/"

有时,我在Jenkins中连续5次单击"Build"-button,所有5个构建都是成功的。然后,10分钟后,我再次单击build按钮,它连续5次失败--而不更改Jenkins作业中的任何内容!

因此,在我看来,有时会有某种会话缓存,有时则不会。但是我不知道哪种会话,因为我设置了{http|https|ftp|no}_proxyPROXY_USERAZURE_USER

以下是生成失败时的错误消息:

代码语言:javascript
复制
* About to connect() to proxy MYPROXY port 80 (#0)
*   Trying 1.2.3.4... connected
* Connected to MYPROXY (1.2.3.4) port 80 (#0)
* Establish HTTP proxy tunnel to MYSITE.ftp.azurewebsites.windows.net:21
* Proxy auth using Basic with user '****'
* Server auth using Basic with user 'MYUSER\****'
> CONNECT MYSITE.ftp.azurewebsites.windows.net:21 HTTP/1.1
> Host: MYSITE.ftp.azurewebsites.windows.net:21
> Proxy-Authorization: Basic xxx-xxx-xxx
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection Established
< Proxy-Agent: Zscaler/6.0
< 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Proxy replied OK to CONNECT request
< 220 Microsoft FTP Service
> USER MYUSER\****
< 331 Password required
> PASS ****
< 230 User logged in.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CWD site
< 250 CWD command successful.
> CWD wwwroot
< 250 CWD command successful.
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||10201|)
*   Trying 1.2.3.4... connected
* Connecting to MYSITE.ftp.azurewebsites.windows.net (1.2.3.4) port 80
* Establish HTTP proxy tunnel to MYSITE.ftp.azurewebsites.windows.net:10201
* Proxy auth using Basic with user '****'
* Server auth using Basic with user 'MYUSER\****'
> CONNECT MYSITE.ftp.azurewebsites.windows.net:10201 HTTP/1.1
> Host: MYSITE.ftp.azurewebsites.windows.net:10201
> Proxy-Authorization: Basic xxxxx
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection Established
< Proxy-Agent: Zscaler/6.0
< 

  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0* Proxy replied OK to CONNECT request
> TYPE I
< 200 Type set to I.
> STOR web.config
< 150 Opening BINARY mode data connection.
} [data not shown]

104   521    0     0  104   521      0    201  0:00:02  0:00:02 --:--:--   204* Remembering we are in dir "site/wwwroot/"

104   521    0     0  104   521      0    145  0:00:03  0:00:03 --:--:--   146
104   521    0     0  104   521      0    113  0:00:04  0:00:04 --:--:--   114
104   521    0     0  104   521      0     93  0:00:05  0:00:05 --:--:--    93
104   521    0     0  104   521      0     79  0:00:06  0:00:06 --:--:--   128
104   521    0     0  104   521      0     68  0:00:07  0:00:07 --:--:--     0
104   521    0     0  104   521      0     60  0:00:08  0:00:08 --:--:--     0
104   521    0     0  104   521      0     54  0:00:09  0:00:09 --:--:--     0
104   521    0     0  104   521      0     49  0:00:10  0:00:10 --:--:--     0
104   521    0     0  104   521      0     44  0:00:11  0:00:11 --:--:--     0
104   521    0     0  104   521      0     41  0:00:12  0:00:12 --:--:--     0
104   521    0     0  104   521      0     38  0:00:13  0:00:13 --:--:--     0
104   521    0     0  104   521      0     35  0:00:14  0:00:14 --:--:--     0
104   521    0     0  104   521      0     33  0:00:15  0:00:15 --:--:--     0
104   521    0     0  104   521      0     31  0:00:16  0:00:16 --:--:--     0
104   521    0     0  104   521      0     29  0:00:17  0:00:17 --:--:--     0
104   521    0     0  104   521      0     28  0:00:18  0:00:18 --:--:--     0
104   521    0     0  104   521      0     26  0:00:20  0:00:19  0:00:01     0
104   521    0     0  104   521      0     25  0:00:20  0:00:20 --:--:--     0
104   521    0     0  104   521      0     24  0:00:21  0:00:21 --:--:--     0
104   521    0     0  104   521      0     23  0:00:22  0:00:22 --:--:--     0
104   521    0     0  104   521      0     22  0:00:23  0:00:23 --:--:--     0
104   521    0     0  104   521      0     21  0:00:24  0:00:24 --:--:--     0
104   521    0     0  104   521      0     20  0:00:26  0:00:25  0:00:01     0
104   521    0     0  104   521      0     19  0:00:27  0:00:26  0:00:01     0
104   521    0     0  104   521      0     18  0:00:28  0:00:27  0:00:01     0
104   521    0     0  104   521      0     18  0:00:28  0:00:28 --:--:--     0
104   521    0     0  104   521      0     17  0:00:30  0:00:29  0:00:01     0
104   521    0     0  104   521      0     17  0:00:30  0:00:30 --:--:--     0
104   521    0     0  104   521      0     16  0:00:32  0:00:31  0:00:01     0
104   521    0     0  104   521      0     15  0:00:34  0:00:32  0:00:02     0
104   521    0     0  104   521      0     15  0:00:34  0:00:33  0:00:01     0
104   521    0     0  104   521      0     15  0:00:34  0:00:34 --:--:--     0
104   521    0     0  104   521      0     14  0:00:37  0:00:35  0:00:02     0
104   521    0     0  104   521      0     14  0:00:37  0:00:36  0:00:01     0
104   521    0     0  104   521      0     13  0:00:40  0:00:37  0:00:03     0
104   521    0     0  104   521      0     13  0:00:40  0:00:38  0:00:02     0
104   521    0     0  104   521      0     13  0:00:40  0:00:39  0:00:01     0
104   521    0     0  104   521      0     12  0:00:43  0:00:40  0:00:03     0< 425 Data channel timed out.
* server did not report OK, got 425

104   521    0     0  104   521      0     12  0:00:43  0:00:40  0:00:03     0* Connection #0 to host MYPROXY left intact

curl: (18) server did not report OK, got 425
> QUIT
< 221 Goodbye.
* Closing connection #0

你有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-11-15 08:30:58

解决方案是,我必须输入不同的代理服务器。正如我所了解到的,我的公司有不同的代理:一些用于“正常”用户,另一些用于服务器。服务器使用的代理不需要基本的auth。有了这个代理,它现在起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47267063

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档