Access to rails server from host machine

This is for discussing general topics about how to use VirtualBox.
Post Reply
viktor___
Posts: 4
Joined: 29. Jan 2017, 22:11

Access to rails server from host machine

Post by viktor___ »

Hi, guys.
I know that next issue is common, but still need your help and advice.

I deployed an ubuntu virtual machine on VirtualBox and installed there ruby and rails. Starting rails server, but can't access it via browser on my host machine. Tried NAT and bridged network adapters on virtual machine, but still no success. By the way virtual machine is pinged and accessible via ssh.
Could you help me to solve this problem? Probably i have missed something small , but important at the same time.
Thank you in advance
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access to rails server from host machine

Post by socratis »

viktor___ wrote:can't access it via browser
viktor___ wrote:virtual machine is pinged and accessible via ssh.
That means that there is a problem with the web server's configuration, not with connectivity. Or a firewall?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
viktor___
Posts: 4
Joined: 29. Jan 2017, 22:11

Re: Access to rails server from host machine

Post by viktor___ »

I turned off firewall for a while on the host machine, but it didn't help. Will search more about server's configuration
And thanks for the reply
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access to rails server from host machine

Post by socratis »

Not on the firewall on the host, on the guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Access to rails server from host machine

Post by BillG »

It would help if you told us how you are trying to access the server (by name? by IP? If by IP what IP?) and any error message you receive if/when it fails.
Bill
viktor___
Posts: 4
Joined: 29. Jan 2017, 22:11

Re: Access to rails server from host machine

Post by viktor___ »

BillG wrote:It would help if you told us how you are trying to access the server (by name? by IP? If by IP what IP?) and any error message you receive if/when it fails.
my local machine has IP 192.168.0.103
virtual machine - 192.168.0.104

i'm trying to get access to rails server by IP using port 3000 i.e 192.168.0.104:3000
Firefox can't establish a connection to the server 192.168.0.104:3000
viktor___
Posts: 4
Joined: 29. Jan 2017, 22:11

Re: Access to rails server from host machine

Post by viktor___ »

socratis wrote:Not on the firewall on the host, on the guest.

just checked, firewall inactive on the VM
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access to rails server from host machine

Post by socratis »

I stand by my previous remark:
socratis wrote:That means that there is a problem with the web server's configuration
Check the configuration allows only 127.0.0.1
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply