How to install bundle Offline

2019-10-09 Thread imranrazakhan
I have karaf deployed but with no internet connectivity, Now i have to
install jolokia on it but getting below error

@root()> feature:install jolokia

Error executing command: Error: 

   Error downloading mvn:org.jolokia/jolokia-osgi/1.3.5

How i can install offline?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Conditional Features startup in karaf

2019-03-28 Thread imranrazakhan
We have karaf in Openshift and sharing central configuration through
configmap. We have to start/stop or make available features/bundles on base
of central configuration.

So if central configuration tag one bundle as enable we will start it or if
central configuration tag feature as disable we should stop that bundle.

Do karaf support some API to control bundle lifecyle on base of external
configuration.




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Gradle for Karaf

2019-02-25 Thread imranrazakhan
Do karaf has official plugin for gradle?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Error: 'tls: oversized record received with length 20527' with jolokia

2019-01-14 Thread imranrazakhan
@jbonofre are you able to reproduce it in openshift/kubernetes?? 




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Error: 'tls: oversized record received with length 20527' with jolokia

2018-12-16 Thread imranrazakhan
@jbonofre are you able to reproduce it in openshift/kubernetes??



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Error: 'tls: oversized record received with length 20527' with jolokia

2018-11-26 Thread imranrazakhan
@jbonofre any hint to resolve this jolokia issue



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Error: 'tls: oversized record received with length 20527' with jolokia

2018-11-14 Thread imranrazakhan
Following is in  org.jolokia.osgi.cfg


org.jolokia.user=karaf
org.jolokia.realm=karaf
org.jolokia.authMode=jaas
org.apache.karaf.features.configKey = org.jolokia.osgi



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Error: 'tls: oversized record received with length 20527' with jolokia

2018-11-14 Thread imranrazakhan
I have installed Jolokia Agent in Karaf and able to access on 

http://localhost:8181/jolokia/

But when same i want to access from Openshift, its expecting to be access
from https://, How we can configure jolokia agent to be access from https://
rather than http://

I am getting following error

Error: 'tls: oversized record received with length 20527'
Trying to reach:
'https://x.x.x.x:8181/jolokia/?maxDepth=7=500=true=false'



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Error downloading mvn:org.jolokia/jolokia-osgi/1.3.5

2018-11-12 Thread imranrazakhan
But as per my expectation according to above mention document, it should be
available in default distribution??? 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Error downloading mvn:org.jolokia/jolokia-osgi/1.3.5

2018-11-12 Thread imranrazakhan
I am trying to install jolokia in enviornment where i dont have access to
internet

on running below

>feature:install jolokia

I am getting error 

Error downloading mvn:org.jolokia/jolokia-osgi/1.3.5

As per excerpt from documentation
https://karaf.apache.org/manual/latest/monitoring

Karaf provides a jolokia feature, ready to install:
karaf@root()> feature:install jolokia

So why its not getting install



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Recommended Way to expose Karaf WebConsole in Kubernetes

2018-11-10 Thread imranrazakhan
I have deployed Jboss AMQ it showing "Open Java Console" link under pods, how
we can achieve same for karaf. Image attached

 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Recommended Way to expose Karaf WebConsole in Kubernetes

2018-11-09 Thread imranrazakhan
Hi,

I want to expose Karaf WebConsole "http://localhost:8181/system/console; out
of Kubernetes/openshift cluster, Whats recommendation keeping in view
security?

I have  created service like below

- apiVersion: v1
 kind: Service
 metadata:
   name: karaf
 spec:
  externalIPs:
   - 10.x.x.x
  type: NodePort
  ports:
   - port: 8181
 nodePort: 30001
 name: http




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


How To Setup Apache Karaf for high availability(active/passive) with GlusterFS

2018-08-26 Thread imranrazakhan
sometimes we have to deploy karaf in active/passive but without availability
of shared filesystem in datacenter or database for locking.

