Weblogic 12c – change console preferences using python and wlst

Manoj Sahid Hassankhan

You can configure some features of the Administration Console by setting preferences manualy in the console. For some features you need to restart the Admin server.

In a provisoned environment you will need this to be automated. For this example i used wlst and python.

In this case there is an oracle bug which results in when one of the host machines is shut down, the admin console is very slow to respond.

 

A workaround for this is:

Login to the adminconsole

Goto:

On the mydomain > Configuration > general > Advanced page:
Change the parameter “Invocation Timeout Seconds” into 2

On the Preferences page > Shared Preferences (Tab):
Change the parameter “Management Operation Timeout” into 5

 

The parameter “Management Operation Timeout” can be managed with a WLST script.

There is a property file to set the parameter with a value

domain.invocationtimeout=2

domain.managementoperationtimeout=5

The wlst script reads the property file. if does noet exists then sets the default value to “0”

image

depending on the outcome it will set value

image

It is not possible to manage the parameter “Invocation Timeout Seconds” with WLST. I used python because there are enough suitable XML parsers in combination with Pretty Print.

Depending if the parameter is used it wil be created in the file ConsolePreferences.xml. located in /domains/domainName /servers/domainName + -adminServer/data/console.

 

if it does not exists. It will created the proper setting

image

 

If the parameter exists it wil replace the value

image

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Next Post

Get going with Project Fn on a remote Kubernetes Cluster from a Windows laptop–using Vagrant, VirtualBox, Docker, Helm and kubectl

Facebook0TwitterLinkedin The challenge I describe in this article is quite specific. I have a Windows laptop. I have access to a remote Kubernetes cluster (on Oracle Cloud Infrastructure). I want to create Fn functions and deploy them to an Fn server running on that Kubernetes (k8s from now on) environment […]