Java Wildfly 部署失败:JBAS014671 和 WFLYCTL0080 - 访问被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34757567/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 15:57:10  来源:igfitidea点击:

Wildfly deploy failed: JBAS014671 and WFLYCTL0080 - Access is denied

javawindowsjakarta-eewildfly

提问by wcomnisky

We have deployed a WAR file to Wildfly using the Deployment Scanner ("deployments" folders). The web app works until the computer is rebooted - it fails when the web app is loaded by the server again. It's worth saying that we don't have this problem if the Wildfly service is restarted, it happens only when the whole OS is restarted. And if I just restart Wildfly, it works back again.

我们已使用部署扫描程序(“部署”文件夹)将 WAR 文件部署到 Wildfly。Web 应用程序在计算机重新启动之前一直工作 - 当服务器再次加载 Web 应用程序时它会失败。值得一提的是,如果重启Wildfly服务,我们就没有这个问题,只有在整个操作系统重启时才会发生。如果我只是重新启动 Wildfly,它会再次运行。

If I delete the failed file flag (healthsafety-server.war.failed) from the deployments folder, the application is successfully deployed after few seconds.

如果我从部署文件夹中删除失败的文件标志 (healthsafety-server.war.failed),应用程序将在几秒钟后成功部署。

If the deploy is being done through the Administrator console, it fails the first time. However, if the app is disabled and then enabled back again, it works too.

如果部署是通过管理员控制台完成的,则第一次失败。但是,如果应用程序被禁用然后又重新启用,它也可以工作。

We're running Wildfly 8.2.0 Final on Windows 10 Home (64bits English), but we tried Wildfly 9.0.2 Final too and we got the same behavior. We had the same problem on a different computer with Windows 8.1 64 bits Professional.

我们在 Windows 10 Home(64 位英文)上运行 Wildfly 8.2.0 Final,但我们也尝试了 Wildfly 9.0.2 Final,我们得到了相同的行为。我们在另一台装有 Windows 8.1 64 位专业版的计算机上遇到了同样的问题。

The Wildfly folder is placed on the "C:\" folder and full control has been provided to all users, including "everyone". These stepswere also applied but the issue persists.

Wildfly 文件夹位于“C:\”文件夹中,并且已向所有用户(包括“所有人”)提供完全控制权。也应用了这些步骤,但问题仍然存在。

This is the content from the healthsafety-server.war.failedfile on Wildfly 8.2.0 Final:

这是Wildfly 8.2.0 Finalhealthsafety -server.war.failed文件的内容:

"{\"JBAS014671: Failed services\" => {\"jboss.undertow.deployment.default-server.default-host./healthsafety-server\" => \"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./healthsafety-server: Failed to start service
    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-8.2.0.Final\\standalone\\tmp\\vfs\\temp\\tempea4e3edc0321f2c2\\healthsafety-server.war-4135c52d8f677a8a\\healthsafety-server.war-7794207299642458131.tmp (Access is denied)
    Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-8.2.0.Final\\standalone\\tmp\\vfs\\temp\\tempea4e3edc0321f2c2\\healthsafety-server.war-4135c52d8f677a8a\\healthsafety-server.war-7794207299642458131.tmp (Access is denied)
    Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-8.2.0.Final\\standalone\\tmp\\vfs\\temp\\tempea4e3edc0321f2c2\\healthsafety-server.war-4135c52d8f677a8a\\healthsafety-server.war-7794207299642458131.tmp (Access is denied)
    Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-8.2.0.Final\\standalone\\tmp\\vfs\\temp\\tempea4e3edc0321f2c2\\healthsafety-server.war-4135c52d8f677a8a\\healthsafety-server.war-7794207299642458131.tmp (Access is denied)
    Caused by: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-8.2.0.Final\\standalone\\tmp\\vfs\\temp\\tempea4e3edc0321f2c2\\healthsafety-server.war-4135c52d8f677a8a\\healthsafety-server.war-7794207299642458131.tmp (Access is denied)
    Caused by: java.io.FileNotFoundException: C:\\wildfly-8.2.0.Final\\standalone\\tmp\\vfs\\temp\\tempea4e3edc0321f2c2\\healthsafety-server.war-4135c52d8f677a8a\\healthsafety-server.war-7794207299642458131.tmp (Access is denied)\"}}"

and this is the content from the healthsafety-server.war.failedfile on Wildfly 9.0.2 Final:

这是Wildfly 9.0.2 Finalhealthsafety -server.war.failed文件的内容:

"{\"WFLYCTL0080: Failed services\" => {\"jboss.undertow.deployment.default-server.default-host./healthsafety-server\" => \"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./healthsafety-server: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)
    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)
    Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)
    Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)
    Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)
    Caused by: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)
    Caused by: java.io.FileNotFoundException: C:\\wildfly-9.0.2.Final\\standalone\\tmp\\vfs\\temp\\temp2bdea2bc34b5d6c1\\content-ed5f82fbe5807374\\content-4117938517180519169.tmp (Access is denied)\"}}"

Any help is appreciated.

任何帮助表示赞赏。

PS: cross-post on JBoss forums

PS:在 JBoss 论坛上交叉发帖

采纳答案by Jozsef Torsan

After upgrading from win7 to win10 I had the same issue. Issue seems to be caused by Windows Defender real-time protection. Solution was to exclude the {wildfly folder}\standalone\tmp\vfs folder in Defender. Hope it'll work for you, too.

从win7升级到win10后,我遇到了同样的问题。问题似乎是由 Windows Defender 实时保护引起的。解决方案是在 Defender 中排除 {wildfly 文件夹}\standalone\tmp\vfs 文件夹。希望它也对你有用。

回答by Joao Luiz Cadore

Please check another stackoverflow post: Wildfly fails to deploy application (FileNotFoundException - Access is Denied)

请查看另一篇 stackoverflow 帖子:Wildfly 无法部署应用程序 (FileNotFoundException - Access is Denied)

You have to remove these lines from your configuration (standalone.xml):

您必须从您的配置 (standalone.xml) 中删除这些行:

<extension module="org.jboss.as.jsf"/>

And

<subsystem xmlns="urn:jboss:domain:jsf:1.0"/>