On Dec 29, 2013, at 10:51 AM, Nir A <n...@netomedia.com> wrote: > Hi, > > If i want to create a cluster of 2 tomcats: > > Tomcat1 - ip 111.111.111.111 > Tomcat2 - ip 222.222.222.222 > > > Where exactly the in the server.xml i should say that my cluster contains > both of these ips?
By default, you don't. If you'd rather do that, you can though. See my previous email to you regarding StaticMember configuration. > If you will take alook at my server.xml (which i copy pasted from the > tutorial) it looks like this: > > <?xml version='1.0' encoding='utf-8'?> > > <Server port="8105" shutdown="SHUTDOWN"> > > <Listener className="org.apache.catalina.core.AprLifecycleListener" > SSLEngine="on" /> > > <Listener className="org.apache.catalina.core.JasperListener" /> > > <Listener > className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> > <Listener > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> > <Listener > className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> > > <GlobalNamingResources> > > <Resource name="UserDatabase" auth="Container" > type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > </GlobalNamingResources> > > > <Service name="Catalina"> > > > <Connector port="8080" protocol="HTTP/1.1" > connectionTimeout="20000" > redirectPort="8443" /> > > <Connector port="8109" protocol="AJP/1.3" redirectPort="8443" /> > > > <Engine name="Catalina" defaultHost="localhost"> > <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"> > <Manager className="org.apache.catalina.ha.session.BackupManager" > expireSessionsOnShutdown="false" > notifyListenersOnReplication="true" > mapSendOptions="6"/> > </Cluster> > > <Realm className="org.apache.catalina.realm.LockOutRealm"> > <Realm className="org.apache.catalina.realm.UserDatabaseRealm" > resourceName="UserDatabase"/> > </Realm> > > <Host name="localhost" appBase="webapps" > unpackWARs="true" autoDeploy="true"> > > <Valve className="org.apache.catalina.valves.AccessLogValve" > directory="logs" > prefix="localhost_access_log." suffix=".txt" > pattern="%h %l %u %t "%r" %s %b" /> > > </Host> > </Engine> > </Service> > </Server> > > Again, It doesn't make sense to me that this configuration will work since > the ips (111.111.111.111 , and 222.222.222.222) are not in it. The Cluster tag adds some default options for you. See this link for more on the defaults. http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html#For_the_impatient Specifically look at the <Membership /> tag which defines the multicast service. This is how instances find each other by default. > Where exactly should i define them? Again, see my other note regarding StaticMember configuration. Dan > > Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org