我在我的Red Hat Enterprise 6.3上安装了Jenkins。 jenkins通过侦听端口public void paintComponent(Graphics g) {
initgr();
showGrid(g);
if(ready) {
drawLine(g, (int) points.get(points.size() - 2).getX(), (int) points.get(points.size() - 2).getY(), (int) points.get(points.size() - 1).getX(), (int) points.get(points.size() - 1).getY());
}
}
来运行。
8080
但是,我无法通过网络浏览器或cURL连接到Jenkins。 HTTP连接的TCP连接是" ESTABLIASHED",但HTTP GET请求永远等待,Web浏览器继续加载。
[root@linux]# service jenkins status
jenkins (pid 7526) is running...
JENKINS_PORT="8080"
JENKINS_LISTEN_ADDRESS="0.0.0.0"
nmap扫描也很好看:
[root@linux]# netstat -an | grep 8080
tcp 0 0 :::8080 :::* LISTEN
tcp 0 0 ::ffff:172.22.146.9:8080 ::ffff:171.70.233.226:58029 ESTABLISHED
tcp 1 0 ::ffff:172.22.146.9:8080 ::ffff:171.70.233.226:58045 CLOSE_WAIT
tcp 1 0 ::ffff:172.22.146.9:8080 ::ffff:171.70.233.226:58103 CLOSE_WAIT
tcp 0 0 ::ffff:172.22.146.9:8080 ::ffff:171.70.233.226:58112 ESTABLISHED
mylaptop$ ping 172.22.146.9
PING 172.22.146.9 (172.22.146.9): 56 data bytes
64 bytes from 172.22.146.9: icmp_seq=0 ttl=57 time=6.384 ms
64 bytes from 172.22.146.9: icmp_seq=1 ttl=57 time=4.521 ms
64 bytes from 172.22.146.9: icmp_seq=2 ttl=57 time=4.095 ms
^C
--- 172.22.146.9 ping statistics ---enter code here
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 4.095/5.000/6.384/0.994 ms
mylaptop$ curl http://172.22.146.9:8080
<Pending forever here....>
答案 0 :(得分:0)
这是一个网络问题。 jenkins的默认http连接超时为10秒,但请求'/ pluginManager / plugins'的成本超过10秒,因为响应大约为500KB,非常大。
var pluginManagerErrorTimeoutMillis = 10 * 1000;
...
exports.availablePlugins = function(handler) {
jenkins.get('/pluginManager/plugins', function(response) {
if(response.status !== 'ok') {
handler.call({ isError: true, errorMessage: response.message });
return;
}
handler.call({ isError: false }, response.data);
}, {
timeout: pluginManagerErrorTimeoutMillis,
error: function(xhr, textStatus, errorThrown) {
handler.call({ isError: true, errorMessage: errorThrown });
}
});
};
您可以通过浏览器的开发人员工具更改pluginManagerErrorTimeoutMillis
。