This discussion is archived
1 Reply Latest reply: Jun 1, 2010 7:28 AM by RaviJegga RSS

DBMS Connection not usable

user13152431 Newbie
Currently Being Moderated
Hello,
From my research, this error seems to be a generic one which basically means there is something wrong witht the RDBMS store but it doesn't say what. I have therefore tried to spell out exactly what I have done in the hope that someone will be able to point out where I'm going wrong. Apologies in advance for the long post.

I'm trying to automate a WLP domain build using a combination of ANT,WLST and shell scripts. The idea is to generate a template which can then be used as a basis for building the domain in various environments. I'm using wlp 10.3.2 on RHEL4 with Oracle 11g. This is my first experience doing this on Portal so I'm probably missing something very fundamental around the RDMS store config.
Below are the steps:-
1) Used the config wizard to create a portal domain in production mode, with two managed servers on two machines (Managed Server 1 shares a host with the AdminServer), cluster and I configure the datasources to point to an oracle database. I also configure the RDBMS store to point to the same database (with the same crdentials as the datasources)

2) Started the AdminServer and logged into the admin console. Created multidatasources for the CgDataSource, portalDataSourceAlwaysXA, portalDatasource and portalDataSourceNeverXA. In each case, I used the same jndi of the original datasource, changed the test table sql to 'SELECT 1 FROM DUAL' and then created two nodes each. Tested all the datasources and then restarted the Adminserver. Tested all the datasources again and everything was fine.

3) Shut down the adminserver. In the <domain_home>/config/jdbc directory, I amended each of the datasources (not the multi-datasources) and removed the values of the url, driver, user and password and in their place inserted tags which can be read by my ant scripts.

4) using the pack script, I generated a template jar from this domain, then move the domain from the directory to /tmp

My script reads this template, sets (getting values from a properties file) the Admin and managed server addresses and ports, configures the Nodemanager (to use the scripts based one), configures the cluster and then also configures the RDBMS store (again using values from a properties file) and then creates a new domain. Next, it replaces all the tags in the datasources with values from a properties file, inserts the correct values needed in the supplied database.properties file, and then runs create_db.sh script. It then runs the pack command to generate a managed server template which it copies to the remote server where it upacks it. Next, it generates a boots.properties file and then starts the AdminServer - now the first time I did this, it failed at this point with the DBMS Connection not usable error. Thinking that I had somehow corrupted the template, I went through the above process again and this time, I commented out the part of the script running the 'create_db.sh'. The Admiserver started up and the script went on to generate the required node manager properties files for both managed servers. I was able to log into the console and start both managed servers (they came up in ADMIN mode due to some library mismatch but I was able to resume them and then they changed to RUNNING state - haven't been able to sort out the library mismatch as well, but that is by the way for now). I ran the script again a few times in this environment and it worked ok.


When I copy the template and my scripts to another environment and run the script, I get the DBMS Connection not usable error again. If I generate another template in that environment, it works!! I'm at a loss why this is happening!! Below is the complete error.

Many, many thnkas in advance...



####<May 21, 2010 4:59:44 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457584407> <BEA-090851> <The SAMLCredentialMapperV2 provider is initialized.>
####<May 21, 2010 4:59:44 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457584412> <BEA-000000> <BootStrapServiceImpl.loadLDIFTemplate - Did not find /u01/bea/domains/domain_name/servers/adminserver/data/security/DefaultCredentialMappermyrealmInit.initialized, will load full LDIFT.>
####<May 21, 2010 4:59:44 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457584412> <BEA-090827> <LDIF template file /opt/bea/10.3.2/wlserver_10.3/server/lib/DefaultCredentialMapperInit.ldift was empty. The WebLogic provider CredentialMapper has been bootstrapped but has not been initialized with any LDIF data.>
####<May 21, 2010 4:59:44 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457584421> <BEA-000000> <BootStrapServiceImpl.loadLDIFTemplate - Did not find /u01/bea/domains/domain_name/servers/adminserver/data/security/XACMLRoleMappermyrealmInit.initialized, will load full LDIFT.>
####<May 21, 2010 4:59:44 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457584421> <BEA-090074> <Initializing RoleMapper provider using LDIF template file /u01/bea/domains/domain_name/security/XACMLRoleMapperInit.ldift.>
####<May 21, 2010 4:59:45 PM BST> <Error> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457585032> <BEA-000000> <Commit events are not broadcast because no JMS Transport is available. Remote L2 caches will be out of sync.>
####<May 21, 2010 4:59:45 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457585033> <BEA-090075> <The RoleMapper provider has had its LDIF information loaded from: /u01/bea/domains/domain_name/security/XACMLRoleMapperInit.ldift>
####<May 21, 2010 4:59:45 PM BST> <Info> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457585330> <BEA-090093> <No pre-WLS 8.1 Keystore providers are configured for server adminserver for security realm myrealm.>
####<May 21, 2010 4:59:45 PM BST> <Notice> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457585331> <BEA-090082> <Security initializing using security realm myrealm.>
####<May 21, 2010 4:59:45 PM BST> <Error> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457585448> <BEA-000000> <[Security:090735]The DBMS connection was not usable>
####<May 21, 2010 4:59:45 PM BST> <Critical> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274457585462> <BEA-090402> <Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.>
####<May 21, 2010 4:59:45 PM BST> <Critical> <WebLogicServer> <host_1> <adminserver> <Main Thread> <<WLS Kernel>> <> <> <1274457585464> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:959)
     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1050)
     at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:875)
     at weblogic.security.SecurityService.start(SecurityService.java:141)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Caused By: javax.security.auth.login.LoginException: [Security:090735]The DBMS connection was not usable
     at weblogic.security.providers.authentication.shared.DBMSAtnLoginModuleImpl.login(DBMSAtnLoginModuleImpl.java:240)
     at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:110)
     at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:106)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
     at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
     at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
     at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
     at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
     at com.bea.common.security.internal.service.JAASLoginServiceImpl.login(JAASLoginServiceImpl.java:113)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.bea.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
     at $Proxy17.login(Unknown Source)
     at weblogic.security.service.internal.WLSJAASLoginServiceImpl$ServiceImpl.login(WLSJAASLoginServiceImpl.java:91)
     at com.bea.common.security.internal.service.JAASAuthenticationServiceImpl.authenticate(JAASAuthenticationServiceImpl.java:82)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.bea.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
     at $Proxy37.authenticate(Unknown Source)
     at weblogic.security.service.WLSJAASAuthenticationServiceWrapper.authenticate(WLSJAASAuthenticationServiceWrapper.java:40)
     at weblogic.security.service.PrincipalAuthenticator.authenticate(PrincipalAuthenticator.java:347)
     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:929)
     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1050)
     at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:875)
     at weblogic.security.SecurityService.start(SecurityService.java:141)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
