Re: Session replication configuration file question

2013-12-30 Thread Nir A
Hi Daniel,
At last we managed to solve the replication issue. (not exactly a solution
but a workaround) :

the problem was:

The multicast tried to broadcast to local ip written in the hosts file
127.0.1.1
We had to write the actual ip adress in the hosts file

instead :

127.0.1.1 - Tomcat1

we changed to

tomcat1_ip_adress - Tomcat1


and the same on the tomcat 2 machine.

now it works.

thanks for your efforts.




On Sun, Dec 29, 2013 at 8:43 PM, Daniel Mikusa dmik...@gopivotal.comwrote:

 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=2
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 quot;%rquot; %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




Session replication configuration file question

2013-12-29 Thread Nir A
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?
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=2
   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 quot;%rquot; %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.
Where exactly should i define them?

Thanks


Re: Session replication configuration file question

2013-12-29 Thread Daniel Mikusa
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=2
   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 quot;%rquot; %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