4 Replies Latest reply on Feb 2, 2015 9:18 PM by Chao Wang

    Fail to configure security domain with infinispan cache-type

    Chao Wang Newbie

      A security domain can choose to use "default" or "infinispan" as type of authentication cache. Before wildfly 9, in order to use "infinispan" as cache-type in security domain, I can configure it as described in http://stackoverflow.com/questions/21280812/jaas-customloginmodule-not-called-for-second-location-a-user-logs-in and change cache-type to "infinispan" in wildfly 8 series. However, it does not work since wildfly-9.0.0.Alpha1

       

      I added a new cache-container within infinispan subsystem and updated security domain "other" as cache-type="infinispan".

       

      <subsystem xmlns="urn:jboss:domain:infinispan:3.0">
          <cache-container name="security" default-cache="auth-cache">
                      <local-cache name="auth-cache" jndi-name="true">
                          <eviction strategy="LRU" max-entries="10000"/>
                          <expiration max-idle="100000"/>
                      </local-cache>
          </cache-container>
      

       

       <subsystem xmlns="urn:jboss:domain:security:1.2">
                  <security-domains>
                      <security-domain name="other" cache-type="infinispan">
      

       

      After server restart:

       

      15:20:37,444 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path /home/wangchao/work/jboss/wildfly/wildfly/build/target/wildfly-9.0.0.Alpha2-SNAPSHOT/welcome-content
      15:20:37,444 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 53) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "security"),
          ("security-domain" => "other")
      ]): java.lang.NoClassDefFoundError: org/wildfly/clustering/infinispan/spi/service/CacheContainerServiceName
          at org.jboss.as.security.SecurityDomainAdd.launchServices(SecurityDomainAdd.java:182)
          at org.jboss.as.security.SecurityDomainAdd$1.execute(SecurityDomainAdd.java:148)
          at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:743)
          at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:578)
          at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:336)
          at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:312)
          at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:356)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:745)
          at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      
      15:20:37,447 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0012: Started server default-server.
      15:20:37,448 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0018: Host default-host starting
      15:20:37,450 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = h2
      15:20:37,463 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on /127.0.0.1:8080
      15:20:37,465 INFO  [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Beta2
      15:20:37,481 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "WFLYCTL0193: Failed executing subsystem security boot operations"
      15:20:37,481 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-subsystem-boot") failed - address: ([]) - failure description: "\"WFLYCTL0193: Failed executing subsystem security boot operations\""
      15:20:37,491 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) WFLYDS0013: Started FileSystemDeploymentService for directory /home/wangchao/work/jboss/wildfly/wildfly/build/target/wildfly-9.0.0.Alpha2-SNAPSHOT/standalone/deployments
      15:20:37,497 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "datasources"),
          ("data-source" => "ExampleDS")
      ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.data-source.java:jboss/datasources/ExampleDS is missing [jboss.security.subject-factory]"]}
      15:20:37,499 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "datasources"),
          ("data-source" => "ExampleDS")
      ]) - failure description: {
          "WFLYCTL0180: Services with missing/unavailable dependencies" => [
              "jboss.data-source.java:jboss/datasources/ExampleDS is missing [jboss.security.subject-factory]",
              "jboss.data-source.java:jboss/datasources/ExampleDS is missing [jboss.security.subject-factory]"
          ],
          "WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {
              "Services that were unable to start:" => [
                  "jboss.data-source.reference-factory.ExampleDS",
                  "jboss.naming.context.java.jboss.datasources.ExampleDS"
              ],
              "Services that may be the cause:" => [
                  "jboss.security.simple-security-manager",
                  "jboss.security.subject-factory"
              ]
          }
      }
      15:20:37,500 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "ejb3")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.ejb.utilities is missing [jboss.security.simple-security-manager]"]}
      15:20:37,513 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
      WFLYCTL0184:    New missing/unsatisfied dependencies:
            service jboss.security.simple-security-manager (missing) dependents: [service jboss.ejb.utilities] 
            service jboss.security.subject-factory (missing) dependents: [service jboss.data-source.java:jboss/datasources/ExampleDS] 
      
      15:20:37,514 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
      15:20:37,514 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
      15:20:37,515 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.0.Alpha2-SNAPSHOT (WildFly Core 1.0.0.Alpha16) started (with errors) in 210ms - Started 191 of 403 services (4 services failed or missing dependencies, 241 services are lazy, passive or on-demand)
      

       

      java.lang.NoClassDefFoundError: org/wildfly/clustering/infinispan/spi/service/CacheContainerServiceName was thrown.

       

      I notice that subsystem infinispan version has been upgraded from "urn:jboss:domain:infinispan:2.0" to "urn:jboss:domain:infinispan:3.0". But the change does not relate to "local-cache". Since I can not find any new example to such configuration. I am not sure if there is a bug or I just miss part of configuration.