2013-04-22 94 views
3

我已經建立了一個新的JBoss服務器,並且能夠使用'jboss-cli.bat'遠程訪問它。然而,當我的Hudson作業運行並嘗試使用jboss-as-maven-plugin將服務部署到服務器時,它將被拒絕訪問並出現以下錯誤;JBOSS-AS-MAVEN-PLUGIN: - 身份驗證失敗但是Jboss-cli身份驗證?

ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

我在跑步;

  • 的Windows Server 2008 R2
  • JBoss AS中7.1.1.Final
  • 哈德森3.0.0
  • 的Tomcat 7.0.35
  • JBoss的AS-Maven的插件7.4.Final

我的POM包含;

<plugin> 
    <groupId>org.jboss.as.plugins</groupId> 
    <artifactId>jboss-as-maven-plugin</artifactId> 
    <version>7.4.Final</version> 
    <executions> 
    <execution> 
     <id>Dev_Deploy</id> 
     <phase>install</phase> 
     <goals> 
     <goal>deploy</goal> 
     </goals> 
     <configuration> 
     <force>true</force> 
     <hostname>??.??.??.??</hostname> 
     <port>9999</port> 
     <name>admin</name> 
     <password>password</password> 
     </configuration> 
    </execution> 
    </executions> 
</plugin> 

我的standalone.xml包含;

<interfaces> 
    <interface name="ManagementRealm"> 
     <any-ipv4-address/> 
    </interface> 
    <interface name="management"> 
     <any-ipv4-address/> 
    </interface> 
    <interface name="public"> 
     <any-ipv4-address/> 
    </interface> 
    <interface name="unsecure"> 
     <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> 
    </interface> 
</interfaces> 

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> 
    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/> 
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:902}"/> 
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/> 
    <socket-binding name="ajp" port="8009"/> 
    <socket-binding name="http" port="8080"/> 
    <socket-binding name="https" port="443"/> 
    <socket-binding name="osgi-http" interface="management" port="8090"/> 
    <socket-binding name="remoting" port="4447"/> 
    <socket-binding name="txn-recovery-environment" port="4712"/> 
    <socket-binding name="txn-status-manager" port="4713"/> 
    <outbound-socket-binding name="mail-smtp"> 
     <remote-destination host="localhost" port="25"/> 
    </outbound-socket-binding> 
</socket-binding-group> 

有人能幫我解決這個問題嗎? 非常感謝,

斯圖爾特

回答

1

關於到jboss-as:deploy,它提到如下所示: -

name String pecifies the name used for the deployment.

username String - Specifies the username to use if prompted to authenticate by the server. If no username is specified and the server requests authentication the user will be prompted to supply the username, User property is: jboss-as.username .

那麼你的插件配置應該使用username而不是如下面的例子。

<plugin> 
    <groupId>org.jboss.as.plugins</groupId> 
    <artifactId>jboss-as-maven-plugin</artifactId> 
    <version>7.4.Final</version> 
    <executions> 
    <execution> 
     <id>Dev_Deploy</id> 
     <phase>install</phase> 
     <goals> 
     <goal>deploy</goal> 
     </goals> 
     <configuration> 
     <force>true</force> 
     <hostname>??.??.??.??</hostname> 
     <port>9999</port> 
     <username>admin</username> <!-- <----Change here --> 
     <password>password</password> 
     </configuration> 
    </execution> 
    </executions> 
</plugin> 

我希望這可以幫助。

+0

嗨Charlee, 它看起來像這個網站已完全導致我的頭問題!看看[這個網站],它似乎建議用於傳遞用戶名進行身份驗證。我是多麼愚蠢的把MasterTheBoss當作福音。 非常感謝, Stuart – 2013-04-23 08:27:46