title: WildFly 18 deployment fails for (.ear) deployment file size more than 2GB
body: <p>I am trying to deploy the EAR file which has a size of more than 2GB in the WildFly 18 domain master server using jboss-cli.bat.</p>
  <pre><code>deploy deployment.ear --server-groups=server-group-app
  </code></pre>
  <p>The outcome of the deploy command shows success but the content file creates inside the domain/data/[hexcode] folder after deploy command has 0KB size.</p>
  <p><a href="https://i.stack.imgur.com/3EXlW.png" rel="nofollow noreferrer">Size of the content file becomes 0kb after deployment</a></p>
  <p>And the same EAR file when I try to deploy using master management console running on 9990 port, it also deploys successfully and the content file creates inside domain/data/[hexcode] folder has actual deployment size which is more than 2GB</p>
  <p><a href="https://i.stack.imgur.com/aDuel.png" rel="nofollow noreferrer">Size of content file same as EAR file after deployment through management console</a></p>
  <p>But it gives the following error on slave server startup in slave's host-controller.log file</p>
  <pre><code>2021-03-12 15:57:15,143 ERROR [org.jboss.as.controller.management-operation] (Host Controller Service Threads - 4) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ([
      (&quot;server-group&quot; =&gt; &quot;server-group-app&quot;),
      (&quot;deployment&quot; =&gt; &quot;deployment.ear&quot;)
  ]): java.lang.RuntimeException: WFLYHC0057: Failed to get file from remote repository
      at org.jboss.as.host.controller.RemoteDomainConnectionService$5.getFile(RemoteDomainConnectionService.java:813)
      at org.jboss.as.host.controller.RemoteDomainConnectionService$RemoteFileRepository.getFile(RemoteDomainConnectionService.java:790)
      at org.jboss.as.host.controller.RemoteDomainConnectionService$RemoteFileRepository.getDeploymentRoot(RemoteDomainConnectionService.java:784)
      at org.jboss.as.host.controller.RemoteDomainConnectionService$RemoteFileRepository.getDeploymentFiles(RemoteDomainConnectionService.java:776)
      at org.jboss.as.domain.controller.operations.deployment.ServerGroupDeploymentAddHandler.execute(ServerGroupDeploymentAddHandler.java:78)
      at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
      at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
      at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
      at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1413)
      at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
      at org.jboss.as.controller.AbstractControllerService.internalExecute(AbstractControllerService.java:494)
      at org.jboss.as.host.controller.DomainModelControllerService.access$1100(DomainModelControllerService.java:202)
      at org.jboss.as.host.controller.DomainModelControllerService$InternalExecutor$1.lambda$apply$0(DomainModelControllerService.java:1416)
      at org.jboss.as.controller.access.InVmAccess.runInVm(InVmAccess.java:63)
      at org.jboss.as.host.controller.DomainModelControllerService$InternalExecutor$1.apply(DomainModelControllerService.java:1416)
      at org.jboss.as.host.controller.DomainModelControllerService$InternalExecutor$1.apply(DomainModelControllerService.java:1413)
      at org.jboss.as.host.controller.SecurityActions$Execution$1.execute(SecurityActions.java:77)
      at org.jboss.as.host.controller.SecurityActions.privilegedExecution(SecurityActions.java:47)
      at org.jboss.as.host.controller.DomainModelControllerService$InternalExecutor.execute(DomainModelControllerService.java:1419)
      at org.jboss.as.host.controller.RemoteDomainConnectionService.applyRemoteDomainModel(RemoteDomainConnectionService.java:603)
      at org.jboss.as.host.controller.RemoteDomainConnectionService.access$1200(RemoteDomainConnectionService.java:138)
      at org.jboss.as.host.controller.RemoteDomainConnectionService$3.applyDomainModel(RemoteDomainConnectionService.java:546)
      at org.jboss.as.host.controller.RemoteDomainConnection.applyDomainModel(RemoteDomainConnection.java:325)
      at org.jboss.as.host.controller.RemoteDomainConnection$RegisterSubsystemsRequest$1.execute(RemoteDomainConnection.java:468)
      at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
      at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
      at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      at java.lang.Thread.run(Thread.java:748)
      at org.jboss.threads.JBossThread.run(JBossThread.java:485)
  Caused by: java.util.concurrent.ExecutionException: JBTHR00005: Operation failed
      at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:253)
      at org.jboss.as.host.controller.RemoteDomainConnectionService$5.getFile(RemoteDomainConnectionService.java:811)
      ... 31 more
  Caused by: java.lang.IndexOutOfBoundsException
      at java.io.DataInputStream.readFully(DataInputStream.java:192)
      at org.jboss.as.repository.RemoteFileRequestAndHandler.handleResponse(RemoteFileRequestAndHandler.java:109)
      at org.jboss.as.host.controller.RemoteDomainConnectionService$GetFileRequest.handleRequest(RemoteDomainConnectionService.java:747)
      at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:321)
      at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleRequest(AbstractMessageHandler.java:286)
      at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:234)
      at org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleMessage(ManagementChannelReceiver.java:85)
      at org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
      at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:991)
      at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      at java.lang.Thread.run(Thread.java:748)
  
  2021-03-12 15:57:15,159 ERROR [org.jboss.as.host.controller] (Host Controller Service Threads - 4) WFLYHC0143: Failed to apply domain-wide configuration from master host controller. Operation outcome: failed. Failure description {&quot;WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:&quot; =&gt; {&quot;Operation step-416&quot; =&gt; &quot;WFLYCTL0158: Operation handler failed: java.lang.RuntimeException: WFLYHC0057: Failed to get file from remote repository&quot;}}
  </code></pre>
  <p>So, is there a way with which I'll be able to deploy my EAR deployment file which has a size of more than 2GB in WildFly 18 domain master server using jboss-cli.bat?</p>
  <p>Thanks in advance...</p>