Forum Stats

  • 3,734,274 Users
  • 2,246,935 Discussions
  • 7,857,216 Comments

Discussions

ORDS install problem - Failed to connect to ORDS_PUBLIC_USER

alan_d
alan_d Member Posts: 32 Green Ribbon
edited Nov 27, 2019 6:46PM in APEX Discussions

Hello, I am trying to install Oracle APEX 19.2, ORDS 19.2 on a Windows 10 machine running Oracle database 18c XE.

I have successfully installed 18c XE and APEX, but cannot get ORDS working after installing as follows:

C:\Oracle\ords19.2>java -jar ords.war install simple --parameterFile C:\ORACLE\ORDS19.2\PARAMS\ORDS_PARAMS.PROPERTIES

Nov 27, 2019 1:33:58 AM oracle.dbtools.rt.config.setup.SchemaSetup getInstallOrUpgrade

WARNING: Failed to connect to user ORDS_PUBLIC_USER jdbc:oracle:thin:@localhost:1521:xe

IO Error: The Network Adapter could not establish the connection

Nov 27, 2019 1:33:59 AM

INFO: reloaded pools: []

The procedure fails to create the user ORDS_PUBLIC_USER.

Here is my parameters file (passwords removed):

#Wed Nov 27 01:33:59 EST 2019

db.hostname=localhost

db.password=

db.port=1521

db.sid=xe

db.username=APEX_PUBLIC_USER

migrate.apex.rest=false

plsql.gateway.add=true

rest.services.apex.add=true

rest.services.ords.add=true

schema.tablespace.default=SYSAUX

schema.tablespace.temp=TEMP

standalone.http.port=8080

standalone.mode=false

user.apex.listener.password=

user.apex.restpublic.password=

user.public.password=

user.tablespace.default=USERS

user.tablespace.temp=TEMP

I can connect without problem to the database with sqlplus and Oracle EM at localhost:5500/em...

Please advise what to try next as I can't find any other resources that address this issue.

Any help would be much appreciated!

Let me know if I can post any addtional info to help troubleshoot.

Alan

Tagged:
Matthias Hoys

