You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by mariobuonocore <ma...@nttdata.com> on 2018/10/25 14:56:48 UTC

Decanter MongoDB appender doesn't work

Hi all,
after installing Karaf, Decanter and MongoDB appender on Ubuntu 18.04
virtual machine, I cannot find logs or anything else on db collection in
MongoDB.
I can work normally with MongoDB from command line and with Robo3T.

However, when I start or stop Karaf, or I generate an error or I install
some new bundle, I cannot see anything saved on MongoDB.

What am I wrong?

Those are my mongo features installed on karaf:


karaf@root()> list -t 0 | grep -i mongo
126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Appender :: MongoDB
136 │ Active   │  80 │ 3.8.2              │ mongo-java-driver


And this is my Karaf etc/org.apache.karaf.decanter.appender.mongodb.cfg :


################################
# Decanter MongoDB Configuration
################################

# MongoDB connection URI
uri=mongodb://localhost:27017

# MongoDB database name
database=decanter

# MongoDB collection name
collection=decanter

# Marshaller to use (json is recommended)
marshaller.target=(dataFormat=json)



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

Re: Decanter MongoDB appender doesn't work

Posted by Francois Papon <fr...@openobject.fr>.
You're welcome,

Don't hesitate, we are here to help users ;)

regards,

François Papon
fpapon@apache.org

Le 05/11/2018 à 13:34, mariobuonocore a écrit :
> Thank you JB to have solved the issue and thank you François Papon for the
> support.
>
> Mario
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Decanter MongoDB appender doesn't work

Posted by mariobuonocore <ma...@nttdata.com>.
Thank you JB to have solved the issue and thank you François Papon for the
support.

Mario



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

Re: Decanter MongoDB appender doesn't work

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

just to let you know that the MongoDB appender has been fixed.

It's already included in Decanter 2.2.0-SNAPSHOT and it will be included
in 2.2.0 release (planned for beginning of December).

Regards
JB

On 25/10/2018 16:56, mariobuonocore wrote:
> Hi all,
> after installing Karaf, Decanter and MongoDB appender on Ubuntu 18.04
> virtual machine, I cannot find logs or anything else on db collection in
> MongoDB.
> I can work normally with MongoDB from command line and with Robo3T.
> 
> However, when I start or stop Karaf, or I generate an error or I install
> some new bundle, I cannot see anything saved on MongoDB.
> 
> What am I wrong?
> 
> Those are my mongo features installed on karaf:
> 
> 
> karaf@root()> list -t 0 | grep -i mongo
> 126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Appender :: MongoDB
> 136 │ Active   │  80 │ 3.8.2              │ mongo-java-driver
> 
> 
> And this is my Karaf etc/org.apache.karaf.decanter.appender.mongodb.cfg :
> 
> 
> ################################
> # Decanter MongoDB Configuration
> ################################
> 
> # MongoDB connection URI
> uri=mongodb://localhost:27017
> 
> # MongoDB database name
> database=decanter
> 
> # MongoDB collection name
> collection=decanter
> 
> # Marshaller to use (json is recommended)
> marshaller.target=(dataFormat=json)
> 
> 
> 
> --
> 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: Decanter MongoDB appender doesn't work

Posted by mariobuonocore <ma...@nttdata.com>.
Hi François,
yes, I am using Karaf 4.2.1

Thank you,

Mario



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

Re: Decanter MongoDB appender doesn't work

Posted by Francois Papon <fr...@openobject.fr>.
Ok, you are using Karaf 4.2.1 ?

I will try to reproduce

regards,

François Papon
fpapon@apache.org

Le 25/10/2018 à 19:18, mariobuonocore a écrit :
> Hi fpapon,
> thank you for your reply.
> Yes, i have installed it:
>
> karaf@root()> list -t 0 | grep -i decanter
> 108 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter :: API
> *109 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Collector :: Log*
> 110 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Marshaller :: CSV
> 111 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Marshaller :: Json
> 125 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Collector :: EventAdmin
> 126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Appender :: MongoDB
> 127 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Alerting :: Checker
> 129 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Alerting :: Command
> 130 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Alerting :: e-mail
> 131 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Alerting :: Management
> 139 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Collector :: JMX
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Decanter MongoDB appender doesn't work

Posted by mariobuonocore <ma...@nttdata.com>.
Hi fpapon,
thank you for your reply.
Yes, i have installed it:

