You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by dzoni <ch...@zf.com> on 2020/03/30 09:32:38 UTC

REST Collector Appender

Hello There, 

i'm Building up an infrastructure example to Transport my harvested
Log-Messages into another Karaf.
The configurations i left like rest transport over localhost and port 8181

So therefor i set up my first Karaf(client) like this:
1. My application is running there and generating log-Messages
2. Decanter log-collector
3. Decanter  rest-appender

i'm running also another Karaf (server), which should receive the data of
the Client-Karaf. therefor i set up this kataf with following stuff:
1. Decanter rest-Collector
2. Decanter rest-servlet-collector

*at the Client-side i'll get following Warn-message:*
 WARN [EventAdminThread #3] Error sending event to rest service
java.io.IOException: Server returned HTTP response code: 403 for URL:
http://localhost:8181
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
~[?:1.8.0_242]
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
~[?:1.8.0_242]
        at
org.apache.karaf.decanter.appender.rest.RestAppender.handleEvent(RestAppender.java:93)
[!/:?]
        at
org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)
[!/:?]
        at
org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:70)
[!/:?]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_242]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[?:1.8.0_242]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_242]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_242]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]


*at the Server-side i'll get following Warn-message:*
WARN [Karaf_Worker-3] Can't request REST service
java.io.FileNotFoundException: http://localhost:8181/metrics
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1896)
~[?:1.8.0_242]
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
~[?:1.8.0_242]
        at
org.apache.karaf.decanter.collector.rest.RestCollector.run(RestCollector.java:97)
[!/:?]
        at
org.apache.karaf.scheduler.core.QuartzJobExecutor.execute(QuartzJobExecutor.java:60)
[!/:?]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [!/:?]
        at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
[!/:?]


Where i have to Change configurations or anything else, so the server-Karaf
will receive the log-Messages of the Client-Karaf. So that i can read them
at the server-karaf with the command: log:display or in another way?

thanks a lot for helpful answers
greetings
dzoni



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html