Answers

  • cormaco
    cormaco Member Posts: 1,559 Bronze Crown
    edited Nov 27, 2019 1:12PM

    Your connectstring @localhost:1521:xe is not correct for 18XE.

    This is how I connect to my 18XE:  sqlplus hr/[email protected]:1521/xepdb1

    Try db.servicename=xepdb1 instead of db.sid=xe

  • alan_d
    alan_d Member Posts: 32 Green Ribbon
    edited Nov 27, 2019 3:11PM

    Thanks for your reply. I tried changing db.sid=xe to db.servicename=xedpb1 but got the same results:

    Nov 27, 2019 2:58:03 PM oracle.dbtools.rt.config.setup.SchemaSetup getInstallOrUpgrade

    WARNING: Failed to connect to user ORDS_PUBLIC_USER jdbc:oracle:thin:@//localhost:1521/xepdb1

    IO Error: The Network Adapter could not establish the connection

    Nov 27, 2019 2:58:04 PM

    INFO: reloaded pools: []

    If it was a connection problem to xepdb1, wouldn't I also receive errors relating to the APEX users (APEX_LISTENER, APEX_REST_PUBLIC_USER)?

    It seems like it connects but can't create the ORDS_PUBLIC_USER account for some reason.

    Alan

  • Matthias Hoys
    Matthias Hoys Member Posts: 23
    edited Nov 27, 2019 3:21PM

    What if you try an interactive installation?

    $ java -jar ords.war setup

    Does this work? Are you using SYS as SYSDBA for the installation or another user?

    Matthias

  • cormaco
    cormaco Member Posts: 1,559 Bronze Crown
    edited Nov 27, 2019 3:39PM
    It seems like it connects but can't create the ORDS_PUBLIC_USER account for some reason.

    I don't think you are connecting to the database, you are getting an IO Error:

    IO Error: The Network Adapter could not establish the connection

    How do connect the database using sqlplus? What connectstring do you use?

  • alan_d
    alan_d Member Posts: 32 Green Ribbon
    edited Nov 27, 2019 5:07PM

    Hi Matthiash, here are the results of an interactive installation:

    C:\Oracle\ords19.2>java -jar ords.war setup

    Enter the name of the database server [localhost]:

    Enter the database listen port [1521]:

    Enter 1 to specify the database service name, or 2 to specify the database SID [1]:

    Enter the database service name [xepdb1]:

    Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:

    Enter the database password for ORDS_PUBLIC_USER:

    Confirm password:

    Nov 27, 2019 4:37:10 PM oracle.dbtools.rt.config.setup.SchemaSetup getInstallOrUpgrade

    WARNING: Failed to connect to user ORDS_PUBLIC_USER jdbc:oracle:thin:@//localhost:1521/xepdb1

    IO Error: The Network Adapter could not establish the connection

    Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.

    If using Oracle Application Express or migrating from mod_plsql then you must enter 1 [1]:

    Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]:

    Enter the database password for APEX_PUBLIC_USER:

    Confirm password:

    Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step [1]:2

    Nov 27, 2019 4:37:44 PM

    INFO: reloaded pools: []

    I used SYS as SYSDBA for the APEX installation, but the ORDS installation does not ask for an administrator user name or password.

    Alan

  • alan_d
    alan_d Member Posts: 32 Green Ribbon
    edited Nov 27, 2019 5:24PM

    Hi Cormaco. I just connect to sqlplus by entering "sys as sysdba" and the password:

    C:\Oracle\ords19.2>sqlplus

    SQL*Plus: Release 18.0.0.0.0 - Production on Wed Nov 27 17:13:57 2019

    Version 18.4.0.0.0

    Copyright (c) 1982, 2018, Oracle.  All rights reserved.

    Enter user-name: sys as sysdba

    Enter password:

    Connected to:

    Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

    Version 18.4.0.0.0

    SQL> show con_name

    CON_NAME

    ------------------------------

    CDB$ROOT

    SQL> alter session set container=xepdb1;

    Session altered.

    SQL> show con_name

    CON_NAME

    ------------------------------

    XEPDB1

    SQL> select username from all_users where username like '%APEX%';

    USERNAME

    --------------------------------------------------------------------------------

    APEX_PUBLIC_USER

    APEX_190200

    APEX_INSTANCE_ADMIN_USER

    APEX_LISTENER

    APEX_REST_PUBLIC_USER

    SQL> select username from all_users where username like '%ORDS%';

    USERNAME

    --------------------------------------------------------------------------------

    ORDSYS

  • alan_d
    alan_d Member Posts: 32 Green Ribbon
    edited Nov 27, 2019 5:54PM

    When I try to run the uninstall script for ORDS, I get the following:

    C:\Oracle\ords19.2>java -jar ords.war uninstall

    Enter the name of the database server [localhost]:

    Enter the database listen port [1521]:

    Enter 1 to specify the database service name, or 2 to specify the database SID [1]:

    Enter the database service name [xepdb1]:

    Requires to login with administrator privileges to verify Oracle REST Data Services schema.

    Enter the administrator username:sys

    Enter the database password for SYS AS SYSDBA:

    Confirm password:

    Nov 27, 2019 5:50:40 PM oracle.dbtools.rt.config.setup.SchemaSetup verifyDBAUserConnection

    WARNING: Failed to connect to user SYS AS SYSDBA jdbc:oracle:thin:@//localhost:1521/xepdb1

    IO Error: The Network Adapter could not establish the connection

    I entered the same password as in SQLPLUS.  Perhaps this helps troubleshoot.

    Alan

  • alan_d
    alan_d Member Posts: 32 Green Ribbon
    edited Nov 27, 2019 6:46PM

    I have stumbled upon a solution to the ORDS installation problem.

    When I tried to use SQLPLUS with the following syntax, I received an error message:

    C:\Oracle\ords19.2>sqlplus [email protected] as sysdba

    SQL*Plus: Release 18.0.0.0.0 - Production on Wed Nov 27 18:21:58 2019

    Version 18.4.0.0.0

    Copyright (c) 1982, 2018, Oracle.  All rights reserved.

    Enter password:

    ERROR:

    ORA-12541: TNS:no listener

    After googling this error, I checked the file ...dbhomeXE\network\admin\tnsnames.ora:

    It shows an ip address for the listener:

    LISTENER_XE =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.1.47)(PORT = 1521))

    Then I tried uninstalling ORDS using that ip address for the server name:

    C:\Oracle\ords19.2>java -jar ords.war uninstall

    Enter the name of the database server [localhost]:10.0.1.47

    Enter the database listen port [1521]:

    Enter 1 to specify the database service name, or 2 to specify the database SID [1]:

    Enter the database service name [xepdb1]:

    Requires to login with administrator privileges to verify Oracle REST Data Services schema.

    Enter the administrator username:sys

    Enter the database password for SYS AS SYSDBA:

    Confirm password:

    Retrieving information.

    Uninstalling Oracle REST Data Services

    ... Log file written to C:\Users\User\ords_uninstall_core_2019-11-27_181341_00226.log

    Completed uninstall for Oracle REST Data Services. Elapsed time: 00:00:01.960

    I then replaced "localhost" in my ORDS parameter file with the ip address:

    db.hostname=10.0.1.47

    and ran the ORDS install script again:

    C:\Oracle\ords19.2>java -jar ords.war install simple --parameterFile c:\oracle\ords19.2\params\ords_params.properties

    Requires to login with administrator privileges to verify Oracle REST Data Services schema.

    Enter the administrator username:sys

    Enter the database password for SYS AS SYSDBA:

    Confirm password:

    Retrieving information.

    Nov 27, 2019 6:15:14 PM

    INFO: reloaded pools: []

    Installing Oracle REST Data Services version 19.2.0.r1991647

    ... Log file written to C:\Users\User\ords_install_core_2019-11-27_181514_00466.log

    ... Verified database prerequisites

    ... Created Oracle REST Data Services proxy user

    ... Created Oracle REST Data Services schema

    ... Granted privileges to Oracle REST Data Services

    ... Created Oracle REST Data Services database objects

    ... Log file written to C:\Users\User\ords_install_datamodel_2019-11-27_181527_00650.log

    ... Log file written to C:\Users\User\ords_install_apex_2019-11-27_181528_00914.log

    Completed installation for Oracle REST Data Services version 19.2.0.r1991647. Elapsed time: 00:00:15.833

    SUCCESS!

    Thanks for those who read and contributed to this discussion!

    Alan

    Matthias HoysUser_ICWAC
Sign In or Register to comment.