Oracle XE Database on Ubuntu guest, OS X Host

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
ome bos
Posts: 8
Joined: 22. Nov 2008, 12:23

Oracle XE Database on Ubuntu guest, OS X Host

Post by ome bos »

All,

just new with the VirtualBox virtual machine, but allready loving it!

I have a small problem (or, at least, I think it's a small problem...):

I have installed Ubuntu on a VirtualBox machine on my MacBook Pro. After that I installed the free Oracle XE Database and upgraded the Application Express instance. It's a webdevelopment invironment which can be completely accessed thrue a webbrowser.

After the installation I forwarded port 1521 to get the database connection in my host system (OS X 10.5.5), I used the following stetements in the OS X Terminal:

VBoxManage setextradata "orcl" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle/Protocol" TCP

and

VBoxManage setextradata "orcl" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle/GuestPort" 1521

and

VBoxManage setextradata "orcl" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracle/HostPort" 1521

After this it extremely simple to access the database from my host environment (I used Oracle's SQLdeveloper which is free and brillant!).

Now, of course I want to acces the Application Express pages from my firefox browser in Mac OS X, the port it's on is 9876. In other words; in my guest operating system I access the Application Express pages using:

http://localhost:9876/apex

Is there a way I can do this, ie access this page in the browser in Mac OS X, the host environment? Do I use the same statements and rewrite them in a terminal to do this? Is there an other way?

Great thanks if you guy's can help me!

Regards!

Douwe Pieter van den Bos
mawcikurl
Posts: 6
Joined: 27. Nov 2008, 16:05

Post by mawcikurl »

Hi,

Have you tried doing the exact thing but with different key and port value?
Try this on your Mac host:

VBoxManage setextradata "orcl" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracleapex/Protocol" TCP
VBoxManage setextradata "orcl" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracleapex/GuestPort" 9876
VBoxManage setextradata "orcl" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/oracleapex/HostPort" 9876

When you point your browser to http://localhost:9876/apex , it should be there.
ome bos
Posts: 8
Joined: 22. Nov 2008, 12:23

Post by ome bos »

Yes,

I allready heard about that one in an other post ;)

After that, I still had the same problem, but I just had to set off the restriction that only the local machine could access the Oracle XE Database. Now I managed it.

I executed the following in sqlplus as sysdba:

exec dbms_xdb.setListenerLocalAccess
(l_access => FALSE);

In this way the http connection can be made from the hosts browser.//

I will post a description how I did the complete image and all settings on my website. http://www.ome-b.nl

Thanks for all your help!

Regards,

Douwe
mawcikurl
Posts: 6
Joined: 27. Nov 2008, 16:05

Post by mawcikurl »

yes, you could also set the access option in apex.
jonjayred
Posts: 1
Joined: 14. Mar 2009, 03:54

Re: Oracle XE Database on Ubuntu guest, OS X Host

Post by jonjayred »

Hello,

I have Virtual Box installed on Vista as my host. I then installed XP in the Virtual Box as the guest. In the XP guest I have an oracle 10.2 database running. I have networking setup in Virtual box so I can access the internet from the guest and ping the guest from the host and the host from the guest. :)

The problem I am facing is that when I tnsping the db (infra) on the host it comes back with

C:\Program Files\Sun\xVM VirtualBox>tnsping infra

TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 14-MAR-2
009 01:50:31

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.15)
(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = infra.com)))
TNS-12535: TNS:operation timed out

C:\Program Files\Sun\xVM VirtualBox>

In the tnsnames.ora file on the host I have placed the ip of the guest which I am able to ping successfully from the host (192.168.1.15 seen above).

I have even tried forwarding port 1521 to get the database connection in my host system but I still get the same error. :(

Can you spot where I went wrong?

Thanks in advance,
Jon
dio.rahman@gmail.com
Posts: 1
Joined: 20. May 2009, 14:59
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP

WinXP (Guest OS) as Web Server; Mac OS X as the Host

Post by dio.rahman@gmail.com »

Hello!

I also have the same problem

I've noticed that the "VBoxManage" command for port forwarding will add "ExtraData" to the "<GuestOS>.xml" (for example GuestOS=Windows XP)

For example,

I want to forward the port for my website (running on GuestOS = Windows XP) at port 8301 to the HostOS' (Mac OS X Leopard) 8301 port.

There are additional data in the Windows XP.xml
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/httptelerikdemo/HostPort" value="8301"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/httptelerikdemo/GuestPort" value="8301"/>
<ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/httptelerikdemo/Protocol" value="TCP"/>

I use the PCnet-FAST III (NAT) on my VBox Network Setting.

I've turned off the Firewall on Windows.

But, I still cannot access the: http://localhost:8301/ from Mac OS X (HostOS)

Anyone can help me to get rid this problem?

Thanks,

Dio
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: WinXP (Guest OS) as Web Server; Mac OS X as the Host

Post by vbox4me2 »

dio.rahman@gmail.com wrote:But, I still cannot access the: http://localhost:8301/ from Mac OS X (HostOS)
Can you run this INSIDE the Guest?
Post Reply