####<May 21, 2010 4:59:45 PM BST> <Notice> <WebLogicServer> <host_1> <adminserver> <Main Thread> <<WLS Kernel>> <> <> <1274457585484> <BEA-000365> <Server state changed to FAILED>
####<May 21, 2010 4:59:45 PM BST> <Error> <WebLogicServer> <host_1> <adminserver> <Main Thread> <<WLS Kernel>> <> <> <1274457585484> <BEA-000383> <A critical service failed. The server will shut itself down>
####<May 21, 2010 4:59:45 PM BST> <Notice> <WebLogicServer> <host_1> <adminserver> <Main Thread> <<WLS Kernel>> <> <> <1274457585487> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
####<May 21, 2010 4:59:45 PM BST> <Info> <WebLogicServer> <host_1> <adminserver> <Main Thread> <<WLS Kernel>> <> <> <1274457585495>
  • 1. Re: DBMS Connection not usable
    RaviJegga Expert
    Currently Being Moderated
    Hi
    This is the root cause:
    ####<May 21, 2010 4:59:45 PM BST> <Error> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1274457585448> <BEA-000000> <[Security:090735]The DBMS connection was not usable>
    ####<May 21, 2010 4:59:45 PM BST> <Critical> <Security> <host_1> <adminserver> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1274457585462> <BEA-090402> <Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.>

    Basically when we create a Portal Domain, using either default pointbase db or any other db like Oracle etc, at the end of domain creation, the configuration process will create a file by name "SQLAuthenticator.sql" located at beaHome\user_projects\domains\yourDomain\security. Basically this ,sql file will have Username/Password encryped, some default Groups etc. You can open this file. NOW, during config wizard process, this .sql file is executed in the database that is pointed to portal domain. Hence we are able to start the domaini. NOW, when you create a new domain from this template or change the backend database from PB to something else, you NEED to manually execute this .sql file in that backend database. So to begin with, for the NOT Working domain, first check the db it is using. Then use a client to connect to that db. And check the tables named "USERS" to make sure you have all these records. If not execute the .sql file and restart the domain.

    Thanks
    Ravi Jegga

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points