How to access jenkins using ip address remotely ?

253 views
Skip to first unread message

Vaibhav Khachane

unread,
Oct 20, 2020, 10:35:15 AM10/20/20
to Jenkins Users

Hello Team,

I am trying to access jenkins using ip address but it is not working . I am using macOS.

Following jenkins url working fine
http://localhost:8080/
http://127.0.0.1:8080/
http://0.0.0.0:8080/

but while using ip adress of my machine it is not working
http://(ip address of my. machine ):8080/


Danny Trunk

unread,
Oct 20, 2020, 10:41:41 AM10/20/20
to jenkins...@googlegroups.com
Hello Vaibhav,

what does "remotely" mean? Inside your network or outside from the internet?
Inside of your network this should work out of the box.
Outside from the internet you need to open port 8080 to access it.
Please refer to the documentation of your router on how to open a port.
Keep in mind this might be a security issue.

And in addition: If you have 24h reconnect in order to get a new ip address you can get and run a so called DynDNS address.
There are several providers out there.
Some (or most?) routers support configuring a DynDNS address as well - so you don't have to run a service on your computer.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0a2be992-d850-41d8-a0eb-6959888f0cb0n%40googlegroups.com.
Message has been deleted

John Patrick

unread,
Oct 20, 2020, 1:35:17 PM10/20/20
to jenkins...@googlegroups.com
From the command line do;
$ netstat -an | grep 8080

That will show you what ip address as listening on the port 8080, e.g.
your jenkins instance. If it's only listening to local addresses then
it will never work remotely.

Don't have access to a jenkins at the moment, but within Jenkins
configuration you should be able to select what addresses jenkins
should bind to and listen to. It might require a manual change in the
configuration then restart.

John
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/JS8IIQ.Z02SEYIZGNFU2%40gmail.com.
Message has been deleted
Message has been deleted

John Patrick

unread,
Oct 20, 2020, 2:44:17 PM10/20/20
to jenkins...@googlegroups.com
So I've only access to a jenkins installed in a centos vagrant vm at
the moment and the value I need to change to control what listen
address is being is in this file /etc/sysconfig/jenkins

And the config is;
JENKINS_LISTEN_ADDRESS=""

Which causes jenkins to listen to every ip address the vm has access
to. So using netstat I see
$ netstat -an | grep 8080
tcp6 0 0 :::8080 :::* LISTEN
$

So depending on how you have installed and configured your jenkins
you'll need to find similar configuration and change it to either your
public/remote ip address or "" so it's listens to everything.

Then next issue might be what Danny highlighted as you have not
confirmed by what you mean by remote? I'm using the term for any
machine that is not localhost. If your wanting it remote over the
internet or company network, then you might need to change your
router... you might need to setup dynamic ip routing or port
forwarding so it is expired to your isp wan ip address.

John

Daniel Beck

unread,
Oct 21, 2020, 7:20:59 AM10/21/20
to jenkins...@googlegroups.com
Jenkins installed via Homebrew only listens on the loopback interface, so this is expected. Why they do this, I have no idea. Perhaps our former (2016 and earlier) lack of having a secure configuration out of the box.

https://github.com/Homebrew/homebrew-core/blob/0a483dc47a7f30266b626f1bfcf465c733c880b8/Formula/jenkins.rb#L55
https://github.com/Homebrew/homebrew-core/blob/0a483dc47a7f30266b626f1bfcf465c733c880b8/Formula/jenkins-lts.rb#L46

Daniel Beck

unread,
Oct 21, 2020, 7:21:02 AM10/21/20
to jenkins...@googlegroups.com


> On 20. Oct 2020, at 07:22, Vaibhav Khachane <vkha...@namutek.com> wrote:
>

Richard Bywater

unread,
Oct 21, 2020, 1:37:28 PM10/21/20
to jenkins...@googlegroups.com
As well as the above, if you are wanting to access Jenkins on your Mac outside of the machine itself you'll also need to ensure the Mac Firewall is open to allow port 8080 traffic.

Richard.

On Wed, 21 Oct 2020 at 08:37, Ivan Fernandez Calvo <kuisat...@gmail.com> wrote:
Do you use something like this to run Jenkins?

java --jar jenkins.war -httpListenAddress=0.0.0.0 --httpPort=8080

Christian Brauchmann

unread,
Oct 21, 2020, 1:37:28 PM10/21/20
to jenkins...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.


--
Von meinem Atari ST520 gesendet
Reply all
Reply to author
Forward
0 new messages