karaf@root()> list -t 0 | grep -i decanter
108 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter :: API
*109 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Collector :: Log*
110 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Marshaller :: CSV
111 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Marshaller :: Json
125 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Collector :: EventAdmin
126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Appender :: MongoDB
127 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Alerting :: Checker
129 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Alerting :: Command
130 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Alerting :: e-mail
131 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Alerting :: Management
139 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
Collector :: JMX



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

Re: Decanter MongoDB appender doesn't work

Posted by Francois Papon <fr...@openobject.fr>.
My mistake,

decanter-collector-log ;)

regards,

François Papon
fpapon@apache.org

Le 25/10/2018 à 18:59, Francois Papon a écrit :
> Hi,
>
> Did you install the decanter-connector-log ?
>
> regards,
>
> François Papon
> fpapon@apache.org
>
> Le 25/10/2018 à 18:56, mariobuonocore a écrit :
>> Hi all,
>> after installing Karaf, Decanter and MongoDB appender on Ubuntu 18.04
>> virtual machine, I cannot find logs or anything else on db collection in
>> MongoDB.
>> I can work normally with MongoDB from command line and with Robo3T.
>>
>> However, when I start or stop Karaf, or I generate an error or I install
>> some new bundle, I cannot see anything saved on MongoDB.
>>
>> What am I wrong?
>>
>> Those are my mongo features installed on karaf:
>>
>>
>> karaf@root()> list -t 0 | grep -i mongo
>> 126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
>> Appender :: MongoDB
>> 136 │ Active   │  80 │ 3.8.2              │ mongo-java-driver
>>
>>
>> And this is my Karaf etc/org.apache.karaf.decanter.appender.mongodb.cfg :
>>
>>
>> ################################
>> # Decanter MongoDB Configuration
>> ################################
>>
>> # MongoDB connection URI
>> uri=mongodb://localhost:27017
>>
>> # MongoDB database name
>> database=decanter
>>
>> # MongoDB collection name
>> collection=decanter
>>
>> # Marshaller to use (json is recommended)
>> marshaller.target=(dataFormat=json)
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Decanter MongoDB appender doesn't work

Posted by Francois Papon <fr...@openobject.fr>.
Hi,

Did you install the decanter-connector-log ?

regards,

François Papon
fpapon@apache.org

Le 25/10/2018 à 18:56, mariobuonocore a écrit :
> Hi all,
> after installing Karaf, Decanter and MongoDB appender on Ubuntu 18.04
> virtual machine, I cannot find logs or anything else on db collection in
> MongoDB.
> I can work normally with MongoDB from command line and with Robo3T.
>
> However, when I start or stop Karaf, or I generate an error or I install
> some new bundle, I cannot see anything saved on MongoDB.
>
> What am I wrong?
>
> Those are my mongo features installed on karaf:
>
>
> karaf@root()> list -t 0 | grep -i mongo
> 126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Appender :: MongoDB
> 136 │ Active   │  80 │ 3.8.2              │ mongo-java-driver
>
>
> And this is my Karaf etc/org.apache.karaf.decanter.appender.mongodb.cfg :
>
>
> ################################
> # Decanter MongoDB Configuration
> ################################
>
> # MongoDB connection URI
> uri=mongodb://localhost:27017
>
> # MongoDB database name
> database=decanter
>
> # MongoDB collection name
> collection=decanter
>
> # Marshaller to use (json is recommended)
> marshaller.target=(dataFormat=json)
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Decanter MongoDB appender doesn't work

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

I found the issue with the MongoDB appender: even if the bundle is
active, the underlying SCR component doesn't start and so the decanter
services are not available.

I'm fixing that for Decanter 2.2.0.

Sorry about that.

Regards
JB

On 30/10/2018 10:39, mariobuonocore wrote:
> MongoDB version is 4.0.3
> 
> Thanks a lot.
> 
> Mario
> 
> 
> 
> --
> 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: Decanter MongoDB appender doesn't work

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks for the update. I'm travelling today. I will take a look tomorrow. That's probably an easy fix that we will include in December decanter release.

Regards
JB

Le 1 nov. 2018 à 13:55, à 13:55, Francois Papon <fr...@openobject.fr> a écrit:
>Hi JB,
>
>I just tested on debug mode and the appender service is not activated,
>the method activate of the bundle is not called.
>
>May be some lib dependencies are missing.
>
>regards,
>
>François Papon
>fpapon@apache.org
>
>Le 31/10/2018 à 08:00, Jean-Baptiste Onofré a écrit :
>> Thanks,
>>
>> let me setup a test case.
>>
>> I keep you posted.
>>
>> Regards
>> JB
>>
>> On 30/10/2018 10:39, mariobuonocore wrote:
>>> MongoDB version is 4.0.3
>>>
>>> Thanks a lot.
>>>
>>> Mario
>>>
>>>
>>>
>>> --
>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>

