tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zach Romans <Zach.Rom...@Sun.COM>
Subject problems after adding address attribute to HTTP Connector
Date Thu, 10 Nov 2005 00:48:25 GMT
Hello,

I am trying to configure Tomcat 5.5.12 to listen on only one of numerous
configured IP addresses.  This is in a Solaris 9/SunCluster 3.1 environment,
with JRE from the 1.5.0_04 JDK.

The problems that I'm having occur after I add an address="129.159.46.210"
attribute to the non-SSL HTTP/1.1 Connector.  There are two distinct problems,
though there seems to be something in common between them.

The first problem is the appearance of the following messages in the
catalina.out when I 'catalina.sh stop':

> Nov 9, 2005 10:30:16 PM org.apache.coyote.http11.Http11BaseProtocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-lsutdmstst%2F129.159.46.210-8080
> Nov 9, 2005 10:30:16 PM org.apache.tomcat.util.net.PoolTcpEndpoint processSocket
> SEVERE: Socket error caused by remote host /129.159.46.181
> java.net.SocketException: Invalid argument
>         at java.net.PlainSocketImpl.socketSetOption(Native Method)
>         at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:264)
>         at java.net.Socket.setTcpNoDelay(Socket.java:826)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.setSocketOptions(PoolTcpEndpoint.java:503)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:515)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> Nov 9, 2005 10:30:17 PM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Nov 9, 2005 10:30:17 PM org.apache.coyote.http11.Http11BaseProtocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-lsutdmstst%2F129.159.46.210-8080

The 'problem' is [obviously] the socket error, but I'm not certain this is
actually a problem as the Catalina service still stops.  Even if it is not a
'problem', I still would like to understand the nature of the message.

Can anyone please explain?

Additionally, a curious thing that I've noticed in looking at the catalina.out
file is that when the Coyote connector is init'd and start'd, the INFO
messages say:

> Nov 9, 2005 10:28:19 PM org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-129.159.46.210-8080
[...]
> Nov 9, 2005 10:28:22 PM org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-129.159.46.210-8080

but the pause and stop messages mention
'http-lsutdmstst%2F129.159.46.210-8080'.  'lsutdmstst' is the name on the A
record for 129.159.46.210, but appears nowhere in the server.xml file, and
enableLookups is set to false for the connector.

So where is the "lsutdmstst%2F" coming from, and why is it only shown on the
pause and stop methods, not the init and start methods?

----

The second problem is that I get an "HTTP Status 500 - Error retrieving
attribute address" from the Admin app. when I select the "Connector (8080)"
item in the left-hand frame.  Here's the corresponding entries in the
admin.<date>.log file:

> Nov 9, 2005 10:39:35 PM org.apache.catalina.core.ApplicationContext log
> INFO: action: Entered TreeControlTestAction:perform()
> Nov 9, 2005 10:39:35 PM org.apache.catalina.core.ApplicationContext log
> INFO: action: tree param is null
> Nov 9, 2005 10:39:35 PM org.apache.catalina.core.ApplicationContext log
> INFO: action: Select event on Catalina:type=Connector,port=8009,address=129.159.46.210
> Nov 9, 2005 10:39:41 PM org.apache.catalina.core.ApplicationContext log
> INFO: action: Entered TreeControlTestAction:perform()
> Nov 9, 2005 10:39:41 PM org.apache.catalina.core.ApplicationContext log
> INFO: action: tree param is null
> Nov 9, 2005 10:39:41 PM org.apache.catalina.core.ApplicationContext log
> INFO: action: Select event on Catalina:type=Connector,port=8080,address=%2F129.159.46.210
> Nov 9, 2005 10:39:41 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: action: Error retrieving attribute address
> java.lang.ClassCastException: java.net.Inet4Address
>         at org.apache.webapp.admin.connector.EditConnectorAction.execute(EditConnectorAction.java:173)
>         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
[...]

You can also see from this the log entry when I selected the "Connector
(8009)" item, which also has the address="129.159.46.210" attribute... but
displays no problem!

So why can the AJP Connector (with a specified IP) be displayed in the Admin
App., but not the HTTP connector?

----

All of this is with an as-bundled in the 5.5.12 Core binary distribution
.tar.gz server.xml file, with only an 'address="129.159.46.210"' attribute
added to both the non-SSL HTTP/1.1 and the AJP 1.3 Connectors.

The thing that appears to be common is the '%2F' (HEX code for /) preceding
the IP address in the "name" of the Coyote connector in the catalina.out file
and the %2F again the admin log file.

I've downloaded and exploded the 5.5.12 Core and Admin. App. binary
distributions, and before modifying anything in the server.xml set appropriate
values for CATALINA_HOME and JAVA_HOME and ran '$CATALINA_HOME/bin/catalina.sh
start'.  I verified functionality of the Admin app. by selecting every
selectable item and expanding every tree object in the left-hand frame,
verified the manager app. by deploying/stopping/restarting/undeploying an one
of our webapps.  Only non-INFO messages in any of the log files were:

> Nov 9, 2005 10:05:33 PM org.apache.struts.action.RequestProcessor processMapping
> SEVERE: Invalid path /login was requested
> Nov 9, 2005 10:05:38 PM org.apache.struts.action.RequestProcessor processMapping
> SEVERE: Invalid path /frameset was requested

which was when I first hit the /admin app.  I then shutdown with 'catalina.sh
stop' and edited the default server.xml, adding an:

address="129.159.46.210"

attribute to both the non-SSL HTTP/1.1 and the AJP 1.3 Connectors, started
tomcat, and that is where the above described problems begin!

aTdHvAaNnKcSe

- z

-- 
Zach Romans - Test Engineer IV                            Zach.Romans@sun.com
WWOPS/Test Infrastructure Engineering            ("desk") x30913/503-345-9313
Sun Microsystems, Inc
./.*                 "It's a hash of a hash of an array of hashes of arrays!"



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message