Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

APEX in Oracle XE stopped working

661 views
Skip to first unread message

Martin

unread,
Nov 14, 2006, 6:54:34 AM11/14/06
to
We are running Oracle XE on Linux for prototyping a project and have
been using the rather useful web based apex utility for minor
administration and reporting jobs. It now seems to be broken and I
cannot work out why.

Usually we tap in the url http://machine.domain:8080/apex and the web
interface starts but now we get

Not found
The requested URL /apex/apex was not found on this server

Note the /apex/apex (which I did not type in).

When I run lsnrctl info I can see the web based service is listening:

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=machine.domain)(PORT=8080))(Presentation=HTTP)(Session=RAW))

and a netstat -a also shows something is listening on port 8080.

When I tap the url into a browser and watch the listener.log file I
see:

14-NOV-2006 11:52:50 * http *
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.39)(PORT=51594)) * handoff *
http * 0

Any ideas what is wrong?

Martin

Frank van Bortel

unread,
Nov 15, 2006, 1:24:40 AM11/15/06
to
Martin schreef:
Change in firewall configuration?

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...

Renzo Zagni

unread,
Nov 14, 2006, 2:03:38 PM11/14/06
to
Is the database up ?

Martin

unread,
Nov 15, 2006, 4:36:53 AM11/15/06
to

Frank van Bortel wrote:

Could you be slightly more specific? To my knowledge we are not running
a firewall.

Martin

Martin

unread,
Nov 15, 2006, 4:37:45 AM11/15/06
to

Renzo Zagni wrote:

The database is running fine - no problems there. Just this problem
with apex.

Martin

HansF

unread,
Nov 15, 2006, 10:23:49 AM11/15/06
to
On Wed, 15 Nov 2006 01:37:45 -0800, Martin wrote:

> The database is running fine - no problems there. Just this problem
> with apex.

Generic response here ...

A few possible external factors may stop APEX from running. You don't
specify which Linux you are using and that could make a difference as the
distros have some differences.

Most common issue is that some form of firewall is running, perhaps
re-enabled as a result of a patch. If you are running a Fedora, then look
at SELinux settings.

Another challenge is DHCP ... the listener & tns lock in the host name at
install time and DHCP can change the host's IP so that does not always get
resolved consistently. Similar symptoms from DNS-based resolution instead
of /etc/hosts

I've also noted that people use other tools, like JBoss or TomCat, on the
same ports as the Apex port.

What happens when you try going against the localhost instead of the
installed host? http://localhost:8080/apex

Since you can access using sqlplus, what happens when you

exec sethttpport(8091);

in sqlplus as a DBA, and then try http to that port in your browser.

--
Hans Forbrich (mailto: Fuzzy.GreyBeard_at_gmail.com)
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.

Martin J. Evans

unread,
Nov 15, 2006, 11:00:56 AM11/15/06
to
HansF wrote:
> On Wed, 15 Nov 2006 01:37:45 -0800, Martin wrote:
>
>> The database is running fine - no problems there. Just this problem
>> with apex.
>
> Generic response here ...
>
> A few possible external factors may stop APEX from running. You don't
> specify which Linux you are using and that could make a difference as the
> distros have some differences.

Fedora Core release 5 (Bordeaux)

Oracle 10.2.0.1.0

> Most common issue is that some form of firewall is running, perhaps
> re-enabled as a result of a patch. If you are running a Fedora, then look
> at SELinux settings.

Don't believe we are running any kind of firewall. What makes me think
this is:

1. a wget http://machine.domain:8080
returns ok
It returns "ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT" page.

2. # ./iptables status
Firewall is stopped.

3. /etc/sysconfig/selinux says
SELINUX=disabled

> Another challenge is DHCP ... the listener & tns lock in the host name at
> install time and DHCP can change the host's IP so that does not always get
> resolved consistently. Similar symptoms from DNS-based resolution instead
> of /etc/hosts

Argh, did not know that. This box is DHCP, currently running with
192.168.0.87 and named x.easysoft.local but I cannot absolutely
guarantee it was exactly the same when oracle was installed although we
do tie mac addresses to IP addresses and this one is tied.

Do you know where the "listener and tns lock in the host name at install
time"?

> I've also noted that people use other tools, like JBoss or TomCat, on the
> same ports as the Apex port.

I've checked - that is not happening.

> What happens when you try going against the localhost instead of the
> installed host? http://localhost:8080/apex

This demonstrates a redirect I think:

$ wget -S http://localhost:8080/apex
--15:50:31-- http://localhost:8080/apex
=> `apex'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response...
HTTP/1.1 302 Found
Server: Oracle XML DB/Oracle Database
Location: /apex/apex
Connection: close
Location: /apex/apex [following]
--15:50:31-- http://localhost:8080/apex/apex
=> `apex'
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response...
HTTP/1.1 404 Not found
Server: Oracle XML DB/Oracle Database
Content-Type: text/html
Connection: close
15:50:31 ERROR 404: Not found.

