You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by cooshal <ku...@gmail.com> on 2019/05/23 09:44:24 UTC

Issues installing Decanter

Hi:

I have a node where Karaf Cellar is installed. As per the recommendation in
an older thread
(http://karaf.922171.n3.nabble.com/Where-exactly-is-cellar-log-stored-td4055926.html),
I tried to install decanter. But, this gives me following error:

karaf@root()> feature:install decanter
org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl]
: Unknown protocol: mvn
java.net.MalformedURLException: Unknown protocol: mvn
        at java.net.URL.<init>(URL.java:620)
        at java.net.URL.<init>(URL.java:483)
        at java.net.URL.<init>(URL.java:432)
        at
org.apache.karaf.features.internal.service.FeatureConfigInstaller.installConfigurationFile(FeatureConfigInstaller.java:230)
        at
org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:147)
        at
org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installConfigs(BundleInstallSupportImpl.java:297)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.installConfigs(FeaturesServiceImpl.java:1141)
        at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:925)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
        at
org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
        at java.net.URL.<init>(URL.java:615)
        ... 13 more

Upon restarting the container, I see the following message in the logs:

java.lang.NoSuchMethodError:
org.elasticsearch.common.settings.Settings.settingsBuilder()Lorg/elasticsearch/common/settings/Settings$Builder;
        at
org.apache.karaf.decanter.elasticsearch.EmbeddedNode.start(EmbeddedNode.java:86)
~[?:?]
        at
org.apache.karaf.decanter.elasticsearch.EmbeddedNode.acticate(EmbeddedNode.java:65)
~[?:?]
        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:497) ~[?:?]
        at
org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229)
~[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
~[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650)
~[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:298)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:109)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:907)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:880)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:764)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:675)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:430)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:387)
[50:org.apache.felix.scr:2.0.14]
        at org.apache.felix.scr.impl.Activator.access$200(Activator.java:52)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:262)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169)
[50:org.apache.felix.scr:2.0.14]
        at
org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49)
[50:org.apache.felix.scr:2.0.14]
        at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
[?:?]
        at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
[?:?]
        at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]
        at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
[?:?]
        at
org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
[?:?]
        at
org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
[?:?]
        at
org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
[?:?]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579)
[?:?]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2174)
[?:?]
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373) [?:?]
        at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
[?:?]
        at java.lang.Thread.run(Thread.java:745) [?:?]

The bundles are in resolved state, but if I start them manually, they become
active, but then comes a whole bunch of errors (error getting NodesInfo and
keeps polling *:9200)

I do not have elasticsearch right now, and possibly not in the recent times
as well. But then my curiosity would be, "what would I use these logs with?"
I understand that, with Elasticsearch, life would be much easier for me, but
there are some constraints right now.

At the moment, my aim is to gather logs from all the cellar nodes (for which
I am using mbean as a workaround, as cellar-log did not give me enough
information). My current approach is not a good one, although it works. I
was wondering if there a minimal installation of decanter that I can
install, and may be use Rest API to fetch the logs or something like that.

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
Hi:

I think you are right.

I will create a pilot project and replicate the scenario, and share it with
you.

That way, it will be easier to resolve this issue.

Thank you for your help.

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

The easiest way is: share your project and I will fix it. You can send
me as private message.
It's also hard to help without the complete picture ;)

By the way, did you take a look on
https://github.com/apache/karaf/tree/master/examples/karaf-jms-example ?
I can add a scr bundle using the ConnectionFactory if it's similar to
what you are looking for.

Anyway, I guarantee it works fine ;)

Regards
JB

On 24/05/2019 18:32, cooshal wrote:
> I am still trying this... nothing seems to work. this is exhausting !
> 
> I have tried a few options:
> 
> 1. Without pax-jms. I had exported broker service from my blueprint and
> installed the bundle. This way, bundle:capabilities displayed the services
> exposed.
> 
> 2. With pax-jms, following
> https://github.com/apache/karaf/blob/e21fcf86d6160109e54da82d3f6543ed99059985/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml#L28,
> I did almost similar stuff:
> 
> <capability>
>     
> osgi.service;objectClass=javax.jms.ConnectionFactory;effective:=active;osgi.jndi.service.name=eai/consumer
> </capability>
> 
> 
> Here, bundle:capability <bundle_id> does not list the service.
> 
> In both cases, I can see the service out there is listed in service:list
> javax.jms.ConnectionFactory
> 
> Moreover, I have noticed one thing here:
> 
> My Bundle A (which depends on JMS) is installed before the bundle B (which
> provides JMS services). But, I believe this shouldn't have affected this, as
> bundle was supposed to keep waiting for the JMS service. My few other
> bundles are dependent on cluster services, and they keep waiting until the
> cluster services are available.
> 
> But, this bundle, goes straight away to the failure state.
> 
> Completely weird.
> 
> So, in summary: I can install this feature via feature:install (after
> tweaking the service availability as optional), but not as a bootFeature.
> 
> I will try to dig a bit more, and post back. Right now, I am totally out of
> clues :D
> 
> Regards,
> Cooshal.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
I am still trying this... nothing seems to work. this is exhausting !

