The Endpoint configuration is done using service properties. So you need to set it on the service you export using DS.

Christian

On 21.11.2016 08:47, Alex Weirig wrote:

Hello,

I'm facing a problem to get fastbin provider working in the following configuration:

I have

3 karaf containers (4.0.7) running on 3 different (virtual) machines, all have aries RSA (1.9.0) with zookeeper discovery and fastbin provider features installed

1 zookeeper server (3.4.9)

2 of the karaf servers provide services (declarative services) that are correctly registered in zookeeper.


On the 3rd karaf server I want to use the services in a shell command, unfortunately I'm getting an "Address already in use" exception in this karaf container.

2016-11-18 16:43:14,565 | WARN | pool-64-thread-1 | Activator | 56 - org.apache.aries.rsa.provider.fastbin - 1.9.0 | Error starting activator java.io.IOException: Failed to bind to server socket: /0.0.0.0:2543 due to: java.net.BindException: Address already in use at org.apache.aries.rsa.provider.fastbin.tcp.TcpTransportServer.start(TcpTransportServer.java:99)[56:org.apache.aries.rsa.provider.fastbin:1.9.0] at org.apache.aries.rsa.provider.fastbin.tcp.ServerInvokerImpl.start(ServerInvokerImpl.java:194)[56:org.apache.aries.rsa.provider.fastbin:1.9.0] at org.apache.aries.rsa.provider.fastbin.tcp.ServerInvokerImpl.start(ServerInvokerImpl.java:190)[56:org.apache.aries.rsa.provider.fastbin:1.9.0] at org.apache.aries.rsa.provider.fastbin.FastBinProvider.<init>(FastBinProvider.java:67)[56:org.apache.aries.rsa.provider.fastbin:1.9.0] at org.apache.aries.rsa.provider.fastbin.Activator.doStart(Activator.java:47)[56:org.apache.aries.rsa.provider.fastbin:1.9.0] at org.apache.aries.rsa.provider.fastbin.BaseActivator.run(BaseActivator.java:230)[56:org.apache.aries.rsa.provider.fastbin:1.9.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_72] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_72] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_72] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_72]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_72]
Caused by: java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)[:1.8.0_72]
        at sun.nio.ch.Net.bind(Net.java:433)[:1.8.0_72]
        at sun.nio.ch.Net.bind(Net.java:425)[:1.8.0_72]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)[:1.8.0_72] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)[:1.8.0_72] at org.apache.aries.rsa.provider.fastbin.tcp.TcpTransportServer.start(TcpTransportServer.java:97)[56:org.apache.aries.rsa.provider.fastbin:1.9.0]
        ... 10 more

When I deploy my command on one of the other karaf container everything works fine.

On the fastbin github site there is an "endpoint configuration" section:

Endpoint Configuration

service.exported.configs: aries.fastbin

Key    Default    Description
uri    tcp://0.0.0.0:2543    The bind address to use
exportAddress looks up the hostname The ip/hostname how remote clients can reach this server
timeout    300000    The timeout for sync calls (default 5 minutes)

I guess I'm supposed to change the "uri" value (maybe a different one on each karaf container?) in order to not get a collision.

Unfortunately there is no indication where to specify these values, a .cfg file in karaf/etc/? Is the file supposed to be named service.exported.configs.cfg? Is the syntax supposed to be aries.fastbin.uri?

Many thanks in advance for your support

--
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>


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to