As I said above, without the /apex it shows the oracle license so oracle
is listening.

> Since you can access using sqlplus, what happens when you
>
> exec sethttpport(8091);
>
> in sqlplus as a DBA, and then try http to that port in your browser.

identifier 'SETHTTPPORT' must be declared

May be I wasn't the right user for that. My colleague is off today and
may know other users that were set up.

Thanks for all your ideas. The dhcp one looks the most likely so if you
know where oracle stores the ip address or host name I can check those
to see if they changed.

Thanks again.

Martin

HansF

unread,
Nov 15, 2006, 12:46:37 PM11/15/06
to
On Wed, 15 Nov 2006 16:00:56 +0000, Martin J. Evans wrote:

> HansF wrote:
>> On Wed, 15 Nov 2006 01:37:45 -0800, Martin wrote:
>>
>>> The database is running fine - no problems there. Just this problem
>>> with apex.
>>
>> Generic response here ...
>>
>> A few possible external factors may stop APEX from running. You don't
>> specify which Linux you are using and that could make a difference as the
>> distros have some differences.
>
> Fedora Core release 5 (Bordeaux)
>
> Oracle 10.2.0.1.0
>

Thanks. Fedora series is notable for the infernal SELinux interfereing
with Oracle operations. However, you have verified that SELinux is
disabled.

>> Another challenge is DHCP ... the listener & tns lock in the host name at
>> install time and DHCP can change the host's IP so that does not always get
>> resolved consistently. Similar symptoms from DNS-based resolution instead
>> of /etc/hosts
>
> Argh, did not know that. This box is DHCP, currently running with
> 192.168.0.87 and named x.easysoft.local but I cannot absolutely
> guarantee it was exactly the same when oracle was installed although we
> do tie mac addresses to IP addresses and this one is tied.
>
> Do you know where the "listener and tns lock in the host name at install
> time"?
>

$ORACLE_HOME/network/admin ... the listeer.ora and tnsnames.ora files.

>> What happens when you try going against the localhost instead of the
>> installed host? http://localhost:8080/apex
>
> This demonstrates a redirect I think:
>

> As I said above, without the /apex it shows the oracle license so oracle
> is listening.

Yup. Sorry , I'd glossed over the previous replies and missed that one.

This states, in no uncertain terms, that the apex listener is managing the
intercept properly. That sort-of tells me the port and DHCP stuff is not
an issue right now.

Which means that apex itself may have become invalid or corrupt.

http://{host}:8080/i should give a list of directories.

Suggest you register for the Oracle Tech Net (otn) Express
database discussion forum and ask there. I haven't spent any time
researching an Apex-only reinstall (as my specialty is the XE baseline
install), but a few of the others have gone down this path.

Search this forum and the OTN Database-General forum for 'register for XE'

>
>> Since you can access using sqlplus, what happens when you
>>
>> exec sethttpport(8091);
>>
>> in sqlplus as a DBA, and then try http to that port in your browser.
>
> identifier 'SETHTTPPORT' must be declared
>

I keep doing that ... it's dbms_xdb.sethttpport()

But ... it's not necessary in this case, as the listener is actualy
running properly on the right port.

Martin J. Evans

unread,
Nov 15, 2006, 12:58:43 PM11/15/06
to
HansF wrote:
> On Wed, 15 Nov 2006 16:00:56 +0000, Martin J. Evans wrote:
>
>> HansF wrote:
>>> On Wed, 15 Nov 2006 01:37:45 -0800, Martin wrote:
>>>
>>>> The database is running fine - no problems there. Just this problem
>>>> with apex.
>>> Generic response here ...
>>>
>>> A few possible external factors may stop APEX from running. You don't
>>> specify which Linux you are using and that could make a difference as the
>>> distros have some differences.
>> Fedora Core release 5 (Bordeaux)
>>
>> Oracle 10.2.0.1.0
>>
>
> Thanks. Fedora series is notable for the infernal SELinux interfereing
> with Oracle operations. However, you have verified that SELinux is
> disabled.

Good, one ruled out.

>>> Another challenge is DHCP ... the listener & tns lock in the host name at
>>> install time and DHCP can change the host's IP so that does not always get
>>> resolved consistently. Similar symptoms from DNS-based resolution instead
>>> of /etc/hosts
>> Argh, did not know that. This box is DHCP, currently running with
>> 192.168.0.87 and named x.easysoft.local but I cannot absolutely
>> guarantee it was exactly the same when oracle was installed although we
>> do tie mac addresses to IP addresses and this one is tied.
>>
>> Do you know where the "listener and tns lock in the host name at install
>> time"?
>>
>
> $ORACLE_HOME/network/admin ... the listeer.ora and tnsnames.ora files.