we develop custom socket based lock system for karaf but it only work for
two servers. After searching lot we find one solution GlusterFS.

For complete instruction you can find here

https://imranrazakh.blogspot.com/2018/08/




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: How to consolidate configuration in one file for all componets

2018-08-15 Thread imranrazakhan
Hi Jean,

As you highlighted "having all in one config is possible, but it gives less
flexibility in 
term of update/reload" 

Any idea to implement placeholders like below in feature.xml by this we have
one config file with flexibility and these placeholder get update before
deployment?

 
   
 initialDelay = ${mycomponenet.initialDelay} 
 checkInterval = ${mycomponenet.checkInterval} 
   
   
 
 
  config 
   
 




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: How to consolidate configuration in one file for all componets

2018-08-11 Thread imranrazakhan
I am looking for all in an unique cfg file. So can we change like below?



 
  
 
 
  config 
   
 
 
  config 
   
 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


How to consolidate configuration in one file for all componets

2018-08-11 Thread imranrazakhan
i have configuration for components like below, i want to consolidate all
below config in one file, so all feature get config from that file.

how i change below feature file to achieve it?

http://karaf.apache.org/xmlns/features/v1.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0;>


initialDelay = 60
checkInterval = 60



aggregationCount = 100
aggregationInterval = 2000



 

initializationDelay = 15s
restartRoutes = false





name = heartbeat-monitor
numberOfExecutorThreads = 3
shutdownTimeoutSeconds = 1








--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Do karaf support yaml file as configuration

2018-08-08 Thread imranrazakhan
Suppose we have feature file like,



http://karaf.apache.org/xmlns/features/v1.0.0;>\

mvn:test/config-test/1.0.0-SNAPSHOT/cfg
mvn:test/config-test/1.0.0-SNAPSHOT



Do Karaf support configuration like below and parse yaml accordingly

 

mvn:test/config-test/1.0.0-SNAPSHOT/cfg



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


how to override configuration of feature in KarafTestSupport

2018-07-22 Thread imranrazakhan
I am testing deployment of my feature.xml

 

prop1 = 60
prop2 = 60



I am testing with pax-exam and i want that before deployment of feature i
could able to change properties value, i tried couple of options but not
working as per expectation

1- i change values in feature.xml, but i dont want to change it as i am
pulling it from central place so may effect others testing.

2- executeCommand("config:property-set prop1 1\n" + "config:update", new
RolePrincipal("manager"));
But before it feature already started with defaults values and which is not
required.

I think ideal option would be if i could change on below line

   

KarafDistributionOption.features(CoreOptions.maven().groupId("com.my.features.base").artifactId("my-core").type("xml").classifier("features").version("2.1.1"),
"my-base-configuration"));







--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


java.lang.LinkageError: loader constraint violation:

2018-07-22 Thread imranrazakhan
I am using karafTestSupport and extending for my tests. i observed that

when i use below method to install feature , it throws error 
 this.featureService.installFeature("my-common");

But it works fine with

executeCommand("feature:install my-common", ADMIN_ROLES);


