5 Replies Latest reply on Jul 23, 2012 5:48 AM by periklis_douvitsas

    Datasource connection errors

    wlam

      Hi,

       

      I'm using JBoss AS 6 console to test a mysql local tx datasource.  The result is successful, but I see errors in server.log.

       

      2012-07-18 13:50:49,402 ERROR [org.jboss.security.auth.spi.UsersRolesLoginModule] (ResourceContainer.invoker.nonDaemon-6) Failed to load users/passwords/role files: java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found

              at org.jboss.security.auth.spi.Util.loadProperties(Util.java:201) [:3.0.0.CR2]

              at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186) [:3.0.0.CR2]

              at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200) [:3.0.0.CR2]

              at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127) [:3.0.0.CR2]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_33]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_33]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_33]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_33]

              at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756) [:1.6.0_33]

              at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) [:1.6.0_33]

              at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) [:1.6.0_33]

              at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_33]

              at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [:1.6.0_33]

              at javax.security.auth.login.LoginContext.login(LoginContext.java:579) [:1.6.0_33]

              at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(JaasSecurityManagerBase.java:553) [:3.0.0.CR2]

              at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(JaasSecurityManagerBase.java:487) [:3.0.0.CR2]

              at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasSecurityManagerBase.java:365) [:3.0.0.CR2]

              at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:160) [:6.1.0.Final]

              at org.jboss.security.integration.JBossSecuritySubjectFactory.createSubject(JBossSecuritySubjectFactory.java:90) [:6.1.0.Final]

              at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.testConnection(JBossManagedConnectionPool.java:389) [:6.1.0.Final]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_33]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_33]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_33]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_33]

              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]

              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]

              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]

              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]

              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]

              at org.jboss.system.microcontainer.ServiceControllerContext.invoke(ServiceControllerContext.java:194) [:2.2.0.SP2]

              at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:61) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:58) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.execute(BasicKernelBus.java:71) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus.invoke(LifecycleAwareKernelBus.java:57) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:85) [:0.2.2]

              at org.jboss.profileservice.plugins.management.util.AbstractManagedComponentRuntimeDispatcher.invoke(AbstractManagedComponentRuntimeDispatcher.java:135) [:0.2.2]

              at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:93) [:0.2.2]

              at sun.reflect.GeneratedMethodAccessor774.invoke(Unknown Source) [:1.6.0_33]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_33]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_33]

              at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121) [jboss-aop.jar:2.2.2.GA]

              at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) [:1.0.1.GA]

              at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:99) [:6.1.0.Final]

              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967) [:6.1.0.Final]

              at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106) [:6.1.0.Final]

              at org.jboss.remoting.Client.invoke(Client.java:2070) [:6.1.0.Final]

              at org.jboss.remoting.Client.invoke(Client.java:879) [:6.1.0.Final]

              at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60) [:1.0.1.GA]

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

              at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74) [:1.0.1.GA]

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

              at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65) [:1.0.1]

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

              at org.jboss.aop.generatedproxies.AOPProxy$1.invoke(AOPProxy$1.java)

              at org.jboss.profileservice.management.client.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:63) [:6.1.0.Final]

              at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:216)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_33]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_33]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_33]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_33]

              at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)

      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_33]

              at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_33]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_33]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_33]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_33]

       

      Thank you.

        • 1. Re: Datasource connection errors
          periklis_douvitsas

          Hi,

          In your jboss folder, server\"default"\conf there is a file called login-config.xml. Also, in your application there is file called jboss-web.xml. Could you post these two files?Or more specifically from the jboss-web.xml file the line that you specify the security domain i.e <security-domain>java:/jaas/blabla</security-domain>

           

          and from the login-config.xml the pieces that you use the code="org.jboss.security.auth.spi.UsersRolesLoginModule" since in your error log it logs this error

          "ERROR [org.jboss.security.auth.spi.UsersRolesLoginModule]"

           

          Thanks

          • 2. Re: Datasource connection errors
            wlam

            all\conf\login-config.xml:

             

              <application-policy name="jmx-console">

                <authentication>

                  <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"

                    flag="required">

                    <module-option name="usersProperties">props/jmx-console-users.properties</module-option>

                    <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>

                  </login-module>

                </authentication>

              </application-policy>

             

            all\deploy\httpha-invoker.sar/invoker.war/WEB-INF/jboss-web.xml

             

            <jboss-web>

               <security-domain>java:/jaas/jmx-console</security-domain>

            </jboss-web>

             

            Thank you.

            • 3. Re: Datasource connection errors
              periklis_douvitsas

              Hi

              So you start the jboss with "all" server configuration. correct?

               

              In the server\all\conf\props folder there are 2 files

              jmx-console-roles.properties

              jmx-console-users.properties

               

              in the jmx-console-roles.properties put this line

              admin=JBossAdmin,HttpInvoker

               

              in the file jmx-console-users.properties maybe you have an entry(if you dont make an entry) like this

              admin=admin or whatever password you have to enter with the admin user

               

              Also, in the folder server\all\deploy\httpha-invoker.sar\invoker.war\WEB-INF

              in the web.xml file maybe you have to change the login-config under the security-constraint

              to be the same as in the jboss-web.xml so jmx-console

              it should be something like this

               

              <login-config>

                    <auth-method>BASIC</auth-method>

                    <realm-name>jmx-console</realm-name>

                 </login-config>

               

              I am not sure that my suggestions are correct

              Let me know if it works

              • 4. Re: Datasource connection errors
                wlam

                Hi,

                 

                Yes, I start JBoss with "all" server config.  Can you clarify this part? I'm confussed.

                 

                Also, in the folder server\all\deploy\httpha-invoker.sar\invoker.war\WEB-INF

                in the web.xml file maybe you have to change the login-config under the security-constraint

                to be the same as in the jboss-web.xml so jmx-console

                it should be something like this

                 

                <login-config>

                      <auth-method>BASIC</auth-method>

                      <realm-name>jmx-console</realm-name>

                   </login-config>

                 

                So, you want me to change <login-config> as above on web.xml and jboss-web.xml files? Also change jmx-console*properties files under server\all\conf\props folder?

                 

                Thanks.

                • 5. Re: Datasource connection errors
                  periklis_douvitsas

                  Hi,

                  yes, change the

                  jmx-console*properties files under server\all\conf\props folder

                   

                  Also, the jboss-web.xml i dont think you have to change it. You have there an entry "<security-domain>java:/jaas/jmx-console</security-domain>"

                  the name "jmx-console" in the line above it should be the same in web.xml file in the section

                   

                  <login-config>

                        <auth-method>BASIC</auth-method>

                        <realm-name>jmx-console</realm-name>

                     </login-config>

                   

                  So make the realm name the same as in the jboss-web.xml.

                   

                  I am not sure though