tnsnames.ora lists a host of x.easysoft.local which is the correct host
i.e. ip address 192.168.0.87 is x.easysoft.local (on an nslookup) and
vice versa for reverse dns.

Similarly in listener.ora.

>>> What happens when you try going against the localhost instead of the
>>> installed host? http://localhost:8080/apex
>> This demonstrates a redirect I think:
>>
>> As I said above, without the /apex it shows the oracle license so oracle
>> is listening.
>
> Yup. Sorry , I'd glossed over the previous replies and missed that one.
>
> This states, in no uncertain terms, that the apex listener is managing the
> intercept properly. That sort-of tells me the port and DHCP stuff is not
> an issue right now.

Good - another thing ruled out :-)

> Which means that apex itself may have become invalid or corrupt.
>
> http://{host}:8080/i should give a list of directories.

It gives me a huge list of gif, css files and some dirs.

> Suggest you register for the Oracle Tech Net (otn) Express
> database discussion forum and ask there. I haven't spent any time
> researching an Apex-only reinstall (as my specialty is the XE baseline
> install), but a few of the others have gone down this path.
>
> Search this forum and the OTN Database-General forum for 'register for XE'
>
>>> Since you can access using sqlplus, what happens when you
>>>
>>> exec sethttpport(8091);
>>>
>>> in sqlplus as a DBA, and then try http to that port in your browser.
>> identifier 'SETHTTPPORT' must be declared
>>
>
> I keep doing that ... it's dbms_xdb.sethttpport()

ok.

> But ... it's not necessary in this case, as the listener is actualy
> running properly on the right port.
>

Thanks for all your help; it has ruled a lot out and I think I'll be in
a better position to define the problem in your suggested direction of otn.

Martin

Frank van Bortel

unread,
Nov 16, 2006, 2:13:02 AM11/16/06
to
Martin J. Evans schreef:
Well, something is running there...
Something redirects your localhost:8080/apex to localhost:8080/apex/apex
Very anctius to see what localhost:8080:/apex/i results into.
Also: a trailing slash may resolve the issue, simply:
localhost:8080/apex/

Martin

unread,
Nov 15, 2006, 2:44:58 PM11/15/06
to
Frank van Bortel wrote:
> Well, something is running there...

sure is

> Something redirects your localhost:8080/apex to localhost:8080/apex/apex
> Very anctius to see what localhost:8080:/apex/i results into.
> Also: a trailing slash may resolve the issue, simply:
> localhost:8080/apex/

It doesn't; I should have said I tried that. I'll try otn and see what
anyone there comes up with.
I'll post back here when I resolve the issue.

Thanks again.

Martin

Martin J. Evans

unread,
Nov 20, 2006, 10:15:00 AM11/20/06
to

As promised I'm reporting back now that I have Apex working again. A big
thank you to the guys on OTN Application Express group and especially
Dietmar.

I cannot be 100% certain exactly what broke my Apex but it would seem
somewhere a long the way PLSQL_WARNINGS got set System-wide to ERROR:ALL
when the default is DISABLE:ALL. This stopped some packages from
building. The combination of PLSQL_WARNINGS and the compiling of
dbmsobtk.sql for DBMS_OBFUSCATION_TOOLKIT seemed to be what broke Apex.

If you run into problems with Apex like the one I got then can set the
PL/SQL gateway to show what error it runs into when executing the APEX
package by running:

exec dbms_epg.set_dad_attribute('APEX', 'error-style', 'DebugStyle')

(Afterwards turn it off with
exec dbms_epg.delete_dad_attribute('APEX', 'error-style');
)

This showed me the problem was:

ORA-04063: package body "FLOWS_020100.WWV_FLOW" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"FLOWS_020100.WWV_FLOW"
ORA-06512: at "FLOWS_020100.APEX", line 1

After putting PLSQL_WARNINGS right and rerunning:

@?/rdbms/admin/dbmsoctk.sql
@?/rdbms/admin/prvtoctk.plb
@?/rdbms/admin/utlrp

and recompiling:
alter package DBMS_CRYPTO_TOOLKIT compile;
alter package DBMS_CRYPTO_TOOLKIT compile body;
alter package FLOWS_020100.wwv_flow compile body;

All was working again.

Thanks for your help.

Martin

What's in a namespace

unread,
Nov 21, 2006, 6:35:53 AM11/21/06
to

"Martin J. Evans" <martin...@easysoft.com> schreef in bericht
news:ejsgp2$e4g$1...@newsreaderm2.core.theplanet.net...

Martin,

thank you for sharing the solution!

Shakespeare


0 new messages