tomcat - 从 NetBeans 在 tomcat 上部署应用程序时出现 HTTP 错误 503?

标签 tomcat netbeans

我将 MacBook 上的 NetBeans 从 7.3 更新到 7.4。
在更新之前,一切正常,但在安装 NetBeans 7.4 之后,当我尝试在 tomcat 上部署 Web 应用程序时,出现以下错误:

ant -f "/Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan" "-Dbrowser.context=/Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan" -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true -Dnb.internal.action.name=run run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at /Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan/build/web
Deployment is in progress...
deploy?config=file%3A%2Fvar%2Ftmp%2Fcontext7415672549510654952.xml&path=/Swan
Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ftmp%2Fcontext7415672549510654952.xml&path=/Swan
/Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan/nbproject/build-impl.xml:1087: The module has not been deployed.
See the server log for details.  

下面是build-impl.xml1087行的代码:

<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>  

当我看到服务器日志时,没有任何可用信息!但我在 localhost_access_log 文件中看到以下内容:

127.0.0.1 - - [15/Jan/2014:17:21:48 +0500] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - - [15/Jan/2014:17:21:48 +0500] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - - [15/Jan/2014:17:21:49 +0500] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -

任何帮助将不胜感激。提前致谢!

编辑:
以下是尝试在 tomcat

上部署应用程序时的 IDE 日志
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4112527509427233412.xml&path=/Swan
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4112527509427233412.xml&path=/Swan
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4112527509427233412.xml&path=/Swan
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:238)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/list
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:394)
    at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:649)
    at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:460)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:420)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:457)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:172)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:607)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:225)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/list
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:394)
    at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:649)
    at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:460)
    at org.netbeans.modules.tomcat5.ide.TMIDResolver.lookupTargetModuleID(TMIDResolver.java:81)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:351)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:324)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:496)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:172)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:607)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:225)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4761508169495242621.xml&path=/Swan
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4761508169495242621.xml&path=/Swan
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4761508169495242621.xml&path=/Swan
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:238)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

最佳答案

经过将近 2 天的研究,我终于让它工作了!
看来问题出在代理设置上!
我的办公室网络被代理,Netbeans 的 代理设置被设置为:使用系统代理设置
但是当我将它设置为 No Proxy 时,它开始正常工作并且我能够直接从 NetBeanstomcat 上部署 Web 应用程序!

关于tomcat - 从 NetBeans 在 tomcat 上部署应用程序时出现 HTTP 错误 503?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21137287/

相关文章:

java - Log4j2 AsyncAppender 线程不会死在 tomcat 取消部署导致内存泄漏

Tomcat 7 和 shared.loader 问题

java - 先前建立的随机数(java)

java - 从 Netbeans 6.5 升级到 Netbeans 6.7 后运行单元测试时出现问题

java - 未找到 Conexion 类

java - 具有简单数据库查询的 JPA 实体与 EntityManager

java - Netbeans/Maven/Tomcat 部署到 Tomcat 中的 webapps/ROOT?

apache - 在同一台服务器上运行 servlet 和 cgi/php 脚本

java - VelocityEngine 不解析模板 [在 struts 中]

java - 多个 Tomcat validator 阀