Adding new server in zookeeper - apache

I am currently working with replicated servers in the same machine..for instance I am now working with 3 servers ...Now I want to add 2 more server ...How to add it dynamically
this is my zoo.cfg file
tickTime=2000
dataDir=F:\zookeeper
clientPort=2182
initLimit=5
syncLimit=2
server.1=localhost:2888:3888
server.2=localhost:2889:3889
server.3=localhost:2890:3890
Now I want to add two more servers dynamically

Since version 3.5.0, Zookeeper has a Dynamic Reconfiguration feature which allows servers to be added or removed and the entire process is orchestrated via Zookeeper itself. See https://zookeeper.apache.org/doc/r3.5.3-beta/zookeeperReconfig.html. From my experience, reconfiguring an ensemble on version 3.4.6 can get very strange.

server.4=localhost:2891:3891
server.5=localhost:2892:3892
Add above lines to your cfg file .
For details check : ..what is zookeeper port and its usage?

Related

How to add a separate Java option per instance in GlassFish Cluster (Glassfish 4)?

I have a cluster with 5 instances on Glassfish 4.
All are using the same configuration with the same Java options.
I want to add a Java option -Dcom.sun.management.jmxremote.port=**** for every instance in cluster, this means they all have to be different.
What is the best way to do that?
I can't move all instances to separate configurations,and I did not find any information about setting the parameters in instance system properties or instance properties.
Thank's for help!
The configuration for separate instances in cluster is the following.
1) Add a JVM option for the cluster configuration:
-Dcom.sun.management.jmxremote.port=${jmxremote.port}
2) Add an instance option at node properties:
jmxremote.port with your preferred prot number.
Save and restart instance.

I am not able to find error logs and traffic logs on apache zookeeper

I set up a zookeeper (version 3.4.6) for my solr5.4. my zoo.conf looks like this.I am not able to find error logs in /var/log or var/log/zookeeper. am I missing anything?
Thanks in advance
tickTime=2000
dataDir=/var/zookeeper/
dataLogDir=/var/log/
clientPort=2181
initLimit=5
syncLimit=2
server.1=0.0.0.0:2888:3888
server.2=h1:2888:3888
server.3=h2:2888:3888
ZooKeeper uses log4j for actual logging, so you have to see your log4j.properties. The way ZK is set up by default, you can also override some stuff via JVMs system properties, so you might need to check your startup script as well.
The properties in zoo.cfg (dataDir and dataLogDir) are used for ZK application data, like the transaction log, so don't confuse that with standard log4j logging.

File locking not aquired in master-slave cluster

I´m trying to configure a clúster of ActiveMQ (v.5.12.1) instances in master-slave using a shared file system.
Those instances are running in different servers using this configuration
<persistenceAdapter>
<kahaDB directory="/sharedDir/data/activemq/kahadb"/>
</persistenceAdapter>
The problem is that both instances start as master because lock file mechanism does¡t seem to be working.
I´ve made a test with 2 instances in the same server, and with this configuration it works as expected (2nd instance can´t acquire file lock and waits as slave).
We are using NFSv4 and mount properties are like this:
x.x.x.52:/mnt/data on /mnt/nfs type nfs4 (rw,relatime,vers=4.0,rsize=8192,wsize=8192,namlen=255,hard,proto=tcp,port=0,timeo=14,retrans=2,sec=sys,clientaddr=x.x.x.167,local_lock=none,addr=x.x.x.52)
bindfs on /sharedDir type fuse.bindfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other)
Thank you

Unable to configure Hazelcast clustering at openfire server

I am trying to setup Hazelcast cluster in my LAN. There are two open fire server openfire1 and openfire2 behind a HAProxy sharing a common db server.
I have installed and configured open fire and hazelcast on both. Now when I see from Openfire Admin Console in the clustering section: My openfire1 is not listing the other node in cluster. openfire2 also does not allow me to enable cluster,whenever I see the error I see following log:
2014.12.06 12:12:46 com.jivesoftware.util.cache.ClusteredCacheFactory - Failed to execute cluster task within 30 seconds
java.util.concurrent.TimeoutException
at com.hazelcast.spi.impl.InvocationImpl$InvocationFuture.resolveResponse(Invocati onImpl.java:466)
at com.hazelcast.spi.impl.InvocationImpl$InvocationFuture.get(InvocationImpl.java: 314)
at com.hazelcast.util.executor.DelegatingFuture.get(DelegatingFuture.java:66)
at com.jivesoftware.util.cache.ClusteredCacheFactory.doSynchronousClusterTask(Clus teredCacheFactory.java:334)
at org.jivesoftware.util.cache.CacheFactory.doSynchronousClusterTask(CacheFactory. java:586)
at org.jivesoftware.openfire.admin.system_002dclustering_jsp._jspService(system_00 2dclustering_jsp.java:123)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1359)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)
Plz tell me if i am doing something wrong ?
now i have overcome this problem only by using the correct version of hazlecast.jar corresponding to openfire 3.9.3 ;The Hazelcast plugin version corresponding to the Openfire release (3.9.3) is 1.2.0 .
Direct link to download : https://community.igniterealtime.org/external-link.jspa?url=http%3A%2F%2Fwww.igniterealtime.org%2Fprojects%2Fopenfire%2Fplugins-dev%2Fhazelcast.jar

Brisk TaskTracker not starting in a multi-node Brisk setup

I have a 3 node Brisk cluster (Briskv1.0_beta2). Cassandra is working fine (all three nodes see each other and data is balanced across the ring). I started the nodes with the brisk cassandra -t command. I cannot, however, run any Hive or Pig jobs. When I do, I get an exception saying that it cannot connect to the task tracker.
During the startup process, I see the following in the log:
TaskTracker.java (line 695) TaskTracker up at: localhost.localdomain/127.0.0.1:34928
A few lines later, however, I see this:
Retrying connect to server: localhost.localdomain/127.0.0.1:8012. Already tried 9 time(s).
INFO [TASK-TRACKER-INIT] RPC.java (line 321) Server at localhost.localdomain/127.0.0.1:8012 not available yet, Zzzzz...
Those lines are repeated non-stop as long as my cluster is running.
My cassandra.yaml file specifies the box IP (not 0.0.0.0 or localhost) as the listen_address and the rpc_address is set to 0.0.0.0
Why is the client attempting to connect to a different port than the log shows the task tracker as using? Is there anywhere these addresses/ports can be specified?
I figured this out. In case anyone else has the same issues, here's what was going on:
Brisk uses the first entry in the Cassandra cluster's seed list to pick the initial jobtracker. One of my nodes had 127.0.0.1 in the seed list. This worked for the Cassandra setup since all the other nodes in the cluster connected to that box to get the cluster topology but this didn't work for the job tracker selection.
looks like your jobtracker isn't running. What do you see when you run "brisktool jobtracker"?