My Oracle Support Banner

StoreUserConfig Failing With NameError Using WLST and nmConnect() When on OHS 12c Standalone Domain (Doc ID 2450800.1)

Last updated on DECEMBER 04, 2018

Applies to:

Oracle WebLogic Server - Version 12.2.1.0.0 and later
Oracle HTTP Server - Version 12.2.1.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 12.2.1.3.0 version, Oracle HTTP Server

Step by Step Instructions:

1. Install OHS from fmw_12.2.1.3.0_ohs_<platform>_Disk1_1of1.zip  (any platform) 

2. Create a standalone domain, all defaults 

3. Start Node Manager 

./user_projects/domains/base_domain/bin>startNodeManager.sh 

4. Connect and attempt to use documented feature 

./oracle_common/common/bin>wlst 

wls:/offline> nmConnect('weblogic', 'welcome1', 'localhost', '5556', 
'base_domain') 
Connecting to Node Manager ... 
Successfully Connected to Node Manager. 
wls:/nm/base_domain> storeUserConfig('/oracle/test/myuserconfigfile.secure', 
'/oracle/test/myuserkeyfile.secure', 'true') 
Traceback (innermost last): 
  File "<console>", line 1, in ? 
NameError: storeUserConfig 


Using storeUserConfig with startComponent.sh -- This works:

./user_projects/domains/base_domain/bin>startNodeManager.sh
./user_projects/domains/base_domain/bin>startComponent.sh ohs1 storeUserConfig

-- These are created:

user_home/.wlst/nm-key-domain_name.props
user_home/.wlst/nm-cfg-domain_name.props

./user_projects/domains/base_domain/bin>stopComponent.sh ohs1
./user_projects/domains/base_domain/bin>startComponent.sh ohs1

-- No password required, so it works.


Using storeUserConfig with nmConnect() on full WLS domain -- This works:

./oracle_common/common/bin>wlst 
wls:/offline> nmConnect('weblogic', 'welcome1', 'localhost', '5556', 
'base_domain') 
wls:/nm/base_domain> storeUserConfig('/oracle/test/myuserconfigfile.secure', 
'/oracle/test/myuserkeyfile.secure', 'true') 
wls:/nm/base_domain>  nmDisconnect() 
wls:/nm/base_domain> 
nmConnect(userConfigFile='/oracle/test/myuserconfigfile.secure', 
userKeyFile='/oracle/test/myuserkeyfile.secure', host='localhost', 
port='5556', domainName='base_domain') 
Connecting to Node Manager ... 
Successfully Connected to Node Manager. 



It is only failing when using nmConnect() on an OHS standalone installation, which configures a WLS standalone domain. nmConnect()  is being used in order to take advantage of monitoring features which may be automated using WLST scripts, but first need to store the username and password to make this more secure using encryption used with storeUserConfig.

Changes

The following is used for storeUserConfig with startComponent.sh (which is working with storeUserConfig):

Fusion Middleware Administering Oracle Fusion Middleware

Chapter 4 Starting and Stopping Oracle Fusion Middleware
Section 4.3.2.2 Starting and Stopping System Components
https://docs.oracle.com/middleware/12213/lcm/ASADM/starting-and-stopping.htm#GUID-97275D15-1B66-47D0-AC8D-08BD7938BA32

 

The following is used for the general WLST features, when nmConnect() may then be used with storeUserConfig:

WLST Command Reference for Oracle WebLogic Server 
https://docs.oracle.com/middleware/12213/wls/WLSTC/toc.htm 

connect
https://docs.oracle.com/middleware/12213/wls/WLSTC/reference.htm#WLSTC154 

storeUserConfig 
https://docs.oracle.com/middleware/12213/wls/WLSTC/reference.htm#WLSTC428 
nmConnect 
https://docs.oracle.com/middleware/12213/wls/WLSTC/reference.htm#GUID-76F407EC-5E10-478E-A62A-F584D658CF54 


Understanding the WebLogic Scripting Tool 
https://docs.oracle.com/en/middleware/lifecycle/12.2.1.3/wlstg/toc.htm 

Securing Access from WLST Online 
https://docs.oracle.com/en/middleware/lifecycle/12.2.1.3/wlstg/using_wlst.html#GUID-5BA88361-EFFE-4440-8667-7E128F4BF7EC 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.