Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.5: output:splunk: Error http_status=401 Token is required #8867

Closed
nehjain17 opened this issue May 24, 2024 · 8 comments
Closed

3.0.5: output:splunk: Error http_status=401 Token is required #8867

nehjain17 opened this issue May 24, 2024 · 8 comments
Assignees

Comments

@nehjain17
Copy link

With 3.0.5 getting below error.
[2024/05/24 05:47:13] [ warn] [output:splunk:splunk.16] http_status=401:
{"text":"Token is required","code":2}

@edsiper
Copy link
Member

edsiper commented May 24, 2024

Please provide your full configuration

@nehjain17
Copy link
Author

output plugin

[OUTPUT]
Name splunk
Match index1
event_index index1
host splunk_host_name
Port 443
splunk_token ${TOKEN}
tls On
tls.verify Off
Retry_Limit 5
net.connect_timeout 30
net.keepalive on

@rchopd
Copy link

rchopd commented May 24, 2024

we are also facing same issue... 3.0.4 had lot of warning noise so upgraded to 3.0.5 which gave us "Token is required" error, despite of providing splunk_token in output config
@edsiper can you please take a look at it.

[2024/05/24 22:02:24] [debug] [output:splunk:splunk.0] Could not find hec_token in metadata
[2024/05/24 22:02:24] [debug] [output:splunk:splunk.0] Could not find hec_token in metadata
[2024/05/24 22:02:24] [debug] [output:splunk:splunk.0] Could not find hec_token in metadata
[2024/05/24 22:02:24] [debug] [http_client] not using http_proxy for header
[2024/05/24 22:02:24] [ warn] [output:splunk:splunk.0] http_status=401:
{"text":"Token is required","code":2}

@edsiper
Copy link
Member

edsiper commented May 26, 2024

I am looking into this.

@edsiper edsiper self-assigned this May 26, 2024
edsiper added a commit that referenced this issue May 26, 2024
…token behavior (fix #8867)

In the previous Splunk metadata fix, I introduced an issue where the metadata auth header was
always set even if the metadata was not there, the code was generating an emptry string which
leads to skip the classic splunk_token auth mechanism.

This patch corrects the recent bug by validating first and returning a proper NULL when
metadata auth header (hec_token) is not there.

Signed-off-by: Eduardo Silva <eduardo@calyptia.com>
@edsiper
Copy link
Member

edsiper commented May 26, 2024

I have pushed #8873 to fix this issue.

@rchopd
Copy link

rchopd commented May 26, 2024

Hey @edsiper
Thanks for fixing the issue. Will it be available in 3.0.5 or you are going to create a new tag?

@edsiper
Copy link
Member

edsiper commented May 26, 2024

@rchopd v3.0.6 has been pushed, packages and images will be available in a couple of hours.

@rchopd
Copy link

rchopd commented May 26, 2024

Thanks a lot.. will test it once available and let you know our findings

markuman pushed a commit to markuman/fluent-bit that referenced this issue May 29, 2024
…token behavior (fix fluent#8867)

In the previous Splunk metadata fix, I introduced an issue where the metadata auth header was
always set even if the metadata was not there, the code was generating an emptry string which
leads to skip the classic splunk_token auth mechanism.

This patch corrects the recent bug by validating first and returning a proper NULL when
metadata auth header (hec_token) is not there.

Signed-off-by: Eduardo Silva <eduardo@calyptia.com>
Signed-off-by: Markus Bergholz <git@osuv.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants