OGG-12031 error … What happened?

 

nginx reverse proxy goldengate

 

On one of our projects, we have been using an Oracle GoldenGate (Microservices) hub architecture to run the migrations.  Using a hub is great because it provides a single point for managing Oracle GoldenGate, especially with 30+ deployments. Part of this hub deployment is using an Nginx Reverse Proxy to consolidate the number of port numbers needed with Oracle GoldenGate.  Making the access to underlying services easier.  That is until you start adding deployments.

When adding Nginx to an Oracle GoldenGate host, Oracle provides a utility that will create the nginx.conf file that maps to all the deployments that the ServiceManager is responsible for monitoring (detail setup instructions). Sometime ago I boiled this process down to a shell script that has to be ran as root (makes it a lot easier).  However, this is the first time I’m sharing the script with other people.  Will get it to my GitHub repo at some point..lol.

Reverse Proxy Scripts (configureNginx.sh):

#!/bin/bash
# Copyright (c) 2020 RheoData, LLC and/or its affiliates. All rights reserved.
#
# Since: March 2019
# Author: Bobby Curtis <[email protected]>
# Description: configureNginx
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#

vServiceManagerUser=$1
vPassword=$2
vPort=$3

export JAVA_HOME=${OGG_HOME}/jdk
echo ${JAVA_HOME}
echo ${OGG_HOME}

cd ${OGG_HOME}/lib/utl/reverseproxy
./ReverseProxySettings -u $vServiceManagerUser -P $vPassword -o ogg.conf https://localhost:$vPort
sudo cp ogg.conf /etc/nginx/conf.d/nginx.conf
sudo sh /etc/ssl/certs/make-dummy-cert /etc/nginx/ogg.pem
sudo nginx
sudo nginx -t
sudo nginx -s reload

As you can tell, it is very simple shell script that does the same thing as the documented steps in the documentation. 

After the Nginx reverse proxy is configured, all the deployments are accessible through port 443.  So where does the OGG-12031 error come from?  It comes from the Nginx not being updated after new deployments are added to the ServicesManager.  

The exact error message that will be seen is:

{"links":[],"messages":[{"$schema":"ogg:message","title":"The requested resource does not exist.","code":"OGG-12031","severity":"ERROR","issued":"2023-02-03T02:09:01Z","type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"}]}

The error message is indicating that the resource doesn’t exists; actually means that the Nginx cannot find the deployment you are trying to access although the ServiceManager sees the deployment.  To resolve this, you simply have to update the Nginx configuration.  Using the above scripts (configureNginx.sh), it is really simple.  The script is ran as follows:

$ sudo su - oracle
$./configureNginx.sh oggadmin <password> 16000

At this point the nginx.conf file will be updated and restarted.  Then all the deployments will be accessible.

 

 

Please follow and like:

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.