4 Replies Latest reply: Jun 23, 2008 1:30 PM by Khanh RSS

    Service Temporarily Unavailable

    alexlizn
      Hi, folks,
      I installed APEX into a new oracle database. After HTTP Server configuration, I ran this:

      http://tracy.mycompany.com:7777/pls/apex

      and got to a error:
      503 Service Temporarily Unavailable
      The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

      I have no problem with:
      http://tracy.mycompany.com:7777
      which means the HTTP Server works fine.

      Here is my environment:
      APEX 3.1
      Oracle 10.2 RAC (primary instance on server: truckee)
      Oracle Application Server & HTTP Server on another server (server name: tracy)

      APEX 3.1 installation into Oracle 10.2 was successful. I checked the DBA_REGISTRY:

      SQL>
      SQL> SELECT STATUS FROM DBA_REGISTRY
      2 WHERE COMP_ID = 'APEX';

      STATUS
      --------------------------------------------
      VALID

      SQL>


      In my HTTP Server configuration, dad.conf is like:

      Alias /i/ "/usr/orasw/as1012/Apache/images/"
      AddType text/xml xbl
      AddType text/x-component htc

      <Location /pls/apex>
      Order deny,allow
      PlsqlDocumentPath docs
      AllowOverride None
      PlsqlDocumentProcedure wwv_flow_file_mgr.process_downloadd
      PlsqlDatabaseConnectString truckee:1521:mcqs1 ServiceNameFormat
      PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
      PlsqlAuthenticationMode Basic
      SetHandler pls_handler
      PlsqlDocumentTablename wwv_flow_file_objects$
      PlsqlDatabaseUsername APEX_PUBLIC_USER
      PlsqlDefaultPage apex
      PlsqlDatabasePassword <<password removed>>
      PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
      Allow from all
      </Location>

      Listener Status on database server(not the HTTP Server)

      [oracle@/home/oracle]
      [oracle@/home/oracle]lsnrctl status

      LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 30-MAY-2008 10:12:56

      Copyright (c) 1991, 2006, Oracle. All rights reserved.

      Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
      STATUS of the LISTENER
      ------------------------
      Alias LISTENER_TRUCKEE
      Version TNSLSNR for Linux: Version 10.2.0.3.0 - Production
      Start Date 08-MAY-2008 06:37:14
      Uptime 22 days 3 hr. 35 min. 42 sec
      Trace Level off
      Security ON: Local OS Authentication
      SNMP ON
      Listener Parameter File /usr/orasw/db102/network/admin/listener.ora
      Listener Log File /usr/orasw/db102/network/log/listener_truckee.log
      Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.30.7.121)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.30.7.120)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.20.120)(PORT=1521)))
      Services Summary...
      Service "+ASM" has 1 instance(s).
      Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
      Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
      .... some entries removed here ....
      Service "mcqs.mycompany.com" has 1 instance(s).
      Instance "mcqs1", status READY, has 2 handler(s) for this service...
      The command completed successfully
      [oracle@/home/oracle]
      [oracle@/home/oracle]

      The HTTP Server log:

      [Fri May 30 09:03:43 2008] [error] [client 10.30.7.124] [ecid: 85909137699,1] mod_plsql: /pls/apex/apex HTTP-503 ORA-12514 ORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n



      apex_public_user account was unlocked, password was also changed.
      There is no Listener on HTTP Server. Only tnsname.ora exists on this server. From this HTTP server, I can connect to the database with service name mcqs which is from tnsname like:

      SQL> conn apex_public_user/pass@mcqs

      but on this HTTP Server, I can't connect to the database this way:

      SQL> conn apex_public_user/pass@truckee:1521/mcqs1

      The problem is obvious: HTTP server can't talk to database with this dad.conf setting:

      PlsqlDatabaseConnectString truckee:1521:mcqs1 ServiceNameFormat

      I think the above setting should enable HTTP server to talk to database directly--it has host name, port and sid and it has all it needs--it may get away without Listener and tnsname. Am I right?

      Does the HTTP Server have to have a Listener in it? I don't think so, what do you say?
      If not, how can I make the HTTP server talk to the database.

      Any input will be appreciated!
      Alex

      null
        • 1. Re: Service Temporarily Unavailable
          alexlizn
          OK, I got it.
          I changed the dads.conf:
          from

          PlsqlDatabaseConnectString truckee:1521:mcqs1 ServiceNameFormat

          to

          PlsqlDatabaseConnectString truckee:1521:mcqs.mycompany.com ServiceNameFormat

          I checked the document, and found it says host:port:service_name. I put instance name earlier, so it didn't work.

          Plus the output from lsnrctl status says the service name is mcqs.mycompany.com, not mcqs.

          just FYI
          Alex

          p/s: I didn't stop ASM and RAC to install APEX.
          • 2. Re: Service Temporarily Unavailable
            Khanh
            Hi folks,

            I installed APEX into a local oracle 10g. After HTTP Server configuration, I ran:

            http://LENOVO-D0446FF6.:7777/pls/apex

            I got the error:

            Service Temporarily Unavailable
            The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
            --------------------------------------------------------------------------------

            Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server Server at LENOVO-D0446FF6. Port 7777

            I have no problem with:
            http://lenovo-d0446ff6.:7777/


            When I checked the DBA_REGISTRY, I got a status INVALID.

            My dad.conf is:
            Alias /i/ "C:\oracle\product\10.2.0\ohs\Apache\Apache\images\"

            AddType text/xml xbl
            AddType text/x-component htc

            <Location /pls/apex>
            SetHandler pls_handler
            Order deny,allow
            Allow from all
            AllowOverride None
            PlsqlDatabaseUsername APEX_PUBLIC_USER
            PlsqlDatabasePassword pwd
            PlsqlDatabaseConnectString LENOVO-D0446FF6 TNSFORMAT
            PlsqlAuthenticationMode Basic
            PlsqlDefaultPage apex
            PlsqlDocumentTablename wwv_flow_file_objects$
            PlsqlDocumentPath docs
            PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
            PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
            </Location>

            Can someone help me figure out what I did wrong?

            Thanks

            Khanh
            • 3. Re: Service Temporarily Unavailable
              alexlizn
              Khanh,
              First, your APEX installation wasn't good, according to your DBA_REGISTRY INVALID status. You may wanna remove it completely before reinstall it.

              Second, your dad DB connection string is not right.
              This is yours:

              PlsqlDatabaseConnectString LENOVO-D0446FF6 TNSFORMAT

              This is commonly used one:

              PlsqlDatabaseConnectString host:port:serviceName ServiceNameFormat

              Hope it helps!
              Alex
              • 4. Re: Service Temporarily Unavailable
                Khanh
                Thanks Alex,

                I removed the installation and reinstalled it. Made sure the status in the dba_registry said "VALID", then I modified the dad file to show the following string:
                PlsqlDatabaseConnectString LENOVO-D0446FF6:1521:orcl ServiceNameFormat

                and it worked fine.

                Thanks for your help.

                Khanh