I have tried a few options:

1. Without pax-jms. I had exported broker service from my blueprint and
installed the bundle. This way, bundle:capabilities displayed the services
exposed.

2. With pax-jms, following
https://github.com/apache/karaf/blob/e21fcf86d6160109e54da82d3f6543ed99059985/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml#L28,
I did almost similar stuff:

<capability>
    
osgi.service;objectClass=javax.jms.ConnectionFactory;effective:=active;osgi.jndi.service.name=eai/consumer
</capability>


Here, bundle:capability <bundle_id> does not list the service.

In both cases, I can see the service out there is listed in service:list
javax.jms.ConnectionFactory

Moreover, I have noticed one thing here:

My Bundle A (which depends on JMS) is installed before the bundle B (which
provides JMS services). But, I believe this shouldn't have affected this, as
bundle was supposed to keep waiting for the JMS service. My few other
bundles are dependent on cluster services, and they keep waiting until the
cluster services are available.

But, this bundle, goes straight away to the failure state.

Completely weird.

So, in summary: I can install this feature via feature:install (after
tweaking the service availability as optional), but not as a bootFeature.

I will try to dig a bit more, and post back. Right now, I am totally out of
clues :D

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Oh, yes.

Here's an example how to provide a capability in a feature:

https://github.com/apache/karaf/blob/master/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml#L28

The feature provides a DataSource capability.

Regards
JB

