Home > Blockchain >  Why I can't access Jenkins by server_ip:8080?
Why I can't access Jenkins by server_ip:8080?

Time:07-21

I tried to install Jenkins on my gcp instance. This log shows that jenkins service active

● jenkins.service - Jenkins Continuous Integration Server
     Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-07-15 00:17:18 UTC; 51s ago
   Main PID: 4903 (java)
      Tasks: 48 (limit: 2359)
     Memory: 713.3M
     CGroup: /system.slice/jenkins.service
             └─4903 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080

This log shows, that port 8080 opened

ubuntu@jenkins:~$ netstat -an | grep "LISTEN "
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN     
tcp6       0      0 :::8080                 :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN   

ubuntu@jenkins:~$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
8080                       ALLOW       Anywhere                  
OpenSSH                    ALLOW       Anywhere                  
8080 (v6)                  ALLOW       Anywhere (v6)             
OpenSSH (v6)               ALLOW       Anywhere (v6)      

But if I tryied to connect server_ip:8080 browser shows me ERR_CONNECTION_TIMED_OUT

ubuntu@jenkins:~$ telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
ubuntu@jenkins:~$  telnet ::1 8080
Trying ::1...
Connected to ::1.
Escape character is '^]'.
Connection closed by foreign host.

firewall rules cgp

CodePudding user response:

I had to set allow targets to all instances in the network rather specified target tags in the gcp firewall panel

  • Related