linux - Jenkins API 不工作 - "Empty reply from server"

标签 linux jenkins continuous-integration hudson continuous-deployment

我正在尝试在本地主机上使用 jenkins api,但 jenkins 服务器正在发送“来自服务器的空回复”。知道出了什么问题吗?

curl http://localhost:8080/job/test/lastBuild/api/json?token=testing  -v

* About to connect() to localhost port 8080 (#0)
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /job/test/lastBuild/api/json?token=testing HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0 zlib/1.2.5     libidn/1.18 libssh2/1.2.2
> Host: localhost:8080
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
* Closing connection #0

最佳答案

我找到了原因,httpport 设置为“-1”,因为 jenkins 发送了一个空回复。

之前 -

JENKINS_ARGS="--httpPort=-1"

之后 -

JENKINS_ARGS="--httpPort=65530"

关于linux - Jenkins API 不工作 - "Empty reply from server",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24645357/

相关文章:

c - 使用 seq_file 构建 Linux/proc 文件驱动程序

jenkins - 使用Gradle的Artifactory Jenkins集成

linux - 我无法使用公钥和私钥从Jenkins节点SSH到远程服务器

shell - 使用 Jenkins 通过 SSH 连接到 EC2 Ubuntu 实例并运行 shell 脚本

.net - 与 .Net 和 Mono、Linux 和 Windows 的持续集成

Selenium 试验机

c++ - Vikit_common - 安装失败 - Raspberry Pi 2 B

linux - Internet Explorer 应用程序兼容性 VPC 图像 sha256sums

c - 如何在Linux中使用C检测系统是否要待机

php - 帮助我改进我的持续部署工作流程