Page 1 of 1
Accessing website on Ubuntu guest, OS X Host
Posted: 24. Nov 2008, 10:24
by ome bos
As I pointed out in my previous Topic,
http://forums.virtualbox.org/viewtopic.php?t=11624 , I'm having trouble accessing my Application Express page fromout my host environment.
The problem is, I think, more general than I pointed out earlier.
In the guest environment (Ubuntu 8.10) I can access the website as following:
http://localhost:9876/apex
In what way is it possible for me to access this site in a browser on my host environment? (Firefox in OS X 10.5.5).
Hope you guy's got some good tips!
Regards,
Douwe Pieter
Posted: 24. Nov 2008, 12:01
by baf
If you're running nat which I suppose then you need to setup portforwarding with something like this:
VBoxManage setextradata "Win2k" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest7011/HostPort" 7011
VBoxManage setextradata "Win2k" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest7011/GuestPort" 7011
VBoxManage setextradata "Win2k" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest7011/Protocol" TCP
Where Win2K is the name of your virtual machine.
guest7011 is a "tag" for this set of settings
7011 is the port you want to reach. It does not have to be the same on the inner and outer side.
Good Luck.
Posted: 24. Nov 2008, 22:44
by ome bos
Great! It worked!
Your brillant! Thanks!
Is it related
Posted: 2. Dec 2008, 15:48
by alecse
Hi,
I'm a newbie and I'm not sure that my problem is related :
Here is the situation :
I have an iMac with OSX.5 (host)
and I'm running XP Pro SP2 as guest system using VirtualBox
I'm willing to have a local server running on DotNetNuke on the XP
I did all configuration steps and it should be working
But when I try to access my website (via
http://localhost/angel or
http://localhost:8080/angel), it doesn't work !!!
I think it might be related with some issues with the port 80 that is allready used by a device (which one, I don't know)
But I really don't know what to do.
The DNN setup (done online by a friend of mine through logmein) is ok.
So if someone can help me, that would be just so great !!!
Trying to do the same thing, different problem
Posted: 4. Dec 2008, 16:08
by jwickard
When I try to enter the port forwarding commands, I get a different error:
Code: Select all
sudo VBoxManage setextradata "dev" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP
I get:
Code: Select all
VirtualBox Command Line Management Interface Version 2.0.6
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
[!] FAILED calling virtualBox->FindMachine(Bstr(argv[0]), machine.asOutParam()) at line 6979!
[!] Primary RC = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Full error info present: true , basic error info present: true
[!] Result Code = NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value
[!] Text = Could not find a registered machine named 'dev'
[!] Component = VirtualBox, Interface: IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
[!] Callee = IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
The machine is definitely named dev however. From dev.log:
Code: Select all
00:00:00.687 Name <string> = "dev" (cch=4)
Anyone have any insight?
Posted: 4. Dec 2008, 16:48
by TerryE
Make sure that your parameters are in HostPort, GuestPort, Protocol order.
Try using the UUID instead of the VM name, just in case you've managed to get spaces in your VM name.
Posted: 5. Dec 2008, 02:16
by jwickard
I tried using the uuid, no change just gave the same message, but instead said that it could find a host by the name of that uuid.
SUCCESS... well... almost
Posted: 5. Dec 2008, 05:26
by jwickard
So I did a VBoxManage list vms and realized that it couldn't find a registered machine if I use sudo to issue the command.
The problem is, when I don't use sudo, the settings don't seem to take. I can issue all the same commands above, I get no errors, but if I open the settings.xml file, there are no entries for the properties I'm setting via setextradata
Posted: 5. Dec 2008, 05:27
by TerryE
I just realised that you are doing sudo ... Why? This means that you are attempting to set parameters of a VM owned by root, rather than your logged on User ID.
Posted: 5. Dec 2008, 05:42
by jwickard
Yeah I figured that out too, however now the commands don't seem to take at all and there are no entries being created in my settings.xml file any longer
Posted: 5. Dec 2008, 16:54
by TerryE
If the commands "work" then you can check that they are being correctly loaded by viewing the log file (Ctl-L with focus on the VM in the GUI). The ** CFGM Dump ** enumerates the configuration; look for the pcnet/0 tree.
Posted: 18. Dec 2008, 20:25
by billspat
jwickard - This is an under-educated long shot, but have you tried naming the VM something other than 'dev' ? duplicating the disk and making a new VM is low cost to troubleshoot.
VBoxManage modifyvm <uuid> -name development
dev is all over the place in *nix and the shell. This might also explain why sometimes it works using sudo. Even though you've tried the uiud, could be some edge-case that vboxmanage coders haven't tested against.
I'm not a unix expert by any means but have seen other problems like this on Mac, linux and windows. for example, in windows XP, any file named COMx.something.something can't be clicked on, copied, viewed, renmaed, etc. (where x is any single digit).
HTH
Re: Accessing website on Ubuntu guest, OS X Host
Posted: 26. Jun 2010, 12:24
by ome bos
Hi there guy's
I got a new one, same topic...
I created a brand new VirtualBox (version 3.2.4) instance with Ubuntu 10.04. This time I got the same stuff on it: an Oracle XE Database with Oracle Application Express. I tried to connect using the same commands:
VBoxManage setextradata “Ubuntu” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/apex/Protocol” TCP
and
VBoxManage setextradata “Ubuntu” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/apex/HostPort” 9876
and
VBoxManage setextradata “Ubuntu” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/apex/GuestPort” 9876
When I navigate to
http://127.0.0.1:9876/apex on the guest (Ubuntu) machine, I get the APEX login page, but when I do this on my Mac, I cannot find the page...
Is this protocol changed in the recent versions of VirtualBox? Or did I do something wrong?
Re: Accessing website on Ubuntu guest, OS X Host
Posted: 28. Jun 2010, 21:34
by ome bos
I think I got something. I probably missplaced the qoutes (i.e. falsely copy - pasted them, silly me)
But now a new problem occurs: I can't seem to start my machine anymore.
Here's the topic I found with google:
http://forums.virtualbox.org/viewtopic.php?f=7&t=29153
Re: Accessing website on Ubuntu guest, OS X Host
Posted: 5. Jul 2010, 13:03
by vodoomoth
ome bos wrote:When I navigate to http://127.0.0.1:9876/apex on the guest (Ubuntu) machine, I get the APEX login page, but when I do this on my Mac, I cannot find the page...
Do you also use 127.0.0.1 on the Mac when you enter the address? If so, it explains the problem. If not, what address do you use when you try to access the login page that's running in the guest?