jbossas / jboss-as-maven-plugin

Maven plugin to deploy applications to JBoss AS 7 (moved to https://github.com/wildfly/wildfly-maven-plugin)
74 stars 69 forks source link

deployment to a remote server hangs #18

Closed alexk82 closed 11 years ago

alexk82 commented 12 years ago

Hi!

I'm trying to use the jboss-as-maven-plugin to deploy a war to a remote server, but the plugin just hangs after/at the realm authentication. It happens with following setup:

My dev-box running is Fedora 16 and the Oracle JDK 1.7.0_03. The development server is running CentOS 5.8 Oracle JDK 1.7.0_03.

A jBoss AS 7.1.1 runs on both machines. These are two plain jBoss installations: just extracted the downloaded package and added a management user using the add-user.sh script.

To demonstrate the problem, I've created a test project using a archetype:

mvn archetype:generate -DarchetypeGroupId=org.jboss.spec.archetypes -DarchetypeArtifactId=jboss-javaee6-webapp-archetype -DgroupId=com.example -DartifactId=deploymentTest

Now I try to deploy this project to my local dev machine:

mvn clean package jboss-as:deploy

Everything seems works perfectly.

Now I try to deploy to the remote server (started with ./bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0 ):

mvn clean package jboss-as:deploy -Ddeploy.hostname=dev.example.com

But this command just hangs after it asked for the username and password:

[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ deploymentTest ---
[INFO] Packaging webapp
[INFO] Assembling webapp [deploymentTest] in [/home/alex/dev/comp/deploymentTest/target/deploymentTest]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/alex/dev/comp/deploymentTest/src/main/webapp]
[INFO] Webapp assembled in [36 msecs]
[INFO] Building war: /home/alex/dev/comp/deploymentTest/target/deploymentTest.war
[INFO] 
[INFO] --- jboss-as-maven-plugin:7.1.1.Final:deploy (default-cli) @ deploymentTest ---
May 7, 2012 5:22:47 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
May 7, 2012 5:22:47 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
May 7, 2012 5:22:47 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Authenticating against security realm: ManagementRealm
Username:admin
Password:

There is nothing logged on the server side, only after I interrupt the deployment I get following error message:

17:22:43,627 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 4074ms - Started 133 of 208 services (74 services are passive or on-demand)
17:24:18,108 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014612: Operation ("add") failed - address: ([("deployment" => "deploymentTest.war")]): java.lang.RuntimeException: JBAS014761: Thread was interrupted waiting to read attachment input stream from remote caller
    at org.jboss.as.controller.remote.OperationAttachmentsProxy$ProxiedInputStream.read(OperationAttachmentsProxy.java:111) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at java.io.InputStream.read(InputStream.java:170) [rt.jar:1.7.0_03]
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:273) [rt.jar:1.7.0_03]
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334) [rt.jar:1.7.0_03]
    at java.io.FilterInputStream.read(FilterInputStream.java:107) [rt.jar:1.7.0_03]
    at org.jboss.as.repository.ContentRepository$Factory$ContentRepositoryImpl.addContent(ContentRepository.java:150)
    at org.jboss.as.server.deployment.DeploymentAddHandler.addFromContentAdditionParameter(DeploymentAddHandler.java:191)
    at org.jboss.as.server.deployment.DeploymentAddHandler.execute(DeploymentAddHandler.java:147)
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.CompositeOperationHandler.execute(CompositeOperationHandler.java:85) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:466) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

The server is reachable from my machine, at least I can reach port 8080 and 9990 from the webbrowser, and also a telnet to 9999 works.

cheers, Alex

jamezp commented 12 years ago

This seems to only be an issue when the client is running on Java 7. A temporary workaround would be to use Java 6 when deploying remotely.

richmidwinter commented 12 years ago

I get the same issue on Java 1.6.0_33.

ezrarze commented 12 years ago

I have same problem. We are using Java 7, but tried a couple versions of Java 6 for the client, but it still hangs.

pkilian commented 12 years ago

I have a similar problem, but with a local Server in Version jboss-as-7.2.0.Alpha1-SNAPSHOT. I use the deploy-artefact goal to deplyoy the the OSGi Bundle Apache Commons Logging provided by SpringSource.

jamezp commented 11 years ago

Closing as I believe this has been resolved.