JBoss AS 7.1.1 Remote Deploy using Maven plugin - Authentication failed
luigi.banzato Mar 9, 2014 11:28 AMHello everyone,
I'm kinda new to JBoss, so forgive me if this is a silly question. But I've been doing research on this for the past week and I didn't find any solution that applied to my problem anywhere.
I'm trying to use the Maven JBoss Plugin to deploy a war file from a CI Server into a JBoss 7.1.1 standalone instance sitting in a different server.
Here's part of the pom.xml with the plugin configuration:
<plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.5.Final</version> <configuration> <hostname>192.168.1.40</hostname> <port>4447</port> <name>appuser</name> <password>appuserpassword</password> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin>
However, when executing the deploy goal, I get the error:
[INFO] --- jboss-as-maven-plugin:7.5.Final:deploy (default) @ my-project ---
[INFO] XNIO Version 3.0.7.GA[INFO] XNIO NIO Implementation Version 3.0.7.GA
[INFO] JBoss Remoting version 3.2.12.GA
Authenticating against security realm: ApplicationRealm
[ERROR] JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:16.886s
[INFO] Finished at: Sun Mar 09 14:10:06 UTC 2014
[INFO] Final Memory: 13M/33M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:deploy (default) on project my-project: Could not execute goal deploy on /var/lib/jenkins/jobs/BuildAndDeployWebApp/workspace/target/my-project.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012174: Could not connect to remote://192.168.1.40:4447. The connection failed: Authentication failed: all available authentication mechanisms failed
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:deploy (default) on project my-project: Could not execute goal deploy on /var/lib/jenkins/jobs/BuildAndDeployWebApp/workspace/target/my-project.war. Reason: I/O Error could not execute operation '{"operation" => "read-attribute",
"address" => [],
"name" => "launch-type"
}'
I'm sure the server is running and listening to that address, because if I open http://192.168.1.40:9990 I'm able to access the admin interface.
Also, here are relevant pieces from my standalone.xml:
<subsystem xmlns="urn:jboss:domain:jmx:1.1"> <show-model value="true"/> <remoting-connector/> </subsystem> <subsystem xmlns="urn:jboss:domain:remoting:1.1"> <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/> </subsystem> <interface name="any"> <any-address/> </interface> <socket-binding name="remoting" interface="any" port="4447"/>
I did add the user "appuser" to the ApplicationRealm through the "add-user.sh" script, and I even double checked the configuration file to see if it is there:
$JBOSS_HOME/standalone/configuration/application-users.properties
Does anyone have any clue?