I tried to connect to http://34.125.119.106:8080/ , but i can't and dont know why. I create firewall rule for tcp:8080,so i think it will be work,but still cannot connect to jenkins,i am look into /etc/default/jenkins file,but inside was all correct,i really dont what went wrong,i tried to line in this file like HTTP_HOST=127.0.0.1,just seeing some people advise to do this,but in doesn't work in my cas,is there some one who know how to solve this? Sorry for my bad English.
CodePudding user response:
As a first step my recommendation is to check if your service is exposed and through what port number. For this you can use command sudo netstat -plntu
. You should be looking for an output similar to:
tcp6 0 0 :::8080 :::* LISTEN 17917/java
If its not, change your /etc/default/jenkins
file to port 8080
After that from inside your GCP project, you can run a connectivity test having as source
one of the IP addresses you are using to reach your Server and as destination
, your Servers VM instance. This test will simulate traffic and tell you where it's getting stuck whether if it's stuck on the way to your Server or if your server is not correctly configured. You can get a good reference in this document.
If you have already configured your ingress firewall rule, just make sure its applied to your VM, it sometimes happens that you have a network tag on your VM instance and another tag on your firewall rule.
CodePudding user response:
Use the default settings, because HTTP_HOST=127.0.0.1
locks you out:
HTTP_HOST=0.0.0.0
HTTP_PORT=8080
HTTPS_HOST=0.0.0.0
HTTPS_PORT=443
Listing to all interfaces with 0.0.0.0
is fine, but HTTP_PORT
should be -1
.