cant open jenkins in web browser

Discussions about using Linux guests in VirtualBox.
Post Reply
fayda
Posts: 4
Joined: 11. Jul 2023, 16:55

cant open jenkins in web browser

Post by fayda »

hello,
i'm running ubuntu server 20.04 on virtualbox and it is set on NAT on network setting .
I installed jenkins on it and i tested it by running "sudo systemctl status jenkins"
but when I type on my web browser on the host machine http://localhost:8080 or http://10.0.2.15:8080(the ip of the vm on virtualbox) I got 'the site cant be reached'
I tried to change the virtualbox network setting to bridged adapter but when I did so I didn't get I an IP when I run ifconfig
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: cant open jenkins in web browser

Post by scottgus1 »

Please see Virtualbox Networks: In Pictures: NAT

Since there is essentially a router between your VM and the host when using NAT, you won't be able to access the VM by its 10.0.2.15 IP address, just like you wouldn't be able to access your PC from out on the internet by trying the PC's LAN IP address. Additionally, like a router, NAT requires opening a port in its Port Forwarding settings to let access through to the VM.

See the tutorial above on what to do to open the port and access the VM's service from the host.
fayda wrote: 11. Jul 2023, 17:27 I tried to change the virtualbox network setting to bridged adapter but when I did so I didn't get I an IP when I run ifconfig
Sometimes, Linux OS's don't see the change in network types as easily as Windows does. You may have to take the network adapter inside the Linux OS down then up again for the change to be seen. Web-search how to do this down up thing.
Post Reply