Cannot connect to Node Manager. : Access to domain for user ‘weblogic’ denied


If you’ve hit this error you are probably trying to control your Weblogic servers via WLST, but you are unable to connect to the Node Manager.

nmConnect(‘weblogic’,’welcome1′,’localhost’,’5556′,’FMW_XPS’,’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS’,’plain’)
Connecting to Node Manager …
Traceback (innermost last):
File “”, line 1, in ?
File “”, line 123, in nmConnect
File “”, line 648, in raiseWLSTException
WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain ‘FMW_XPS’ for user ‘weblogic’ denied.
Use dumpStack() to view the full stacktrace

Assuming you’ve already made sure all the parameters in the nmConnect command are correct and the NM process is up and running, there is actually one more thing to check: has your domain been set up in Production Mode? If so, then the Node Manager credentials have been generated by the Configuration Wizard at domain creation time. While the AdminServer will be aware of these credentials by default (you are able to connect to the NM via de admin console, after all), you will not be able to connect via WLST since you have to provide this random username and password. The solution is to reset the credentials in the Administration Console.

To change the default Node Manager username and password, startup the Admin Server and access the administration console. Then, click your domain’s name from the “Domain Structure” area:

Then navigate to the “Security” tab and click on “Advanced”. You will find the Node Manager credentials:

Click “Lock and Edit” and change the credentials, then click “Save” and “Activate Changes”. No restarts are required. Now, your nmConnect command within WLST should be successful:

wls:/offline> nmConnect(‘weblogic’,’welcome1′,’localhost’,’5556′,’FMW_XPS’,’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS’,’plain’)
Connecting to Node Manager …
Successfully Connected to Node Manager.

If you are worried about your password showing up in clear text in the startup scripts, you can use the storeUserConfig command to generate encrypted userconfigFile and a userKeyFile that you can then use in the nmConnect command.

For example, to create the user configuration file and key file:
connect(‘weblogic’, ‘weblogic1’, ‘localhost:7001’)
storeUserConfig('/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS/userConfigFile','/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS/userKeyFile')

To use the encrypted files in the connect command:

  • Connect to the Admin Server:

connect(userConfigFile=’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS/userConfigFile’,

userKeyFile=’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS/userKeyFile’,

url=’t3://localhost:7001′)

  • Connect to the Node Manager:

nmConnect(userConfigFile=’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS/userConfigFile’,
userKeyFile=’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS/userKeyFile’,
host=’localhost′,
port=’5556′,
domainName=’FMW_XPS’,
domainDir=’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS’,
nmType=’plain’)

Please review the official documentation for additional details and let me know your opinion in the comment section

  • Pingback: WebLogic AdminServer startup and shutdown scripts « Oracle Fusion Middleware

  • http://www.godaddy.com/products/web-tools.aspx?ci=72739 Steven Olson

    I like this post, enjoyed this one thanks for posting .

  • http://meandbreastactives.com Thomas Ichinose

    Good blog post. I certainly appreciate this website. Keep writing!

  • Dimitar Dimitrov

    Great post, thank You !

  • Jolly

    You should mention that you must use keyword parameters for nmConnect() because weblogic is dumb.

  • http://google.com google

    Hello! Do you use Twitter? I’d like to follow you if
    that would be ok. I’m undoubtedly enjoying your blog and look forward to new
    updates.

  • vijay

    Thanks Great help