2 Replies Latest reply on Feb 7, 2018 2:24 AM by lsmdt

    Failed to establish connection after jboss-cli restart

    justinmcmillan

      I am using the jboss-cli tools to restart my Wildfly using the following argument string:

      jboss-cli.sh --connect controller=myServer:port --user=user --password=password --command='shutdown --restart=true'

       

      It issues the restart, but then fails with the following error:

      Failed to establish connection in 6059ms: WFLYPRT0053: Could not connect to http-remoting://myServer:port. The connection failed: Connection refused

       

      It always throws this after 6 seconds.

       

      I have also tried adding '--timeout=30000' to the end of the command, and I still get the error -- I didn't really expect this to work as this is a connection refused error, not a timeout error. Does anyone have any ideas? It seems as though the controller is trying to re-connect before the restart operation has completed? This also only seems to be occurring on my Unix environments, running the same command against a Wildfly running on Windows works just fine.

       

      Some additional info:

       

      JBoss AS release: 1.0.2.Final "Kenny"

      JBoss AS product: WildFly Full 9.0.2.Final

      JAVA_HOME: null

      java.version: 1.8.0_111

      java.vm.vendor: Oracle Corporation

      java.vm.version: 25.111-b14

      os.name: SunOS

      os.version: 5.10

        • 1. Re: Failed to establish connection after jboss-cli restart
          ctomc

          why not just call command "reload"

          • 2. Re: Failed to establish connection after jboss-cli restart
            lsmdt

            Why not answer the question?

             

            The question was about the timeout not the intense of the call.

             

            I have the same question. I want to add a datasource using the CLI. I allways get a

             

            "Failed to establish connection in 8069ms"

             

            [standalone@172.17.17.2:9999 / #] run-batch

            The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error): {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0158: Operation handler failed: java.lang.SecurityException: WFLYSRV0228: Security Exception"}}

            [standalone@172.17.17.2:9999 / #]

            Failed to establish connection in 8069ms