Reset the AdminServer Password in WebLogic 11g and 12c

Reset the AdminServer Password in WebLogic 11g and 12c:

source $DOMAIN_HOME/bin/setDomainEnv.sh
cd $DOMAIN_HOME/servers/AdminServer/
mv data data-old
cd $DOMAIN_HOME/security
java weblogic.security.utils.AdminAccount weblogic NEW_PASSWORD .

Restart the AdminServer.

If the weblogic has the file boot.properties in $DOMAIN_HOME/servers/AdminServer/security/, should be adjusted the credentials of user and password, before restart the AdminServer.

OBS: Check the post on decrypt datasource password, which can also be used to decrypt the credentials of boot.properties file, avoiding making the above procedure, if this file exists.

That’s all for today.
Jackson.

Weblogic JRF files in /tmp

Problem:
In weblogic 11G, there are several JFR files in /tmp directory:

root@app1wsora3 tmp]# pwd; find . -name *.jfr |xargs ls -tlhr
/tmp
-rw——- 1 oracle oinstall 0 Aug 11 18:41 ./2016_06_02_13_50_22_4317/2016_08_11_18_41_43_4317.jfr
-rw——- 1 oracle oinstall 37M Aug 11 18:41 ./2016_06_02_13_50_22_4317/2016_08_01_11_22_51_4317.jfr
-rw——- 1 oracle oinstall 14M Aug 16 09:25 ./2016_06_02_13_50_15_4341/2016_08_16_03_24_12_4341.jfr
-rw——- 1 oracle oinstall 0 Aug 16 12:02 ./2016_06_02_13_50_15_4341/2016_08_16_12_02_02_4341.jfr
-rw——- 1 oracle oinstall 14M Aug 16 12:02 ./2016_06_02_13_50_15_4341/2016_08_16_09_25_39_4341.jfr
-rw——- 1 oracle oinstall 0 Aug 16 12:43 ./2016_06_02_13_50_24_4344/2016_08_16_12_43_28_4344.jfr
-rw——- 1 oracle oinstall 150M Aug 16 12:43 ./2016_06_02_13_50_24_4344/2016_08_16_12_17_36_4344.jfr

These files are from DMS (Dynamic Monitoring Service) and they are created when application server is running.

More“Weblogic JRF files in /tmp”

Apache 2.4 with port redirect to Weblogic 12c

According Oracle guys, Apache 2.4 its is a vanila module to Weblogic 12c and same module runs with Weblogic 11g.

Modules are available to download:  https://blogs.oracle.com/WebLogicServer/entry/announcing_web_socket_proxy_and

# httpd -version
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built:   Mar 21 2016 02:33:00

On httpd.conf is necessary to load Apache 2.4 module

LoadModule weblogic_module modules/lib/mod_wl_24.so

More“Apache 2.4 with port redirect to Weblogic 12c”

Weblogic starting with the operating system

Hi,
Today, let’s to configure weblogic services startup, when machines starts.
In some blogs, we can find a bunch of customized scripts that create and set variables to startup the adminservers, nodemanagers and managed server, but, in my case, i just need to start adminserver and nodemanger, when machines start just after an incident.

For this situation, we need that the startup of application do not interrupt the operation system startup.

*The operation system in subject is Red-Hat 6.5

More“Weblogic starting with the operating system”

Manipulating JMS queues using WLST Script

Hi.

Today, let’s talk about Java Message Systems (JMS), the reason led me talk about this, is that my environment, a complex architecture of messages where we have more of two hundred queues in the same domain.
The administration of queues in the weblogic console is very simple, but, if you need to remove a million messages, in a hundred queues, you have a problem!
To turn more agile the visualization of messages, state and other queue properties, nothing better than to use WLST.

This post shows a script, which can grow up where you imagine, for while the script have just three options (the most useful to me) and nothing prevents to have more.

More“Manipulating JMS queues using WLST Script”

Decrypting WebLogic Datasource Password

Hi Guys,

Today I bring you a script that I use to decrypt datasource passwords and also the password of AdminServer, which is very useful on a daily basis.

