This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231220 - Failure when trying to start external Tomcat
Summary: Failure when trying to start external Tomcat
Status: RESOLVED INCOMPLETE
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 8.0.2
Hardware: PC Windows 8.1 x64
: P1 normal with 2 votes (vote)
Assignee: Petr Hejl
URL: localhost:8091/WebApplication12/T42cd...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-13 13:58 UTC by host
Modified: 2016-07-14 18:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: Deployment error: Starting of Tomcat failed. See the server log for details.


Attachments
log window (63.76 KB, image/png)
2013-06-13 13:58 UTC, host
Details
failed start (20.04 KB, image/png)
2013-06-13 13:59 UTC, host
Details
New Failure (55.19 KB, image/png)
2013-07-22 11:57 UTC, host
Details

Note You need to log in before you can comment on or make changes to this bug.
Description host 2013-06-13 13:58:38 UTC
Created attachment 135758 [details]
log window

I downloaded and (cleanly) installed the latest daily development build of the NetBeans SE bundle and then downloaded and activated the JavaEE plugin(s) within NetBeans.
Now I added an external Apache Tomcat 7.0.41 to the Servers with an new/empty Catalina base as private configuration folder. 

When I then try to start the server I get an unsuspicious log but albeit the log says "Server startup in 1248 ms" NetBeans still says it is starting the server.

After a while I get the error message that starting Tomcat failed but when I check in the browser "http://localhost:8080" then I correctly get the Tomcat "start screen".
In the log files of the server there is no exception to be found but only the failure of the start can be seen in the NetBeans logs.

To check things further, I have started Tomcat both on the command line as well as from within IntelliJ (with a separate clean Tomcat configuration directory) but everything works as expected there.

(As a side note I must say that I never had experienced such a behavior with any previous NetBeans and Tomcat versions.)
Comment 1 host 2013-06-13 13:59:53 UTC
Created attachment 135759 [details]
failed start
Comment 2 host 2013-06-13 14:00:47 UTC
Here is the log message from NetBeans:

INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
org.netbeans.modules.j2ee.deployment.impl.ServerException: Starting of Tomcat failed.
        at org.netbeans.modules.j2ee.deployment.impl.ServerInstance._start(ServerInstance.java:1462)
        at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.startTarget(ServerInstance.java:1405)
        at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.startTarget(ServerInstance.java:1209)
        at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.start(ServerInstance.java:1087)
        at org.netbeans.modules.j2ee.deployment.impl.TargetServer.startTargets(TargetServer.java:549)
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:186)
        at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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)
Comment 3 Petr Hejl 2013-06-14 13:35:00 UTC
Works quite fine for me. From your description it looks like NB can't connect to tomcat. Might be a firewall issue.
Comment 4 host 2013-06-18 08:55:54 UTC
I can reproduce the given issue when I am trying to start Tomcat on port 8080. But if I run Tomcat on e.g. port 8081 or 8084 then the startup works fine, i.e. it terminates.

This behavior is the same for both the bundled as well as external Tomcat and occurs both when the OS X firewall is turned on and off (and I have no other firewall installed).

Can you please tell me your test settings? ...or some hint to debug this?
Comment 5 Petr Hejl 2013-07-03 13:30:06 UTC
That's really strange. Can you check that there is no other thing like some implicit Apache? I'm not an MacOS expert. Can you check also with netstat or some similar tool before and after tomcat start? Thanks.
Comment 6 Petr Hejl 2013-07-10 09:00:54 UTC
Awaiting user response.
Comment 7 host 2013-07-22 11:57:05 UTC
I can still get the same strange issue. ...and what I do is the following:

- First I check whether anything is running on port 8080 with "lsof -i :8080" and I get an empty response - thus port 8080 is free.

- Now, in NetBeans I start Tomcat from the services tab and check again with "lsof -i :8080" and get the following result 
java    11030 holger   54u  IPv6 0x86a5e183ba3c778b      0t0  TCP *:http-alt (LISTEN)

- In the Log windows within NetBeans, I get the message  
Jul 22, 2013 1:48:45 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3633 ms

- After some seconds, I get the error window again (see new screenshot)
Comment 8 host 2013-07-22 11:57:34 UTC
Created attachment 137550 [details]
New Failure
Comment 9 host 2013-07-22 18:26:45 UTC
BTW: If there is really something running on port 8080 and I try to run Tomcat then I get (correctly) the following error message in the log window:

Starting of Tomcat failed, the server port 8080 is already in use.
/Users/holger/Development/ObTiMA/nbproject/build-impl.xml:1192: Deployment error: Starting of Tomcat failed, the server port 8080 is already in use.
See the server log for details.
Comment 10 riktam 2014-08-16 21:36:24 UTC
Resolved - if it was the same issue as in my case:

Set "Option" / "General" / Proxy = NO,
and all works fine.

Maybe the tomcat ready-message was sent to the proxy - and never reached the IDE.
Comment 11 salvotop 2015-03-24 13:22:53 UTC
I have the same problem when I am trying to start Tomcat on port 8080. if I run Tomcat on e.g. port 8081 or 8084 then the startup works fine.
I use Osx Yosemite 10.10.2 (14C1514), Netbeans 8.0.2 latest build, tomcat 7.0.59 and/or 8.0.20.
Comment 12 salvotop 2015-03-24 13:23:53 UTC
"NO Proxy" settign not worked for me
Comment 13 netbeans-coder 2015-10-29 11:03:23 UTC
No Proxy setting not working for me either