Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I do not have access to localhost when i run jenkins #656

Closed
Heartdeath opened this issue Mar 22, 2018 · 16 comments
Closed

I do not have access to localhost when i run jenkins #656

Heartdeath opened this issue Mar 22, 2018 · 16 comments

Comments

@Heartdeath
Copy link

Docker commands that you execute

docker pull jenkins
docker run --name testJenkins -p 9090:9090 -p 50000:50000 jenkins

Actual result

it works, jenkins is fully up and running.

But in my browser
http://localhost:9090/
http://127.17.0.1:9090/
nothing works

http://localhost:50000/ , this is the result :
localhost

Expected outcome

I do not understand, Jenkins should appear in my browser.

Output of docker version

Docker version 17.12.0-ce, build c97c6d6

Have a good day !

@carlossg
Copy link
Contributor

The port is 8080

@Heartdeath
Copy link
Author

Heartdeath commented Mar 22, 2018

the port 8080 is already used si i change to 9090

@joshmoore
Copy link
Member

Unless you modified Jenkins internally, then you need to map your 9090 to jenkin's 8080:

docker run -p 9090:8080 ...

@lurifn
Copy link

lurifn commented Sep 14, 2018

I've ran
docker run \ -u root \ --rm \ -d \ -p 8090:8080 \ -p 50000:50000 \ -v jenkins-data:/var/jenkins_home \ -v /var/run/docker.sock:/var/run/docker.sock \ jenkinsci/blueocean

But I'm still having the same problem

@batmat
Copy link
Member

batmat commented Sep 14, 2018

@LuanaFn what problem? What is the error message? If the port 8090, or 50000 are already taken on your machine, then you need to change them.

@lurifn
Copy link

lurifn commented Sep 14, 2018

I'm getting a ERR_CONNECTION_TIMED_OUT time out error.

Port 50000 wasn't available so I removed the p 50000:50000 part and the process started fine on port 8090.

I'm still not able to connect from the browser..

@vengatesanns
Copy link

vengatesanns commented Nov 11, 2018

Every Localhost having some IP address, So If you use docker in windows by Docker ToolBox at the Don't Check with Localhost:8080 in your browser why because that is not the actual host.Your Localhost running in Vmware so you can check your IP address by using this Command (docker-machine ip default)

For Example :
I got 192.168.99.100 - using this IP to run the Jenkins like 192.168.99.100:8080
Really It works...

@Oktaliem
Copy link

Oktaliem commented Jan 26, 2019

Thanks to @vengatesanns
I run the command
i.e
C:\Users\ {your_PC_name}>docker-machine ip
192.168.99.100

your Docker Jenkins localhost ----> 192.168.99.100
set on my browser 192.168.99.100:9090 and the Jenkins is displayed.

@Deehoos
Copy link

Deehoos commented Aug 13, 2019

@vengatesanns thanks man, it worked for me too!

@pramodhm112
Copy link

Thanks @vengatesanns

It works. Basic Knowledge !!

@achalawb
Copy link

achalawb commented Oct 8, 2019

@vengatesanns I had the same issue and got it solved. Thanks a lot :)

@Surajrvi
Copy link

Thanks man :) @vengatesanns

@cloudifyer
Copy link

Worked like charm, thanks @vengatesanns

@shravanrai
Copy link

I run below command, Jenkins container is not getting up.

$ sudo docker container run --name jenkins-blueocean --rm --detach --network jenkins --env DOCKER_HOST=tcp://docker:2376 --env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1 --volume jenkins-data:/var/jenkins_home --volume jenkins-docker-certs:/certs/client:ro --publish 8080:8080 --publish 50000:50000 jenkinsci/blueocean

$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fa994b502def docker:dind "dockerd-entrypoint.…" 2 minutes ago Up 2 minutes 2375/tcp, 0.0.0.0:2376->2376/tcp jenkins-docker

Expected: jenkins-blueocean container should start.

Reference :
https://www.jenkins.io/doc/book/installing/#setup-wizard

@shravanrai
Copy link

Got a workaround:

$ sudo docker container run --name jenkins-blueocean
--volume jenkins-data:/var/jenkins_home --publish 8080:8080 --publish 50000:50000 jenkinsci/blueocean

For those who are having a permission issue like this:
Use the --privileged tag with the docker run command
OR
touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?

sudo chown 1000:1000 /path/to/your/folder (jenkins-data)

@AkshayGhawade
Copy link

Every Localhost having some IP address, So If you use docker in windows by Docker ToolBox at the Don't Check with Localhost:8080 in your browser why because that is not the actual host.Your Localhost running in Vmware so you can check your IP address by using this Command (docker-machine ip default)

For Example : I got 192.168.99.100 - using this IP to run the Jenkins like 192.168.99.100:8080 Really It works...

Perfect! this works! Thankyou.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests