0

I am trying to stream my Ubuntu rsyslog/syslog log messages to central log analytics service jKoolCloud and I am getting the following error:

java.lang.SecurityException: Failed to authenticate with service='https://data.jkoolcloud.com:6580' 
        at com.jkool.jesl.net.security.AuthUtils.authenticate(AuthUtils.java:41)
        at com.jkool.jesl.net.http.HttpClient.connect(HttpClient.java:180)
        at com.jkool.jesl.net.JKClient.connect(JKClient.java:127)
        at com.jkool.jesl.tnt4j.sink.JKCloudEventSink.open(JKCloudEventSink.java:180)
        at com.nastel.jkool.tnt4j.sink.LoggingTask.openSink(PooledLogger.java:313)
        at com.nastel.jkool.tnt4j.sink.LoggingTask.isLoggable(PooledLogger.java:335)
        at com.nastel.jkool.tnt4j.sink.LoggingTask.processEvent(PooledLogger.java:374)
        at com.nastel.jkool.tnt4j.sink.LoggingTask.run(PooledLogger.java:405)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.SecurityException: Specified access token rejected
        at com.jkool.jesl.net.http.HttpClient.read(HttpClient.java:277)
        at com.jkool.jesl.net.security.AuthUtils.authenticate(AuthUtils.java:39)
        ... 10 more

I did add my API access token to tnt4j.properties but still getting the same error? What am I doing wrong?

DBug
  • 2,502
  • 1
  • 12
  • 25

1 Answers1

0

First, make sure to stream to port 6585 (https) instead of 6580.

Second, tnt4j.properties has multiple stanza per source.

Make sure you added your API access token under the correct stanza. You want to add it under "source: com.jkool.jesl.net.syslogd" stanza.

Here is an example:

event.sink.factory.EventSinkFactory: com.jkool.jesl.tnt4j.sink.JKCloudEventSinkFactory
;event.sink.factory.EventSinkFactory.Filename: jkoocloud.json
event.sink.factory.EventSinkFactory.Url: https://data.jkoolcloud.com:6585
event.sink.factory.EventSinkFactory.Token: ACCESS-TOKEN
event.formatter: com.nastel.jkool.tnt4j.format.JSONFormatter

AlbertM