无法连接到redhat linux上的Jenkins服务器
我在我的红帽企业版6.3上安装了Jenkins。jenkins通过监听端口无法连接到redhat linux上的Jenkins服务器,linux,jenkins,Linux,Jenkins,我在我的红帽企业版6.3上安装了Jenkins。jenkins通过监听端口8080运行 [root@linux]# service jenkins status jenkins (pid 7526) is running... JENKINS_PORT="8080" JENKINS_LISTEN_ADDRESS="0.0.0.0" 但是,我无法通过网络浏览器或cURL连接到Jenkins。 HTTP连接的TCP连接已“建立”,但HTTP GET请求将永远等待,web浏览器将继续加载 [r
8080
运行
[root@linux]# service jenkins status
jenkins (pid 7526) is running...
JENKINS_PORT="8080"
JENKINS_LISTEN_ADDRESS="0.0.0.0"
但是,我无法通过网络浏览器或cURL连接到Jenkins。
HTTP连接的TCP连接已“建立”,但HTTP GET请求将永远等待,web浏览器将继续加载
[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....>
这是一个网络问题。
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 });
}
});
};
您可以通过浏览器的开发者工具更改
插件管理器RorTimeoutMillis
。您是否像AWS一样在云中运行Redhat,它具有安全组或其他防火墙设置,可能会阻止端口8080与笔记本电脑连接?另外,ssh到rehat框上,然后尝试相同的命令:curlhttp://172.22.146.9:8080
谢谢你,雷。我已经通过“服务iptables stop”禁用了防火墙,并且它正在本地服务器上运行。redhat系统上的curl工作正常吗?curlhttp://172.22.146.9:8080
红帽上也挂起了。
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 });
}
});
};