The script uses the encrypted password that is found within the datasource configuration files ($DOMAIN_HOME/config/jdbc/*.xml).
To decrypt the AdminServer password is used the encrypted password contained within the boot.properties ($DOMAIN_HOME/servers/AdminServer/security).

Below the script (decryptPassword.py):

#=======================================================================================
# This Script decrypt WebLogic passwords
#
# Usage:
# wlst decryptPassword.py
#
#
#=======================================================================================
import os
import weblogic.security.internal.SerializedSystemIni
import weblogic.security.internal.encryption.ClearOrEncryptedService

def decrypt(domainHomeName, encryptedPwd):
domainHomeAbsolutePath = os.path.abspath(domainHomeName)
encryptionService = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domainHomeAbsolutePath)
ces = weblogic.security.internal.encryption.ClearOrEncryptedService(encryptionService)
clear = ces.decrypt(encryptedPwd)
print "RESULT:" + clear

try:
if len(sys.argv) == 3:
decrypt(sys.argv[1], sys.argv[2])
else:
print "INVALID ARGUMENTS"
print " Usage: java weblogic.WLST decryptPassword.py "
print " Example:"
print " java weblogic.WLST decryptPassword.py D:/Oracle/Middleware/user_projects/domains/base_domain {AES}819R5h3JUS9fAcPmF58p9Wb3swTJxFl0t8NInD/ykkE="
except:
print "Unexpected error: ", sys.exc_info()[0]
dumpStack()
raise

Syntax using: java weblogic.WLST decryptPassword.py $DOMAIN_HOME encrypted_password

Download script here.

For example:
[oracle@app1osbgrepora1l scripts]$ source /oracle/domains/osb_domain/bin/setDomainEnv.sh
[oracle@app1osbgrepora1l osb_domain]$ java weblogic.WLST decryptPassword.py /oracle/domains/osb_domain/ {AES}WdbfYhD1EbVXmIe62hLftef4WtNPvyRDGc1/lsyQ014=
Initializing WebLogic Scripting Tool (WLST) …
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
RESULT:OSBPASS123

That’s all for today
Jackson.

Setting up a weblogic Result cache on Oracle Service Bus

Hi Guys,

In the current days , even with the new ideals about agile metods and various attempts to put together infraestructure and development (DevOps) we still have so much codes that had the development with a great distance of the machines and S.O.

In this scenario, a lot of exceptions are found in the application logs, but the majority can’t be considerated the problem in fact.

This Post is related to an exception that occurs when a BusinessService in an Oracle Service Bus flux was configured to use a Result cache service, instead to call an external service,
why do we have an exception when calling the result cache? -Because the result cache was not configured on the Weblogic server.

com.bea.wli.sb.service.resultcache.ResultCacheException: An unexpected exception was thrown while using the result cache:
java.lang.ClassNotFoundException: com.bea.wli.sb.transports.jca.JCAResponseMetaDataImpl

Let’s configure weblogic result cache (Coherence)!

For this lab, will used two machines and two managed servers on a cluster.

First, let’s create two coherence servers, one for each machine:

image01

For each coherence server we must set one lib and one module in the classpath, this box is found in “Start Server” page on the Coherence Server.

image02

In the same page, we need to configure the box “Arguments:” to define coherence hosts and ports.

Attention to fill properly ‘localhost’: For the coherence server1 the localhost value is machine01, to the coherence server2 the value for localhost is machine2.

image03.png

After settting up the two coherence server, let’s create a coherence cluster, the target must to be the managed servers or Weblogic server Cluster:

image04.png

After setting up coherence cluster, set the new cluster on each coherence Server.

image05

 

The last step is to configure coherece Server parameter on each managed server. In Box “Arguments”, which is on page “Start server” on each managed server.

Again, attention to fill properly ‘localhost’: For the Managed server1 the localhost value is machine01, to the Managed server2 the localhost value is machine2.

image06

To validate the settings , start the coherence servers, and wait to RUNNING status. Celebrate with a good wine!

image07.png

Dieison.

Bypass user and password in the Oracle BAM ICommand.

Every time you need to execute ICommand, you must enter the user and password of the application server running Oracle BAM.
With the configuration below, it is no longer necessary to inform username and password every time.

In the file “BAMICommandConfig.xml” located in “$BEA_HOME/Oracle_SOA1/bam/config/”, add the lines below to the end of the file, before the tag “/BAMICommand”:

weblogic
YOUR_PASSWORD

Restart the Oracle BAM.

Jackson.

Oracle Licensing: Weblogic Tip!

Like a complement to yesterday post, about Oracle Database Licensing, today’s post is a little tip to Weblogic licensing evaluating, considering an auditing…

The restricted services can be checked on WebLogic Server Basic – Restricted Primary Services in WebLogic Server.

There is also a py script on Orace Support that can be executed via WLST on Admin Sever. Please take a look on: WebLogic Server Basic License Feature Usage Measurement Script (Doc ID 885587.1)

And it’s all by now! 🙂

Hugs!
Matheus.