java.lang.LinkageError: loader constraint violation: loader (instance of
org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) previously
initiated loading for a different type with name "org
/apache/karaf/shell/api/console/Registry"
at
com.younicos.osgi.itests.common.KarafTestSupport.waitForCommandService(KarafTestSupport.java:436)
at
com.younicos.osgi.itests.common.KarafTestSupport.executeCommand(KarafTestSupport.java:286)
at
com.younicos.osgi.itests.common.KarafTestSupport.executeCommand(KarafTestSupport.java:271)
at
com.my.osgi.itests.MyComponentTest.serviceCreationIsWorking(MyComponentTest.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


can't cast to implemented interface in Test with KarafTestSupport

2018-07-18 Thread imranrazakhan
I am doing integration test but getting error in which i can't cast to
implemented interface

IPOJO Component:
@Component(immediate = true)
@Provides
public class MyComponent implements MyService
{

@Override
public boolean islock()
{
return true;
}

}

Following is test class extending KarafTestSupport

@Test
public void serviceCreationIsWorking() throws Exception
{
assertBundleInstalled("com.my.osgi.mycomponent");

MyService serviceObject = getOsgiService(MyService.class, 3l);
System.out.println("getOsgiService=" + serviceObject);
System.out.println("getOsgiService method=" +
serviceObject.islock());
assertConditions(5000, "No deadlock detected!", () ->
serviceObject.islock() == true);
}

But on following line it throws error 

java.lang.ClassCastException: com.my.osgi.MyComponent cannot be cast to
com.my.osgi.MyService

MyService serviceObject = getOsgiService(MyService.class, 3l);

I googled and i found that

/This can happen if two different classloaders load a class named
.

These two classes are then treated as entirely different classes, even if
they have the same package and name (and even
implementation/fields/methods).

A common cause for this is if you use some kind of plugin system and both
your base classes and the plugin classes provide the same class./

Any suggestion to resolve class loader issue??






--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: assertServiceAvailable in KarafTestSupport.java

2018-07-16 Thread imranrazakhan
thanks, please share JIRA number to follow.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Deployment difference between karaf feature bundle and karaf bundle:install

2018-07-16 Thread imranrazakhan
>> if you do getServiceReferences("my-stuff") in the bundle 
providing itself the my-stuff service, it's a bad design and it should 
directly use the instance (service providers and service "clients" 
should be in separated bundles

Thanks for highlighting, i am doing this way in my integration test only.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Deployment difference between karaf feature bundle and karaf bundle:install

2018-07-15 Thread imranrazakhan
1- if both bundles are same then why service references are different for
both?
2- why following code line is successful for one deployment(feature based
deployment) and failing for other, i want that below code line should
successful if i do deployment with bundle:install 

serviceReferences =
this.bundleContext.getServiceReferences("com.my.osgi.mycomponent", null)





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Deployment difference between karaf feature bundle and karaf bundle:install

2018-07-15 Thread imranrazakhan
How below both deployments are different


mvn:com.my.osgi/mycomponent/0.0.1


and

bundle:install -s mvn:com.my.osgi/mycomponent/0.0.1

what i observed is deploying with feature shows service:list like

[com.my.osgi.mycomponent]
-
instance.name = mycomponent.3c2c91a5-4c28-46c3-a08e-1470192ef353
 service.bundleid = 76
 service.factoryPid = com.my.osgi.mycomponent
 service.id = 397
 service.pid =
com.my.osgi.mycomponent.3c2c91a5-4c28-46c3-a08e-1470192ef353
 service.scope = bundle

and by deploying with bundle:install

[org.apache.felix.ipojo.Factory]

 component.class = com.my.osgi.mycomponent
 component.description = factory name="com.my.osgi.mycomponent"
bundle="77" state="valid" implementation-class="com.my.osgi.mycomponent"
requiredhandlers list="[org.apache.felix.ipojo:properties,
org.apache.felix.ipojo:callback, org.apache.felix.ipojo:provides,
org.apache.felix.ipojo:architect
ure]"
missinghandlers list="[]"
provides specification="com.my.osgi.mycomponent"
inherited interfaces="[com.my.osgi.mycomponent]"
superclasses="[]"
 component.providedServiceSpecifications = [com.my.osgi.mycomponent]
 factory.name = com.my.osgi.mycomponent
 factory.state = 1
 service.bundleid = 77
 service.id = 153
 service.pid = com.my.osgi.mycomponent
 service.scope = singleton

it work fine but my pax-exam tests are getting failed as after installing i
look for service

serviceReferences =
this.bundleContext.getServiceReferences("com.my.osgi.mycomponent", filter);

how i should deploy in pax-exam so i can access services like feature
deployments?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: assertServiceAvailable in KarafTestSupport.java

2018-07-15 Thread imranrazakhan
i checked below class doesn't contain method "assertServiceAvailable"

https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


assertServiceAvailable in KarafTestSupport.java

2018-07-15 Thread imranrazakhan
I was looking into KarafTestSupport code and couldnt find
assertServiceAvailable. 

we can extend existing code and with getOsgiService can develop it, but it
would be nice to have this method in KarafTestSupport.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


assertServiceAvailable in KarafTestSupport.java

2018-07-15 Thread imranrazakhan
i was looking into KarafTestSupport and couldnt find method to verify
services, do karaf itest verify services differently?

It would be nice to have such method.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Karaf Tutorials moved to new site https://cschneider.github.io/Karaf-Tutorial/

2018-07-10 Thread imranrazakhan
it would be nice to have tutorial about deployment of karaf with cellar on
kubernetes



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Karaf Jenkins Job Configuration

2018-07-10 Thread imranrazakhan
How unit test and integration tests run by jenkins? 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Karaf Jenkins Job Configuration

2018-07-09 Thread imranrazakhan
Can we see jenkins job or pipeline configuration for karaf to get idea how
karaf running itest and other stuff. i check build its in view mode only.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Custom Lock is not working in Docker

2018-06-29 Thread imranrazakhan
My custom lock code was throwing some error due to which karaf lock was not
working, i just try-catch exception and now its working.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Custom Lock is not working in Docker

2018-06-28 Thread imranrazakhan
I have developed SocketBased locking and this is working perfectly if i
deploy karaf Non-Docker environment, but when i try this in docker its not
showing anything. infact if i start in debug mode following line is not
printing 

DEBUG | Karaf Lock Monitor Thread | Main | 
-  -  | Waiting for the lock ...


Debug Logs of Non-Docker Deployment

un 28, 2018 11:52:07 AM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Jun 28, 2018 11:52:07 AM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
2018-06-28T11:52:08,652 | INFO  | Karaf Lock Monitor Thread | SocketLock
  
|  -  -  | in override lock() method
2018-06-28T11:52:08,662 | INFO  | Karaf Lock Monitor Thread | SocketLock
  
|  -  -  | in override isAlive() method
2018-06-28T11:52:08,663 | DEBUG | Karaf Lock Monitor Thread | Main  
  
|  -  -  | Waiting for the lock ...
2018-06-28T11:52:08,703 | DEBUG | CM Configuration Updater (Update:
pid=org.ops4j.pax.url.mvn) | mvn  | 4 -
org.ops4j.pax.url.mvn - 2.
5.4 | ServiceEvent REGISTERED - [org.ops4j.pax.url.mvn.MavenResolver] -
org.ops4j.pax.url.mvn
2018-06-28T11:52:08,706 | DEBUG | CM Configuration Updater (Update:
pid=org.ops4j.pax.url.mvn) | mvn  | 4 -
org.ops4j.pax.url.mvn - 2.
5.4 | ServiceEvent REGISTERED -
[org.osgi.service.url.URLStreamHandlerService] - org.ops4j.pax.url.mvn
2018-06-28T11:52:08,716 | DEBUG | pool-2-thread-2  | core   
 
| 10 - org.apache.karaf.features.core - 4.1.5 | ServiceEvent REGISTERED - [o
rg.osgi.framework.hooks.resolver.ResolverHookFactory] -
org.apache.karaf.features.core


Following are Logs when i start karaf in Docker

Jun 28, 2018 11:33:56 AM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Jun 28, 2018 11:33:56 AM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
2018-06-28T11:33:57,166 | DEBUG | FelixStartLevel  | core   
 
| 10 - org.apache.karaf.features.core - 4.1.5 | BundleEvent STARTED -
org.apach
e.karaf.features.core
2018-06-28T11:33:57,181 | DEBUG | FelixDispatchQueue | Main 
   
|  -  -  | Start level change complete.
2018-06-28T11:33:57,182 | DEBUG | FelixDispatchQueue | framework
   
| 0 - org.apache.felix.framework - 5.6.10 | FrameworkEvent STARTLEVEL
CHANGED
 - org.apache.felix.framework
2018-06-28T11:33:57,516 | DEBUG | CM Configuration Updater (Update:
pid=org.ops4j.pax.url.mvn) | mvn  | 4 -
org.ops4j.pax.url.mvn - 2.5.4
 | ServiceEvent REGISTERED - [org.ops4j.pax.url.mvn.MavenResolver] -
org.ops4j.pax.url.mvn
2018-06-28T11:33:57,520 | DEBUG | CM Configuration Updater (Update:
pid=org.ops4j.pax.url.mvn) | mvn  | 4 -
org.ops4j.pax.url.mvn - 2.5.4
 | ServiceEvent REGISTERED -
[org.osgi.service.url.URLStreamHandlerService] - org.ops4j.pax.url.mvn
2018-06-28T11:33:57,532 | DEBUG | pool-2-thread-2  | core   
 
| 10 - org.apache.karaf.features.core - 4.1.5 | ServiceEvent REGISTERED -
[org.
osgi.framework.hooks.resolver.ResolverHookFactory] -
org.apache.karaf.features.core
2018-06-28T11:33:57,536 | DEBUG | pool-2-thread-2  | core   
 
| 10 - org.apache.karaf.features.core - 4.1.5 | ServiceEvent REGISTERED -
[org.
osgi.framework.hooks.bundle.CollisionHook] -
org.apache.karaf.features.core





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


bin/stop and status command not working in karaf 4.1.5

2018-06-27 Thread imranrazakhan
Following is error

myusr@myhost:/opt/apache/apache-karaf-4.1.5$ ./bin/start
myusr@myhost:/opt/apache/apache-karaf-4.1.5$ ./bin/status
/opt/apache/apache-karaf-4.1.5/data/port shutdown port file doesn't exist.
The container is not running.

Following are my directory permissions

drwxrwxrwx 4 myusr mygrp 4.0K Feb 12 17:31 system
-rw-rw-rw- 1 myusr mygrp 370K Feb 12 17:31 RELEASE-NOTES
-rw-rw-rw- 1 myusr mygrp 4.0K Feb 12 17:31 README
-rw-rw-rw- 1 myusr mygrp 1.8K Feb 12 17:31 NOTICE
-rw-rw-rw- 1 myusr mygrp  28K Feb 12 17:31 LICENSE
drwxrwxrwx 9 myusr mygrp 4.0K Feb 12 17:31 demos
drwxrwxrwx 3 myusr mygrp 4.0K Feb 12 17:31 bin
drwxrwxrwx 5 myusr mygrp 4.0K Feb 12 17:31 lib
drwxrwxrwx 2 myusr mygrp 4.0K Feb 12 17:31 deploy
drwxrwxrwx 2 myusr mygrp 4.0K Jun 27 12:35 instances
-rw-rw-rw- 1 myusr mygrp4 Jun 27 13:13 karaf.pid
drwxrwxrwx 3 myusr mygrp 4.0K Jun 27 13:28 etc
drwxrwxrwx 8 myusr mygrp 4.0K Jun 27 14:00 data





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Socket based locking in karaf

2018-06-26 Thread imranrazakhan
Do socket based locking can be implement for karaf rather than file or DB. As
i only have two instance so each node would act as socker server/client. No
third dependency would require.

is this good idea? or recommend any alternative apart from file and DB i
want to implement this in docker swarm cluster.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Migration karaf from Legacy deployment to cloud

2018-06-22 Thread imranrazakhan
Currently we have karaf deployment like following

1- Its active-standby
2- Standby is there with startlevel as 50 so failover would be fast
3- As soon as active goes down standby takeover.

Now we planned to migrate to kubernetes, as per current research

Kubernetes will create 1 pod for us and we declare happy state as 1 which
mean if POD goes down it will automatically launch new, but my concern is
launching of new POD will take more time as in legacy deployment, standby
was in semi active state.

How we can achieve such active-standby in kubernetes?







--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: How to analyze karaf bundle level memory and cpu usage

2018-06-22 Thread imranrazakhan
Do hawtio have any options? I installed but couldn't get any



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


How to analyze karaf bundle level memory and cpu usage

2018-06-22 Thread imranrazakhan
I want to know whether its possible to check the bundle level memory usage as
my karaf running and more memory is getting consumed and i have to restart
after 14 days.

I found following link but its old and so hesitating to try it.

https://icodebythesea.blogspot.com/2014/11/ktop-update-and-opendaylight-mdsal.html








--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Failover with Apache Karaf + Cellar + Docker

2018-06-19 Thread imranrazakhan
Ok i will look into it.

As of now i dont have NFS, so will try to use HOST file system for locking.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Failover with Apache Karaf + Cellar + Docker

2018-06-19 Thread imranrazakhan
Ok, thanks for updates.

Please provide details how we can achieve failover behavior(A 'hot' standby
instance) like mentioned in 

   
https://svn.apache.org/repos/asf/karaf/site/production/manual/latest-3.0.x/failover.html
 

in Docker environment?

How karaf support to communicate between two images/pods. 

As we can use kubernetes for orchestration of instances but i am not clear
how to achieve "A 'hot' standby instance" with it. Kubernetes will start and
stop bundles regardless of statuses of bundles of karaf pods



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Failover with Apache Karaf + Cellar + Docker

2018-06-19 Thread imranrazakhan
Hi,

I have two karaf instances with Active-Passive configurations. Following is
deployment details

1- One become master and all bundles are with start status.
2-  Second instance is also up but all my developed bundles are with install
status but not running.
3- Both instance communicate on socket and as soon as first goes down second
instance just change the status of bundles from install to status, due to
which uptime in failover is very minimum.
4- these bundles dont expose http services so i cant use load balancer.

I was evaluating Apache Cellar and found i can achieve same behavior with it
by setting karaf.lock.level=50 property in etc/startup.properties.

But i want to deploy both instances with docker images and locking is only
done through filesystem or DB.

How Cellar support locking in cloud environment? Please point some blog or
documentations to achieve this behavior in .






--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


What are Best Practices for Karaf based application Integration Test with Pax-Exam

2018-06-13 Thread imranrazakhan
We have lot of integration tests for our karaf based applications, so now
discussion got started

 - Should these itests done by developer or devops, as it took too much time
and developer has to wait?

 - Do itests part of project or we should have separate project?

 - if its separate project then do these got trigger after developer commit
code?

 - As developer says in case of any error in ITESTs it would be
configuration issue  and no code changes as code tests done with junit.

 - How can jenkin and PaxExam support in this regard?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Karaf Cellar sync issue and NullPointerException

2018-06-12 Thread imranrazakhan
Hi,

I tried cluster-sync with other camel feature and behavior was same.

cluster:feature-install is working as expected.

Can you please elaborate about below statement with example ?

"/cluster-sync is not required, it's only used when you have a split brain/"

Regards,



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Karaf Cellar sync issue and NullPointerException

2018-06-11 Thread imranrazakhan
I am new to cellar and trying to do POC, I did following steps

 - Install Karaf(4.1.5) on two instances.
 - feature:repo-add
mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.1.1/xml/features (On both
instances)
 - feature:install cellar (On both instances)
 - Edit hazelcast.xml on both instances and set following section (On both
instances)

> 
> 10.10.10.11
> 10.10.10.12
> 

 - When i check cluster status(cluster:node-list) following is output

 

│Id  │Alias│Host Name  │Port

┼┼─┼───┼

│10.10.10.12:5701│ │10.10.10.12│5701

│10.10.10.11:5701│ │10.10.10.11│5701

As auto sync is not enabled i installed camel-scr bundle on one instance and
on running cluster-sync i am getting below error and now it also removing
some features and camel-scr goes back to uninstall state

2018-06-06T10:25:34,165 | INFO  | pipe-feature:install camel-scr |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Adding
features: camel-scr/[2.19.5,2.19.5]
2018-06-06T10:25:35,806 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Changes to perform
:
2018-06-06T10:25:35,825 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 |   Region: root
2018-06-06T10:25:35,825 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Bundles to ins
tall:
2018-06-06T10:25:35,826 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 |   mvn:org.apac
he.camel/camel-scr/2.19.5
2018-06-06T10:25:35,828 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Installing bundles
:
2018-06-06T10:25:35,828 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 |   mvn:org.apache.c
amel/camel-scr/2.19.5
2018-06-06T10:25:35,846 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Starting bundles:
2018-06-06T10:25:35,847 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 |   org.apache.camel
.camel-scr/2.19.5
2018-06-06T10:25:35,866 | INFO  | features-2-thread-1 |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Done.

** Here i run cluster:sync *

2018-06-06T10:26:01,936 | INFO  | pipe-cluster:sync |
FeaturesServiceImpl  | 11 - org.apache.karaf.features.core -
4.1.5 | Removing features: f
eature:service/[4.1.5,4.1.5], feature:wrapper/[4.1.5,4.1.5],
feature:eventadmin/[4.1.5,4.1.5], feature:config/[4.1.5,4.1.5],
feature:jaas/[4.1.5,4.1.5], fe
ature:aries-blueprint/[4.1.5,4.1.5], feature:ssh/[4.1.5,4.1.5],
feature:framework/[4.1.5,4.1.5], feature:feature/[4.1.5,4.1.5],
feature:shell/[4.1.5,4.1.5]
, feature:camel-scr/[2.19.5,2.19.5], feature:shell-compat/[4.1.5,4.1.5],
feature:kar/[4.1.5,4
.1.5], feature:webconsole/[4.1.5,4.1.5], feature:system/[4.1.5,4.1.5],
feature:diagnostic/[4.1.5,4.1.5], feature:management/[4.1.5,4.1.5],
feature:deployer
/[4.1.5,4.1.5], feature:wrap/[0,0.0.0], feature:bundle/[4.1.5,4.1.5],
feature:instance/[4.1.5,4.1.5], feature:log/[4.1.5,4.1.5]
2018-06-06T10:26:02,062 | WARN  | pipe-cluster:sync |
FeaturesSynchronizer | 262 - org.apache.karaf.cellar.features -
4.1.1 | Can't get local f
eatures repositories
org.osgi.service.resolver.ResolutionException: Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=cellar;
type=karaf.feature;
version="[4.1.1,4.1.1]";
filter:="(&(osgi.identity=cellar)(type=karaf.feature)(version>=4.1.1)(version<=4.1.1))"
[caused by: Unable to resolve cellar/4.1.1
: missing requirement [cellar/4.1.1] karaf.cellar.provider [caused by:
Unable to resolve cellar-hazelcast/4.1.1: missing requirement
[cellar-hazelcast/4.1.
1] osgi.identity; osgi.identity=org.apache.karaf.cellar.hazelcast;
type=osgi.bundle; version="[4.1.1,4.1.1]"; resolution:=mandatory [caused by:
Unable to r
esolve org.apache.karaf.cellar.hazelcast/4.1.1: missing requirement
[org.apache.karaf.cellar.hazelcast/4.1.1] osgi.wiring.package;
filter:="(&(osgi.wiring.
package=org.apache.aries.proxy)(version>=1.0.0)(!(version>=2.0.0)))"
[caused by: Unable to resolve org.apache.aries.proxy/1.1.1: missing
requirement [org.a
pache.aries.proxy/1.1.1] osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))"
at
org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
~[?:?]
at
org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391)
~[?:?]

Re: Two Karaf instances using one database

2018-06-11 Thread imranrazakhan
Did you able to fix cluster:synch issue, as i am still facing issue.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html