Hi Jonathan,
I'm not sure if this can help you but this is how I use karaf and zookeeper:
1) tell RSA where to find zookeeper:
Place a file named "org.apache.aries.rsa.discovery.zookeeper.cfg" with
the following content into karaf's "etc" folder:
zookeeper.host = dns name of your zookeeer server
zookeeper.port = 2181
zookeeper.timeout = 3000
2) when using fastbin as transport I have to create a file named
"org.apache.aries.rsa.provider.fastbin.cfg" in the "etc" folder containing:
uri = tcp://0.0.0.0:2550
otherwise I get a port collision
3) configure zookeeper, e.g.
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/opt/zookeeper-data
# Transaction log
#dataLogDir=/opt/zookeeper-data-log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
# Cluster servers
server.1=zk1:2888:3888
server.2=zk2:2888:3888
server.3=zk3:2888:3888
Schéin Gréiss, Mit freundlichen Grüßen, Meilleures salutations, Kind
regards,
Alex Weirig
Responsable Technique
Ville de Luxembourg - Centre Technolink 2, rue Charles de Tornaco L -
2623 LUXEMBOURG alex.wei...@technolink.lu
<mailto:alex.wei...@technolink.lu> Tel: +352 4796 - 6127 Fax: +352 42 88
81 www.technolink.lu <http://www.technolink.lu>
On 15/09/2017 00:49, Jonathan knez wrote:
I am just getting started with remote services in OSGi. To that end, I
have downloaded Apache Karaf 4.1.2 and run through the Echo TCP
example from the Aries-RSA github page. Here is a link.
https://github.com/apache/aries-rsa/tree/master/examples/echotcp
The example ran successfully when running two karaf instances on my
single computer. I then ran one karaf instance on another networked
computer. The two computers are connected via a LAN that allows all
manner of network communication including multicast. When running the
"Service" on one computer and the "Consumer" on the other computer,
the example does not work. The Consumer bundle stays in a Waiting state.
When I run rsa:endpoints on the "Service" computer, I see that the
EchoService is correctly bound to a local IP address. When I run
rsa:endpoints on the "Consumer" computer, it shows no services.
The issue appears to be that the karaf instance on the "Consumer"
computer has not found the "Service" endpoint on the other computer.
Both computers have multiple NICs and multiple active network
connections. Only one connection allows them to talk to each other. It
just so happens that the "Service" endpoint is using the right
address. I suspect that the "Consumer" karaf instance is not so lucky
and is using the wrong NIC.
So my question is how can I configure this? I believe this might be a
Zookeeper question but I am not clear on how to configure the
zookeeper instance that Aries-RSA launches.
I appreciate the help.
Jonathan
--
This email was Anti Virus checked by SOPHOS UTM