Process Scheduler Auto Update
I have been setting up process monitor auto update, and have managed to get it to work - I can see the process status updates in the process monitor screen. Here is what I did.
Oracle support document id
2772617.1
explains how to set this up manually. I wanted this to work as part of
the automated build, which means supplying the parameters as part of
psft_customisations.yml
A Gotcha!
We have multiple application servers running on the same port
(but on different VMs).
This means we need different domain IDs for each process scheduler
because domain ID and port are used as a key. I would have thought
that the hostname should be included to make this a unique identifier,
but Oracle have chosen not to do that. Note that domain ID is
different from domain name. Oracle documentation suggests using
the database name in lower case. The DPK default is APPDOM
(which
is also the default domain name). If either of these is used,
when you set up the inter domain event credentials on the process
scheduler and configure the domain (for example by running):
|
|
the following error messages will appear (wrapped for readability):
Setting Domain IDs
Application Server
So I have to think of a way to make the domain id unique. We name our VMs with a number on the end, so I use the last character of the hostname together with the first seven characters of the environment name. In our Jinja template this ends up as:
We set environment_name
in our Ansible inventory, and
inventory_hostname_short
is set by ansible. Of course I need to
remember that this won’t work if we have more than 10 application
server VMs.
As noted above, the domain name can be different to the domain ID, so we keep a consistent name to ensure that the paths are the same on each VM.
Updated to add:
The PeopleTools 8.60: System and Server Administration manual notes (Chapter 6 section Domain Settings) that the domain ID must not exceed 8 characters, hence I truncate the environment name at 7 characters before adding the number. What it doesn’t mention is that the domain id must not start with a number. That tripped me up!
Process Scheduler
We only have two process scheduler VMs, one on Unix and one on Windows,
so these have hardcoded domain IDs in the psft_customizations.yml
Setting the Inter-Domain Event Credentials
Credential String Format
It is these domain IDs which need to go into the credential string. It appears to be the following format for the process schedulers:
e.g.
PRCS_PSUNX_8988|testpsunx.example.com:8988
And the following for the application serves:
|
|
e.g.
testenv1_9000|testapps1.example.com:7988
Remember this credential string is what we are talking to, so we need to specify the application server hosts in the process scheduler configuration, and vice versa.
In the Process Scheduler Customisations YAML file
In the psft_customizations.yaml
jinja template for ansible, we need to write
something like this:
|
|
So we are looping through the application servers, and filling in the environment name, the ports and the server names. Each credential is separated by a comma, but we don’t want a comma at the end of the line.
it generates the string (wrapped for readability).
In the Application Server Customisations YAML file
Since in our setup we always have a Unix process scheduler, and normally also a Windows one, I hardcode that information:
|
|
This renders the line like this (Wrapped for readability):
Checking it Out
I have saved the best till last. It is really useful to check snippets of jinja configuration like this. As I write this there is a useful jinja test parser. It’s source is on GitHub. Note that it does appear to post the contents to the server, so don’t put anyting sensitive into it! Paste the following into the Values YAML box (to simulate the ansible inventory):
|
|
Then any of the snippets above can be pasted into the template box, and the template will be rendered! Try changing the names, the number of application servers etc. to see the effect! How amazing is that!
Troubleshooting
Windows
I had issues with Windows - The application server could not connect to the process scheduler, despite them both being in the same VLAN (i.e., there was no firewall between then to block traffic)
The following error (wrapped for readability) was written to the application server TUXLOG file:
LIBGWT_CAT:1249: WARN: Connection to PRCS_PRCS_PSNT_8988
address //testpsnt:8988 failed, Network error(115)
LIBGWT_CAT:1304: WARN: No more remote domain address for remote domain
PRCS_PRCS_PSNT_8988
I remembered that Windows has it’s own firewall (So does Linux in fact) and it turned out that this is what was blocking access. Windows doesn’t have an equivalent to netcal -l, but stack overflow provides a powershell script that can be used to test:
I used Ansible to create a firewall rule to open port 8988:
Annoying errors
I also received some errors in the application server TUXLOG. It turned out that I had configured a process scheduler to talk to the application server, but hadn’t configured the application server to talk to the process scheduler. Thus the application server kept rejecting the connection attempts from the process scheduler.
Again the messages are wrapped for readability:
113631.testapps1!GWTDOMAIN.76250.2848200448.0: LIBGWT_CAT:1509:
ERROR: Error occurred during security negotiation - closing connection
113730.testapps1!GWTDOMAIN.76250.2848200448.0: LIBGWT_CAT:1073:
ERROR: Unable to obtain remote domain id (PRCS_PSUNX_8988)
information from shared memory
Everything is set up OK and it Still is not working!
Try clearing the caches! Including the web server cache.
Conclusion
Despite what it would appear from Oracle’s documentation, it is possible to automate the setup of the process scheduler auto update. This will save us a lot of time in setting up our environments.