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 38586 - test for isRunning needs to test -what- is running on the port
Summary: test for isRunning needs to test -what- is running on the port
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-09 17:39 UTC by Pavel Buzek
Modified: 2006-02-28 11:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Buzek 2004-01-09 17:39:14 UTC
currently it only tests that something responds,
so that if there is another type of server with
the same address/port (can easilly happen for S1AS
PE) it is wrong.
Comment 1 Pavel Buzek 2004-01-16 18:29:48 UTC
will try to fix for 3.6
Comment 2 Pavel Buzek 2005-02-19 03:48:56 UTC
manager/serverinfo gives an output like this:

OK - Server info
Tomcat Version: Apache Tomcat/5.5.4
OS Name: Windows XP
OS Version: 5.1
OS Architecture: x86
JVM Version: 1.5.0_01-b08
JVM Vendor: Sun Microsystems Inc.

Should be possible to check and display error; this would be very
useful in detecting port conflicts.
It would be worth checking what app server plugin does when tomcat
runs on the same port.
One more tip: add a note to plugin writer's docs in j2eeserver.
Comment 3 Sherold Dev 2005-08-02 15:46:49 UTC
Even more reliable way how to check the status would be to use the "list"
command. We would get a list like this:

OK - Listed applications for virtual host localhost
/manager:running:0:/opt/netbeans/enterprise2/jakarta-tomcat-5.5.7/server/webapps/manager
...

We could then compare the CATALINA_HOME directory with where the manager
application is deployed and CATALINA_BASE directory in case that there has been
already some web application deployed.

The problem with both of these solutions (list and serverinfo) occurs when there
are two Tomcat installations configured with the same port. In such case, when
we try to check the status of the not running Tomcat, an authentication dialog
will be displayed since we tried to pass the username and password of the not
running Tomcat, which naturally was not accepted by the Manager application of
the other - running - Tomcat. 

I suppose that none of these solutions would not help to improve user experience
and thus it doesn't make much sense to implement it. IMO, we will not be able to
improve this running check, unless we dropped the support for server started
outside the ide, which is not on the radar.

Pavel, Karel do you agree to close this as WONTFIX?
Comment 4 zikmund 2005-08-08 08:58:15 UTC
Failed authentication means that it is not (most probably) the right server. We
could supress authentication dialog in such case and try next server. Seems to
me still solvable (although probably more complicated).
Comment 5 Sherold Dev 2005-10-20 10:48:20 UTC
TM -> 5.0
Comment 6 Sherold Dev 2005-10-23 20:54:10 UTC
Running test now checks whether it is really Tomcat what is running on the given
port, the test is based on the http response headers. It is, however, still not
possible to distinguish between the two Tomcat instances.

F.

Checking in src/org/netbeans/modules/tomcat5/TomcatManager.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManager.java,v 
<--  TomcatManager.java
new revision: 1.80; previous revision: 1.79
done
Checking in src/org/netbeans/modules/tomcat5/TomcatManagerImpl.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/TomcatManagerImpl.java,v
 <--  TomcatManagerImpl.java
new revision: 1.44; previous revision: 1.43
done
Removing src/org/netbeans/modules/tomcat5/URLWait.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/URLWait.java,v  <-- 
URLWait.java
new revision: delete; previous revision: 1.5
done
Checking in src/org/netbeans/modules/tomcat5/ide/Bundle.properties;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.33; previous revision: 1.32
done
Checking in src/org/netbeans/modules/tomcat5/ide/StartTomcat.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/StartTomcat.java,v 
<--  StartTomcat.java
new revision: 1.79; previous revision: 1.78
done
Checking in src/org/netbeans/modules/tomcat5/nodes/TomcatWebModuleChildren.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/nodes/TomcatWebModuleChildren.java,v
 <--  TomcatWebModuleChildren.java
new revision: 1.10; previous revision: 1.9
done
Checking in src/org/netbeans/modules/tomcat5/util/Utils.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/Utils.java,v  <-- 
Utils.java
new revision: 1.4; previous revision: 1.3
done
Comment 7 Jaroslav Pospisil 2006-02-28 11:55:14 UTC
VERIFIED