3 Replies Latest reply on Oct 23, 2015 5:07 AM by mayerw01

    How to apply a change (using cli) without jboss restart

    jprasanna

      I am running few login module related commands through cli add() .

       

      It is successfully added in standalone-full.xml. But this is not getting reflected without jboss restart.

       

      I tried adding {allow-resource-service-restart=true} at the end of the command. But no luck.

       

      I tried to reload using 'reload' command, but I am getting the following exception and the whole application goes down :-(

       

      Caused by: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://localhost:9990. The connection failed

              at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:117)

              at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)

              at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)

              at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:204)

              at org.jboss.as.cli.impl.CLIModelControllerClient.getOrCreateChannel(CLIModelControllerClient.java:169)

              at org.jboss.as.cli.impl.CLIModelControllerClient$2.getChannel(CLIModelControllerClient.java:129)

              at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)

              at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)

              ... 13 more

      Caused by: java.net.ConnectException: Connection refused

              at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

              at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)

              at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)

              at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)

              at ...asynchronous invocation...(Unknown Source)

              at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)

              at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253)

              at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351)

              at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:339)

              at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:78)

              at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:109)

              ... 23 more

       

      I like to see the changes getting reflected without jboss restart.

       

      Am I doing something wrong? Please give me some solution or alternatives.

        • 1. Re: How to apply a change (using cli) without jboss restart
          mayerw01

          What is your JBoss/WildFly version and which Java and OS are you using?

          Can you also post your cli command as well as your standalone-full.xml?

          • 2. Re: How to apply a change (using cli) without jboss restart
            jprasanna

            I am using WildFly 8.2.0 and JDK Version is jdk1.8.0_45 and OS is CentOS Linux release 7.1.1503 (Core)

             

            My CLI Command is

             

            /subsystem=security/security-domain=SourceForge/authentication=classic/login-module=org.jboss.security.auth.spi.LdapExtLoginModule1:add(code=org.jboss.security.auth.spi.LdapExtLoginModule, flag=sufficient, module-options=[ "java.naming.provider.url" => "ldap://10.2.10.10:389/", "java.naming.referral" => "follow", "java.naming.factory.initial" => "com.sun.jndi.ldap.LdapCtxFactory", "java.naming.security.authentication" => "simple", "bindDN" => "cn=testuser,cn=Users,dc=qalab,dc=corp,dc=collab,dc=net", "bindCredential" => "Collabnet1!", "baseCtxDN" => "cn=Users,dc=qalab,dc=corp,dc=collab,dc=net", "baseFilter" => "(sAMAccountName={0})", "roleAttributeID" => "memberOf", "roleAttributeIsDN" => "false", "rolesCtxDN" => "cn=Users,dc=qalab,dc=corp,dc=collab,dc=net", "roleFilter" => "(name={0})", "roleRecursion" => "-1", "searchTimeLimit" => "5000", "searchScope" => "SUBTREE_SCOPE", "allowEmptyPasswords" => "false", "throwValidateError" => "true" ]){allow-resource-service-restart=true}

             

            Please find the standalone-full.xml here as attachment

            • 3. Re: How to apply a change (using cli) without jboss restart
              mayerw01