You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Cui, Ping" <Pi...@atosorigin.com> on 2001/12/19 20:01:07 UTC

Apache/Catalina Problem:java.lang.IllegalArgumentException: addCh ild: Child name 'myhostname' is not unique

Hello folks:

       I ran into an Apache/Catalina problem and need help.

       I was trying to set up Apache 1.3.22 and Catalina 4.0.1. Intitially
everything seemed fine and I could test all
the examples. Then, when I checked Catalina log file
"apache_log.2001-12-19.txt" and found Catalina kept generating following
messages 
and eventually it filled up the entire disk.

2001-12-19 11:52:01
[org.apache.catalina.connector.warp.WarpConfigurationHandler] 
java.lang.IllegalArgumentException: addChild:  Child name 'myhostname' is
not unique
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
	at
org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:265)
	at
org.apache.catalina.connector.warp.WarpConfigurationHandler.deploy(WarpConfi
gurationHandler.java:268)
	at
org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(WarpConfi
gurationHandler.java:117)
	at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:18
9)
	at java.lang.Thread.run(Thread.java:484)



     When I replicated all the related directories (apache, catalina, j2se)
to a different machine, everything worked fine. There were no error message
generated. 

	I know it appears to be a problem related to an specific machine.
But I've tried real hard to find any possible reason causing this problem
and had no luck. The machine is a Solaris 5.8 server and I am running Oracle
and other applications on the machine and worked fine. I am using
J2SE java version "1.3.1_01". I applied all required Solaris 5.8 patches.


         Could anyone enlightened me about this problem?

        Thanks a lot!!


Ping Cui

Atos Origin

Re: Apache/Catalina Problem:java.lang.IllegalArgumentException: addChild: Child name 'myhostname' is not unique

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> Hello folks:
> 
>        I ran into an Apache/Catalina problem and need help.
> 
>        I was trying to set up Apache 1.3.22 and Catalina 4.0.1. Intitially
> everything seemed fine and I could test all
> the examples. Then, when I checked Catalina log file
> "apache_log.2001-12-19.txt" and found Catalina kept generating following
> messages 
> and eventually it filled up the entire disk.
> 
> 2001-12-19 11:52:01
> [org.apache.catalina.connector.warp.WarpConfigurationHandler] 
> java.lang.IllegalArgumentException: addChild:  Child name 'myhostname' is
> not unique
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)

I have the same problem and I think it all began when I introduced virtual hosts in Tomcat. But if you say that you replicated all relevant files to another machine, then it can't be anything from Tomcat's configuration.

Digging through sources gave this result:

- Apache process/thread tries to connect
- It hits Tomcat and gets handled by methods in warp.jar
- The method for handling initial Warp connection recieves a "registration" from Apache
- That "registration" contains Apache's virtual host name (or ServerName)
- The method tries to register this connection in the Container
- It synchronizes on the Container object, checks to see if there is such a child
- If not, it registeres it with "addChild"

This is where things go wrong, because addChild runs into that particular child and fires the exception.

>      When I replicated all the related directories (apache, catalina, j2se)
> to a different machine, everything worked fine. There were no error message
> generated.

I have tried it on two of my Digital UNIX machines, same error.

Nix.