On 24/05/2019 16:47, cooshal wrote:
> I do have an issue actually, not related to Decanter but the bundle
> resolution issue.
> 
> In the other
> forum(https://groups.google.com/forum/#!topic/ops4j/r4RQNMoLA7Y), you said
> that you would provide an example that "provides a capability to a
> bundle/feature". It would be great if you could post that.
> 
> I will buzz you from the respective thread in this forum.
> 
> Regards,
> Cooshal.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
I do have an issue actually, not related to Decanter but the bundle
resolution issue.

In the other
forum(https://groups.google.com/forum/#!topic/ops4j/r4RQNMoLA7Y), you said
that you would provide an example that "provides a capability to a
bundle/feature". It would be great if you could post that.

I will buzz you from the respective thread in this forum.

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You are welcome.

Let me know if you need anything.

Regards
JB

On 24/05/2019 16:36, cooshal wrote:
> Hi:
> 
> yes, that sounds the way it should be done !
> 
> Lets see if we can get the ElasticSearch setup soon enough :D
> 
> Thank you for this information.
> 
> Regards,
> Cooshal.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
Hi:

yes, that sounds the way it should be done !

Lets see if we can get the ElasticSearch setup soon enough :D

Thank you for this information.

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by "francois.papon" <fr...@openobject.fr>.
Hi,Agree with JB, and another advantage to have a central backend is to manage the alerting and the filter/parser of the data in one place.regards,FrancoisEnvoyé depuis mon smartphone Samsung Galaxy.
-------- Message d'origine --------De : Jean-Baptiste Onofré <jb...@nanthrax.net> Date : 24/05/2019  18:02  (GMT+04:00) À : user@karaf.apache.org Objet : Re: Issues installing Decanter Hi,About Decanter in a cluster environment, what we usually do is:1. decanter-collectors are installed on each node of the cluster (log, jmx)2. you install a decanter appender that send data on a central backend(jdbc, elasticsearch, etc)Then, all logs and metrics and centralized in the backend, where you canquery.For instance, with elasticsearch, you can use grafana/kibana to easilyrequest and create dashboards.RegardsJBOn 24/05/2019 14:43, cooshal wrote:> Hi JB:> > thank you very much for these information.> > I managed to run decanter now. It's collecting logs now, and the logs are in> data/decanter. I will see how can I make use of it in the context of cellar> a centralized way (and ofcourse without Elasticsearch at the moment).> > Previously, I had all my camel bundles installed (that required both JMS and> JDBC). Trying to install Decanter after those bundles resulted in> installation failure (I do not know if that was the real cause, but that's> what I have observed after multiple attempts). The other thing I did was> install event admin before decanter. And, things got installed without any> trouble.> > Regarding the bootFeatures, yes, they look completely different. I have not> added all the features from standard distro and rather included the> components that we need at the moment, like broker ds, database ds, etc.> But, thanks for pointing out these as well. I will look at these things to> see if I can improve those things.> > Regards,> Cooshal.> > > > --> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html> -- Jean-Baptiste Onofréjbonofre@apache.orghttp://blog.nanthrax.netTalend - http://www.talend.com

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

About Decanter in a cluster environment, what we usually do is:

1. decanter-collectors are installed on each node of the cluster (log, jmx)
2. you install a decanter appender that send data on a central backend
(jdbc, elasticsearch, etc)

Then, all logs and metrics and centralized in the backend, where you can
query.

For instance, with elasticsearch, you can use grafana/kibana to easily
request and create dashboards.

Regards
JB

On 24/05/2019 14:43, cooshal wrote:
> Hi JB:
> 
> thank you very much for these information.
> 
> I managed to run decanter now. It's collecting logs now, and the logs are in
> data/decanter. I will see how can I make use of it in the context of cellar
> a centralized way (and ofcourse without Elasticsearch at the moment).
> 
> Previously, I had all my camel bundles installed (that required both JMS and
> JDBC). Trying to install Decanter after those bundles resulted in
> installation failure (I do not know if that was the real cause, but that's
> what I have observed after multiple attempts). The other thing I did was
> install event admin before decanter. And, things got installed without any
> trouble.
> 
> Regarding the bootFeatures, yes, they look completely different. I have not
> added all the features from standard distro and rather included the
> components that we need at the moment, like broker ds, database ds, etc.
> But, thanks for pointing out these as well. I will look at these things to
> see if I can improve those things.
> 
> Regards,
> Cooshal.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
Hi JB:

thank you very much for these information.

I managed to run decanter now. It's collecting logs now, and the logs are in
data/decanter. I will see how can I make use of it in the context of cellar
a centralized way (and ofcourse without Elasticsearch at the moment).

Previously, I had all my camel bundles installed (that required both JMS and
JDBC). Trying to install Decanter after those bundles resulted in
installation failure (I do not know if that was the real cause, but that's
what I have observed after multiple attempts). The other thing I did was
install event admin before decanter. And, things got installed without any
trouble.

Regarding the bootFeatures, yes, they look completely different. I have not
added all the features from standard distro and rather included the
components that we need at the moment, like broker ds, database ds, etc.
But, thanks for pointing out these as well. I will look at these things to
see if I can improve those things.

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

About your first error, you featuresBoot is not correct, you can compare
with a standard distro. You should use stage to be sure of some startup
think.

Secondly, the IllegalStateException in the regex parser has been fixed
on Decanter 2.3.0-SNAPSHOT, but it's not a blocker for the installation.

Now, decanter collects all JMX metrics and log and send into the log
appender. The log appender is sending all in ${karaf.data}/decanter by
default. See etc/org.apache.karaf.decanter.appender.file.cfg.

I'm suggesting you to take a look on:

http://karaf.apache.org/manual/decanter/latest-2/html/
http://blog.nanthrax.net/?p=715

You said you wanted a log file, so, decanter appender file create a file
with all collected events/metrics.

Regards
JB

On 24/05/2019 10:12, cooshal wrote:
> Hi again:
> 
> I have some more confusions and errors as well.
> 
> First the confusion:
> 
> My boot features config looks like:
> 
> featuresBoot = \
>     standard, \
>     cellar, \
>     camel-sql, \
>     camel-jms, \
>     jdbc, \
>     dw-datasource, \
>     broker-datasource, \
>     shared-utils, \
>     jms, \
>     framework, \
>     service-wrapper, \
>     camel, \
>     jndi, \
>     transaction, \
>     jolokia, \
>     decanter
> 
> I added decanter manually for testing scenarios. I will add it in my custom
> distribution assembly later.
> 
> I still get the same issue as in the original post. But, restarting the node
> kind of resolves this issue. I will have to inspect further on it.
> 
> I did:
> 
> 1. > feature:repo-add decanter
> 2. > feature:install decanter-appender-file 
> 
> It was waiting for eventadmin. Then I installed eventadmin as well. Thus,
> its started as well.
> 
> I see the decanter bundles are in active state.
> 
> In the logs, I have the following error:
> 
> ERROR [FelixStartLevel] [org.apache.karaf.decanter.parser.regex(9)] The
> activate method has thrown an exception
> java.lang.IllegalStateException: regex property is required
>         at
> org.apache.karaf.decanter.parser.regex.RegexParser.activate(RegexParser.java:51)
> ~[?:?]
>         at
> org.apache.karaf.decanter.parser.regex.RegexParser.activate(RegexParser.java:46)
> ~[?:?]
>         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:497) ~[?:?]
>         at
> org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229)
> ~[59:org.apache.felix.scr:2.0.14]
> 
> Is this specific to decanter?
> 
> Now, my curiosity is, how can I make use of the logs that are collected and
> appended(where?).
> 
> Does decanter expose some API to access these logs or does it work only the
> other way around (push to respective appenders?)
> 
> Sorry, it's a bit long post, but I am totally confused with these things.
> 
> Regards,
> Cooshal. 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
Hi again:

I have some more confusions and errors as well.

First the confusion:

My boot features config looks like:

featuresBoot = \
    standard, \
    cellar, \
    camel-sql, \
    camel-jms, \
    jdbc, \
    dw-datasource, \
    broker-datasource, \
    shared-utils, \
    jms, \
    framework, \
    service-wrapper, \
    camel, \
    jndi, \
    transaction, \
    jolokia, \
    decanter

I added decanter manually for testing scenarios. I will add it in my custom
distribution assembly later.

I still get the same issue as in the original post. But, restarting the node
kind of resolves this issue. I will have to inspect further on it.

I did:

1. > feature:repo-add decanter
2. > feature:install decanter-appender-file 

It was waiting for eventadmin. Then I installed eventadmin as well. Thus,
its started as well.

I see the decanter bundles are in active state.

In the logs, I have the following error:

ERROR [FelixStartLevel] [org.apache.karaf.decanter.parser.regex(9)] The
activate method has thrown an exception
java.lang.IllegalStateException: regex property is required
        at
org.apache.karaf.decanter.parser.regex.RegexParser.activate(RegexParser.java:51)
~[?:?]
        at
org.apache.karaf.decanter.parser.regex.RegexParser.activate(RegexParser.java:46)
~[?:?]
        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:497) ~[?:?]
        at
