Tag: ords install

  • ORDS WARNING Cannot find the real static path of

    ORDS WARNING Cannot find the real static path of

    Problem description

    You’ve just upgraded ORDS and issued the ords serve command. As ORDS is starting up, you see the following warning (or something like it):

    WARNING Cannot find the real static path of https://static.oracle.com/cdn/23.2.0/

    How to fix

    Easy! In this case, I removed the standalone.static.path property of the ORDS Global configuration settings.

    Removing ORDS configuration settings

    You can remove/add/update ORDS configuration settings in two ways:

    1. Manipulating the Global settings.xml file directly, or
    2. Using the ORDS CLI
    NOTE: Using the ORDS CLI is the preferred method. I cannot stress this enough. 

    Whenever an ORDS installation or upgrade displays errors or warnings, go straight to the ORDS upgrade logs. Review the associated log for anything out of place and anything relevant to the warning or error you observed. In this case, the error pointed to two clues:

    1. APEX
    2. “static path”
    REMEMBER: When you are troublshooting, you are on a fact-finding mission. You're looking for clues that can help you solve a mystery. 

    Here, I see that APEX isn’t even installed in my target database. Perhaps Chris was trying to do something with/in APEX in the past and got distracted.

    Since it looks like I haven’t installed APEX, I feel comfortable ruling out APEX as the culprit.

    More than likely, this is pointing toward user error as the culprit. Perhaps it was some setting that I applied incorrectly. Next, I’ll inspect the Global configuration settings for ORDS. I can do this in two ways:

    1. A visual inspection of the settings.xml file
    2. Or using the ORDS CLI

    Visual inspection

    Immediately, you can see the offending configuration property: standalone.static.path. This property “specifies the path to the folder containing static resources required by APEX.”1 Since I am reasonably sure that APEX doesn’t exist, nor does any APEX metadata exist in my database, I can test my theory by removing the property from the settings.xml file.

    I can do this pretty quickly in a text editor. However, if you are skittish about manipulating these files directly (and rightfully so), then use the ORDS CLI (this is the preferred method anyway).

    Updating settings with the ORDS CLI

    In this case, you’ll see a fictitious standalone.static.path directory, /123456/abcdef.

    You can easily remove this, and other settings with the delete option.

    The command used in this example:

    ords config delete standalone.static.path

    Once you’ve made the change, close out your Terminal session and start a new one. Closing out your session and restarting with a new one is good practice to ensure that your Terminal session recognizes any configuration changes you’ve made.

    I next issued the ords serve command and ORDS started up with no problem.

    And that is how we fixed this warning in this oddly specific scenario. I hope this helped!

    And one more thing

    You may have noticed I’m on ORDS Version 24.4. That is because I was using a pre-release version that will be available when this post is published. So, if you haven’t done so yet, download the latest ORDS here.

    Follow

    And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!

    1. See Table C-1 in the ORDS Installation and Configuration Guide. â†Šī¸Ž

  • ORDS install considerations: choosing the correct host, port, service name, and pluggable database when the database is in a podman container

    The other day, I wrote about how I had to start from scratch on my podman containers đŸ˜ĸ. I’m now at the step where I need to reinstall ORDS in these two new database containers (21c and 23c). And since I’m doing this install yet again, I figured I would point out some things I’ve learned while doing this with podman containers. This post isn’t meant to be all-inclusive; I’m simply highlighting the areas that gave me the most trouble.

    Lettuce begin

    My assumptions are that you’ve downloaded the ORDS zip file or from a Yum repository (how-to article here). You’ve also set the ORDS configuration folder path and the ORDS product folder path (both are necessary steps for ORDS pre-installation). You can read up on that step here.

    The ORDS Interactive Installer

    Here, I’m installing ORDS with the Interactive Installer.

    ords-interactive-installer-screenshot-chris-hoina-senior-product-manager-oracle-rest-data-services-database-tools
    Do this with the ords install command

    The fine print

    NOTE: For a vanilla installation, most of the default prompts are correct. But for working with a podman container, I do not believe all the default settings will work (at least, this has been my experience). 

    The ORDS Interactive Installer will prompt you with the default settings, where appropriate. You’ll notice the Choose [value]: convention. These settings are okay to use in many steps, but if you mindlessly follow them in specific steps, you might end up with the incorrect ORDS installation for your particular use case.

    Select the type of installation

    For instance, in the “Enter a number to select the type of installation” step, I’m prompted with the [1] option. For me, that is incorrect; I need to choose [2].

    type-of-installation-ords-interactive-installer-chris-hoina-senior-product-manager-oracle-rest-data-services-database-tools
    Option [2] I choose you!

    Database pool to update or create

    Things can get tricky here, too. In this step, I WILL choose option [1], but in the next step, I WILL NOT select the default settings (read on about host names, ports, and service names).

    basic-connection-ords-interactive-installer-chris-hoina-senior-product-manager-oracle-rest-data-services-database-tools
    This default string is simply an example; with podman you may not be using 1521 as the port.

    Selecting the database connection type

    And here’s why I won’t use the default settings. It’s because I have mapped the ports to/from my podman containers like this:

    podman-container-configurations-chris-hoina-senior-product-manager-oracle-rest-data-services-database-tools
    If you don’t map a port, podman will pick one for you!

    My 21entdb container is set up such that my computer sends and receives podman container traffic on port 41465. Meanwhile, my podman container is set up so that it will send and receive data on port 1521 (which is the default port for Oracle’s TNS Listener).

    Another way of looking at this is to imagine port 41465 is sort of spoofing port 1521. Ehh..maybe it’s better to think of it like a pass-through, a proxy, a go-between if you will…but more on this in a second.

    Demystifying the connection string

    Here, I’ll test both ports, the Container (ORCLCDB) and Pluggable (ORCLPDB1) databases, with various connection strings.

    QUESTION: How do I even know my options are ORCLCDB or ORCLPDB1? Well, I learned about them in the container registry documentation.

    Using port 1521

    First, let’s see what happens when I try to log into my database with SQLcl, using 1521 as the port:

    Nothing! Initially, for me, this made no sense! And that’s because, in my mind 1521 is the port that you would expect to connect with! This whole network business was confounding! That was until I realized that you have to use your computer’s port to connect to the podman container (which is listening on port 1521).

    Using the port podman assigned to you

    Ah-ha! Now, if you make that slight change to the ports, you can connect to your Container (ORCLCDB) and Pluggable (ORCLPDB1) databases.

    Does this help? Do you have a better understanding of why your port might not be 1521?

    Host, port, and service names

    You can probably keep the localhost default selection. When it comes to the listen port selection, I must choose 41465 and not 1521. And for the database service name, you could choose ORCLCDB (i.e. Oracle Container Database), but we recommend installing ORDS into a Pluggable Database (read up on this in our ORDS Best Practices). Here you see me do just that; ORCLPDB1 is the ORDS default, but I wanted to highlight why this is the default.

    host-port-service-name-ords-interactive-installer-chris-hoina-senior-product-manager-oracle-rest-data-services-database-tools

    Provide database user

    In this step, I’m supplying the username and password of a user with the necessary privileges to log into the database to complete the ORDS installation. In this case, unsurprisingly, it is the SYS user (the default). We also have an ORDS Installer Privileges script you can execute if you’d rather grant another user privileges to install, upgrade, repair, and uninstall ORDS. You can find more details on that script here.

    A great example showing how the JDBC driver is using the host, port, and service name values you provided.

    Enabling features

    This isn’t the final ORDS install step; this is just the last step I wanted to point out. The default here is also [1]. And I think you should keep it like that, here’s why. When you select [1], you’ll also give users access to Database Actions – the Graphical User Interface (which shares much in common with the SQL Developer desktop client). Once you start using Database Actions, it’s hard to stop.

    enable-additional-features-ords-interactive-installer-chris-hoina-senior-product-manager-oracle-rest-data-services-database-tools
    Don’t ask any questions; select option [1].
    NOTE: You'll also be enabling the REST-enabled SQL service (as well as the Database API). I recently wrote about the ORDS REST-Enabled SQL Service; it's very cool, and you should check out that article here.  

    The end

    Aaanndd, that’s my time. They’re flashing the lights, so I have to get off the stage 🙁. Hopefully, this note will be helpful when you create some containers from images on the Oracle Container Registry. And if you think you might like to tinker with ORDS, bookmark this post so you can refer to it later!

    Follow

    And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!