Wildfly命令行部署失败



我能够在Eclipse中运行Wildfly快速启动中提供的大部分教程:

https://github.com/wildfly/quickstart/

然而,当我使用命令行进行部署时,我遇到了问题。对于最基本的HelloWorld教程,我收到了这样的消息:

mvn clean install

是成功的。然而,部署失败:

mvn clean install wildfly:deploy

错误消息:

打包Web应用程序[信息]在[/home/abigail/study/quickstart/helloworld/target/wardfly helloworld]中组装Web应用程序[wildfly helloworld[信息]正在处理战争项目[信息]正在复制webapp资源[/home/abigail/study/quickstart/helloworld/src/main/webapp][信息]在[2毫秒]内组装的Web应用程序[信息]建筑战争:/home/abigail/study/quickstart/helloworld/target/wildfly-helloworld.war[信息][信息]<lt<wildfly-maven插件:1.0.2.最终版本:deploy(默认cli)<包裹@wildfly helloworld<lt<[信息][信息]-wildfly maven插件:1.0.2.最终版本:deploy(默认cli)@wildfly helloworld---2015年12月19日下午11:42:10信息:XNIO版本3.2.2.Final2015年12月19日下午11:42:10信息:XNIO NIO实施版本3.2.2.Final2015年12月19日下午11:42:10 org.joss.remoting3.EndpointImpl信息:JBoss Remoting 4.0.3.Final版本[信息]------------------------------------------------------------------------[信息]构建失败
[信息]-------------------------------------------------------------------------
[信息]总时间:6.836秒
[信息]完成时间:2015-12-19T23:42:15-05:00
[信息]最终内存:21M/162M
[信息]-------------------------------------------------------------------------
[错误]无法执行目标org.wildfly。插件:wildfly maven插件:1.0.2。最终:在项目wildfly helloworld:无法在/home/abigail/study/quickstart/helloworld/target/wildfly-helloworld.war上执行目标部署。原因:I/O错误无法执行操作"{
[错误]"操作"=>"读取属性",
[错误]"address"=>[],
[错误]"name"=>"启动类型"
[错误]}':java.net.ConnectException:JBAS012144:无法连接到http-remoting://127.0.0.1:9990.连接超时
[错误]->[帮助1]
[错误]
[ERROR]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven
[错误]使用-X开关重新运行Maven以启用完整的调试日志记录
[错误]
[ERROR]有关错误和可能的解决方案的详细信息,请阅读以下文章:
[错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

您必须检查是否为部署创建了用户。请参阅本文中的进一步解释。

当其他应用程序使用默认的9990端口时,我也遇到了同样的问题。我将wildfly移动到port 9991(修改standalone.xmlhost.xml),管理控制台开始工作,但部署仍然失败。然后我发现wildfly plugin默认使用相同的9990。

我通过修改我的程序的pom.xml来处理这个问题,将另一个端口(与我在单机中使用的端口相同)放在wildfly插件的配置中。

    <plugin>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-maven-plugin</artifactId>
            <version>${version.wildfly.maven.plugin}</version>
             <configuration>
                <port>9991</port>
            </configuration>
    </plugin>

最新更新