org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229)
~[59:org.apache.felix.scr:2.0.14]

Is this specific to decanter?

Now, my curiosity is, how can I make use of the logs that are collected and
appended(where?).

Does decanter expose some API to access these logs or does it work only the
other way around (push to respective appenders?)

Sorry, it's a bit long post, but I am totally confused with these things.

Regards,
Cooshal. 




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

Re: Issues installing Decanter

Posted by Kushal Gautam <ku...@gmail.com>.
Hi:

Thanks !

I will try it that way.

Regards,
Cooshal.

Regards,
Kushal.

________________________________
From: Jean-Baptiste Onofré <jb...@nanthrax.net>
Sent: Thursday, May 23, 2019 3:04 PM
To: user@karaf.apache.org
Subject: Re: Issues installing Decanter

Hi,

As decanter is used mvn URL, your custom distribution should have the
mvn URL (for the first issue you mentioned).

What do you have in etc/org.apache.karaf.features.cfg (featuresBoot).

If you want to send to a file (log, jmx, any event collected by
decanter), you can use the file appender:

feature:install decanter-appender-file

Regards
JB

On 23/05/2019 15:01, cooshal wrote:
> Hi:
>
> yes, I have a custom distro. But, isn't > feature:repo-add decanter
> sufficient?
>
> The bundles get installed, but stay in resolved state. I had to manually
> start them.
>
> I will try with log and jmx collector. But, then I have one more confusion
> here. These collectors will respond to the log events, right? Can I direct
> these logs to persist in a file? Since, elastic search would be out of reach
> for the time being, I wanted to make sure that these logs are collectively
> available via decanter.
>
> Regards,
> Cooshal.
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

As decanter is used mvn URL, your custom distribution should have the
mvn URL (for the first issue you mentioned).

What do you have in etc/org.apache.karaf.features.cfg (featuresBoot).

If you want to send to a file (log, jmx, any event collected by
decanter), you can use the file appender:

feature:install decanter-appender-file

Regards
JB