Re: Decanter MongoDB appender doesn't work

Posted by Francois Papon <fr...@openobject.fr>.
Hi JB,

I just tested on debug mode and the appender service is not activated,
the method activate of the bundle is not called.

May be some lib dependencies are missing.

regards,

François Papon
fpapon@apache.org

Le 31/10/2018 à 08:00, Jean-Baptiste Onofré a écrit :
> Thanks,
>
> let me setup a test case.
>
> I keep you posted.
>
> Regards
> JB
>
> On 30/10/2018 10:39, mariobuonocore wrote:
>> MongoDB version is 4.0.3
>>
>> Thanks a lot.
>>
>> Mario
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>


Re: Decanter MongoDB appender doesn't work

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

let me setup a test case.

I keep you posted.

Regards
JB

On 30/10/2018 10:39, mariobuonocore wrote:
> MongoDB version is 4.0.3
> 
> Thanks a lot.
> 
> Mario
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

Re: Decanter MongoDB appender doesn't work

Posted by mariobuonocore <ma...@nttdata.com>.
MongoDB version is 4.0.3

Thanks a lot.

Mario



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

Re: Decanter MongoDB appender doesn't work

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK thanks for the update.

What's the MongoDB version ?

No exception in the log (log:exception-display) ?

I will try to reproduce.

Regards
JB

On 26/10/2018 10:16, mariobuonocore wrote:
> Hi JB,
> 
> I can manually log the string "foo" with log:log "foo" and I can see by
> command line the log just inserted with log:display or ld command.
> 
> The etc/org.ops4j.pax.logging.cfg in "OSGi appender" section is:
> 
> # OSGi appender
> log4j2.appender.osgi.type = PaxOsgi
> log4j2.appender.osgi.name = PaxOsgi
> log4j2.appender.osgi.filter = *
> 
> but I cannot see "foo" or anything in my MongoDB collection.
> 
> I forgot to say I am working behind a proxy server, but both Karaf and
> MongoDB are installed on the same Virtual Machine.
> 
> Thank you,
> 
> Mario
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

Re: Decanter MongoDB appender doesn't work

Posted by mariobuonocore <ma...@nttdata.com>.
Hi JB,

I can manually log the string "foo" with log:log "foo" and I can see by
command line the log just inserted with log:display or ld command.

The etc/org.ops4j.pax.logging.cfg in "OSGi appender" section is:

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

but I cannot see "foo" or anything in my MongoDB collection.

I forgot to say I am working behind a proxy server, but both Karaf and
MongoDB are installed on the same Virtual Machine.

Thank you,

Mario



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

Re: Decanter MongoDB appender doesn't work

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

do you have something in the log when you type log:display ?

Do you have only the log collector installed ?

Could you check:

1. etc/org.ops4j.pax.logging.cfg has * as filter for PaxOsgi appender:

log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *

2. Can you create a log manually using log:log "foo" log message.

Thanks,
Regards
JB

On 25/10/2018 16:56, mariobuonocore wrote:
> Hi all,
> after installing Karaf, Decanter and MongoDB appender on Ubuntu 18.04
> virtual machine, I cannot find logs or anything else on db collection in
> MongoDB.
> I can work normally with MongoDB from command line and with Robo3T.
> 
> However, when I start or stop Karaf, or I generate an error or I install
> some new bundle, I cannot see anything saved on MongoDB.
> 
> What am I wrong?
> 
> Those are my mongo features installed on karaf:
> 
> 
> karaf@root()> list -t 0 | grep -i mongo
> 126 │ Active   │  80 │ 2.0.0              │ Apache Karaf :: Decanter ::
> Appender :: MongoDB
> 136 │ Active   │  80 │ 3.8.2              │ mongo-java-driver
> 
> 
> And this is my Karaf etc/org.apache.karaf.decanter.appender.mongodb.cfg :
> 
> 
> ################################
> # Decanter MongoDB Configuration
> ################################
> 
> # MongoDB connection URI
> uri=mongodb://localhost:27017
> 
> # MongoDB database name
> database=decanter
> 
> # MongoDB collection name
> collection=decanter
> 
> # Marshaller to use (json is recommended)
> marshaller.target=(dataFormat=json)
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>