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 41589 - Cannot work with tomcat shared server instance when http con. port is not set to the default value 8080
Summary: Cannot work with tomcat shared server instance when http con. port is not set...
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords: RELNOTE
: 46117 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-01 12:56 UTC by Marek Fukala
Modified: 2004-08-13 12:11 UTC (History)
2 users (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 Marek Fukala 2004-04-01 12:56:10 UTC
[nb3.6-rc1]
When an user adds a shared server instance of
tomcat5 server with http connector port *NOT* set
to the default value 8080 and an empty
CATALINA_BASE directory, then the IDE will not
recognize the http con. port number correctly and
tries to connect to the default value 8080. The
consequential problem is that the server instance
cannot be used in the IDE and of course the
deployment of webmodule do not work.

To reproduce:
1) install a tomcat5 server on your system
2) in the IDE add a new shared server installation
3) in the dialog set the $CATALINA_HOME to your
tomcat5 directory
4) set $CATALINA_BASE to an empty directory
5) try to start the server by the instance popup
menu action

As a part of the server start the IDE check
whether the $CB you have specified is correct and
in this case realizes that it is not (it's empty).
So it creates all necessary files there and modify
the http connector and server ports in the
$CB/conf/server.xml file according to the values
in $CH/conf/server.xml. So far so good. The
problem is that the IDE do not update the port
properties of the server instance. When you try to
start the server the IDE correctly runs the server
, but then tries to connect to the manager
application to get know whether the server has
been started or not. Unfortunatelly it tries to
connect to a wrong port!

I have tried to change the port property after the
first unsuccessful start of the server, but it's
not possible (at least on the Solaris9 machine, on
XP I couldn't change the port only sometime - I do
not understand what are the circumstances :-(  ) -
the value always returns to the default 8080. Note
that the property cannot be changed until there is
server.xml in your $CB directory (there is another
bug filled agains this).

I would be great if someone tried to follow the
scenario and check whether the property can be
changed or not in the described moment. If the
unchangeable property is only a local anomaly of
space around my desk it would be super. In that
case it would be a sufficient workaround.

Anyway I have found a 100% workaround which is
however quite obscure. You have to restart the IDE
and then change the property to the correct value.
The everything works.

IMO this case can be quite common on unixes, when
the system administrator changes the default port
and the users shares the server together. I am not
sure if this is really common scenario, so I am
hasitating to say that this is a showstopper. 

I would really appreciate if Ann or whoever else
knows more about our users express her/his
thoughts on this.
Comment 1 Pavel Buzek 2004-04-01 18:32:31 UTC
Here is a summary of evaluation that was done off-line:
We expect that most users who use external tomcat will not use shared
server installation. If so they will likely have the CATALINA_BASE
already pre populated. The issue needs to be fixed in promoD but given
that we consider this to be a corner case (in combination with port
different then 8080) I am asking for waiver for 3.6 release.
Comment 2 Chris Kutler 2004-04-07 00:28:27 UTC
RELNOTE Entry:

Problem: You must follow the "Adding a Tomcat Server" instructions in
the online help when you add a shared-installation server using the
Add New Server action. In particular, the base directory MUST have the
following subdirectories:

o conf
o logs
o webapps

In addition, the conf directory must have a server.xml file.

If try to use an empty base directory, and if you try to assign a
server port other than 8080, you will not be able to use the server
from the IDE. For example, you will not be able to execute web apps on
that server from the IDE. 

Workaround: Restart the IDE. Right-click the server instance and
choose Properties from the contextual menu. Change the server port
property to the correct server port.
Comment 3 Marek Fukala 2004-04-07 06:06:23 UTC
I would change the text of the last two paragraphs to following text:
If you try to add a shared server instance with an empty catalina base
directory together with having http connector port set to a value
other than 8080 in you catalina home, you will not be able to use the
server from the IDE. For example, you will not be able to execute web
apps on
that server from the IDE. 

Workaround: 
After adding the shared server instance restart the IDE. Then the http
connector port is supposed to be set to the right value and the server
can be used for deployment.
Comment 4 Patrick Keegan 2004-04-08 00:04:09 UTC
just a slight massage to Marek's wording of the last two paragraphs.
Please make sure I haven't distorted any meaning:

"If you try to add a shared server instance with an empty Catalina
base directory and you have an HTTP connector port set to a value
other than 8080 in your Catalina home, you will not be able to use the
server from the IDE. For example, you will not be able to execute web
apps on that server from the IDE. 

Workaround: 
After adding the shared server instance, restart the IDE. Then the
HTTP connector port should be set to the right value and the server
can be used for deployment.
Comment 5 Chris Kutler 2004-04-08 00:49:10 UTC
If people have not read any Tomcat docs, they might not know what
Catalina means (it is a code word). So, here is a suggested rewrite:

SUGGESTED RELNOTE:

Problem: You must follow the "Adding a Tomcat Server" instructions in
the online help when you add a shared-installation server using the
Add New Server action. In particular, the base directory MUST have the
following subdirectories:

o conf
o logs
o webapps

In addition, the conf directory must have a server.xml file.

If, when you use the wizard to add a server instance, you do all of
the following you will not be able to use the server from the IDE. For
example, you will not be able to execute web apps on that server from
the IDE. 

Invalid configuration in Add New Server wizard:

o Shared Installation check box selected
o Base Directory path pointing to an empty directory
o Server Port set to a value other than 8080,  

Workaround: If you have already created a server instance with this
configuration. Restart the IDE. Right-click the server instance,
choose Properties from the contextual menu, and make sure the server
port is set correctly.
Comment 6 Chris Kutler 2004-04-14 21:27:29 UTC
Another attempt. Marek, can you confirm that the server.xml entry is
the right one?

Description: If you try to add a shared server instance with an empty
Tomcat base directory and the server.xml file in the Tomcat home
directory sets the server port to a value other than 8080, you will
not be able to use the server from the IDE. For example, you will not
be able to execute web apps on that server from the IDE.

Here is an example of the server port being set to a value other than
8080:

<Connector acceptCount="100" connectionTimeout="20000" debug="0"
disableUploadTimeout="true" enableLookups="false" maxSpareThreads="75"
maxThreads="150" minSpareThreads="25" port="8081" redirectPort="8443"/> 

Workaround: If you have already created a server instance with this
configuration, restart the IDE. Right-click the server instance,
choose Properties from the contextual menu, and make sure the server
port is set correctly. 
Comment 7 Marek Fukala 2004-04-15 13:37:59 UTC
Thanks Chris, now the description of the workaround is OK. Thank you
for your effort very much!
Comment 8 Marek Fukala 2004-04-15 13:39:30 UTC
I wanted to write, that the description of the problem and workaround
is fine. I am sorry.
Comment 9 Sherold Dev 2004-07-28 15:39:36 UTC
*** Issue 46117 has been marked as a duplicate of this issue. ***
Comment 10 Sherold Dev 2004-07-28 17:01:51 UTC
Commit log:

Checking in TomcatInstall.java;
1/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/TomcatInstall.java,v
 <--  TomcatInstall.java
new revision: 1.21; previous revision: 1.20
done
Comment 11 Petr Blaha 2004-08-04 15:14:17 UTC
Build: 20040802