JonnyRocks
JonnyRocks

Reputation: 21

unable to connect to Jenkins server on redhat linux

I installed Jenkins on my Red Hat Enterprise 6.3. jenkins is running by listening to port 8080.

[root@linux]# service jenkins status
jenkins (pid  7526) is running...

JENKINS_PORT="8080"
JENKINS_LISTEN_ADDRESS="0.0.0.0"

But, I'm unable to connect to Jenkins via web browser or cURL. The TCP connect for the HTTP connection is "ESTABLIASHED", but the HTTP GET request is waiting forever and web browser is keeps on loading.

 [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....>

nmap scan also looks fine:

mylaptop$ nmap -p 8080 172.22.146.9

Starting Nmap 6.47 ( http://nmap.org ) at 2015-05-07 11:05 PDT
Nmap scan report for snmplab-linux9.cisco.com (172.22.146.9)
Host is up (0.0018s latency).
PORT     STATE SERVICE
8080/tcp open  http-proxy

Nmap done: 1 IP address (1 host up) scanned in 0.11 seconds

Upvotes: 1

Views: 3339

Answers (1)

Rino Han
Rino Han

Reputation: 21

It's a network problem. The default http connect timeout for jenkins is 10s, but the request '/pluginManager/plugins' costs more than 10s because the response is about 500KB, very big.

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 });
    }
});
};

You can change the pluginManagerErrorTimeoutMillis by the Developer Tools of your browser.

Upvotes: 2

Related Questions