On 23/05/2019 15:01, cooshal wrote:
> Hi:
> 
> yes, I have a custom distro. But, isn't > feature:repo-add decanter
> sufficient?
> 
> The bundles get installed, but stay in resolved state. I had to manually
> start them.
> 
> I will try with log and jmx collector. But, then I have one more confusion
> here. These collectors will respond to the log events, right? Can I direct
> these logs to persist in a file? Since, elastic search would be out of reach
> for the time being, I wanted to make sure that these logs are collectively
> available via decanter.
> 
> Regards,
> Cooshal.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Issues installing Decanter

Posted by cooshal <ku...@gmail.com>.
Hi:

yes, I have a custom distro. But, isn't > feature:repo-add decanter
sufficient?

The bundles get installed, but stay in resolved state. I had to manually
start them.

I will try with log and jmx collector. But, then I have one more confusion
here. These collectors will respond to the log events, right? Can I direct
these logs to persist in a file? Since, elastic search would be out of reach
for the time being, I wanted to make sure that these logs are collectively
available via decanter.

Regards,
Cooshal.



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

Re: Issues installing Decanter

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

Do you build your own custom distro ? It seems URL is missing in the
boot feature.

I don't think it's a good idea to just install decanter feature.

You should better install the collector/appender you need.

I would recommend to start with:

decanter-collector-log
decanter-collector-jmx

For the appender, it depends to the backend you want. Once you have your
elasticsearch running, you can install the elasticsearch appender:

decanter-appender-elasticsearch

Regards
JB

On 23/05/2019 11:44, cooshal wrote:
> Hi:
> 
> I have a node where Karaf Cellar is installed. As per the recommendation in
> an older thread
> (http://karaf.922171.n3.nabble.com/Where-exactly-is-cellar-log-stored-td4055926.html),
> I tried to install decanter. But, this gives me following error:
> 
> karaf@root()> feature:install decanter
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl]
> : Unknown protocol: mvn
> java.net.MalformedURLException: Unknown protocol: mvn
>         at java.net.URL.<init>(URL.java:620)
>         at java.net.URL.<init>(URL.java:483)
>         at java.net.URL.<init>(URL.java:432)
>         at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.installConfigurationFile(FeatureConfigInstaller.java:230)
>         at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:147)
>         at
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installConfigs(BundleInstallSupportImpl.java:297)
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installConfigs(FeaturesServiceImpl.java:1141)
>         at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:925)
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>         at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
>         at java.net.URL.<init>(URL.java:615)
>         ... 13 more
> 
> Upon restarting the container, I see the following message in the logs:
> 
> java.lang.NoSuchMethodError:
> org.elasticsearch.common.settings.Settings.settingsBuilder()Lorg/elasticsearch/common/settings/Settings$Builder;
>         at
> org.apache.karaf.decanter.elasticsearch.EmbeddedNode.start(EmbeddedNode.java:86)
> ~[?:?]
>         at
> org.apache.karaf.decanter.elasticsearch.EmbeddedNode.acticate(EmbeddedNode.java:65)
> ~[?:?]
>         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:497) ~[?:?]
>         at
> org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229)
> ~[50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
> ~[50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650)
> ~[50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:298)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:109)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:907)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:880)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:764)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:675)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:430)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:387)
> [50:org.apache.felix.scr:2.0.14]
>         at org.apache.felix.scr.impl.Activator.access$200(Activator.java:52)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:262)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49)
> [50:org.apache.felix.scr:2.0.14]
>         at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
> [?:?]
>         at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
> [?:?]
>         at
> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]
>         at
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
> [?:?]
>         at
> org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
> [?:?]
>         at
> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
> [?:?]
>         at
> org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
> [?:?]
>         at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579)
> [?:?]
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:2174)
> [?:?]
>         at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373) [?:?]
>         at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
> [?:?]
>         at java.lang.Thread.run(Thread.java:745) [?:?]
> 
> The bundles are in resolved state, but if I start them manually, they become
> active, but then comes a whole bunch of errors (error getting NodesInfo and
> keeps polling *:9200)
> 
> I do not have elasticsearch right now, and possibly not in the recent times
> as well. But then my curiosity would be, "what would I use these logs with?"
> I understand that, with Elasticsearch, life would be much easier for me, but
> there are some constraints right now.
> 
> At the moment, my aim is to gather logs from all the cellar nodes (for which
> I am using mbean as a workaround, as cellar-log did not give me enough
> information). My current approach is not a good one, although it works. I
> was wondering if there a minimal installation of decanter that I can
> install, and may be use Rest API to fetch the logs or something like that.
> 
> Regards,
> Cooshal.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com