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

[elasticsearch] Error when indexing empty user-agent #2256

Closed
klausbrombeere opened this issue May 17, 2019 · 0 comments

Comments

3 participants
@klausbrombeere
Copy link

commented May 17, 2019

If it's active user agent on pipeline reporter
pipeline:
plugins:
ingest: geoip, user_agent

And the consumer does not provide appropriate user_agent, transaction it's not logged.

Expected Behavior

Log transaction and saved it in Elasticsearch

Current Behavior

[2019-05-17T11:48:32,150][DEBUG][o.e.a.b.TransportBulkAction] [node-1] failed to execute pipeline [gravitee_pipeline] for document [gravitee-request-2019.05.17/request/182932e2-78aa-4529-a932-e278aae5296b]
org.elasticsearch.ElasticsearchException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [user-agent] not present as part of path [user-agent]
	at org.elasticsearch.ingest.CompoundProcessor.newCompoundProcessorException(CompoundProcessor.java:195) ~[elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.ingest.CompoundProcessor.execute(CompoundProcessor.java:134) ~[elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.ingest.Pipeline.execute(Pipeline.java:100) ~[elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.ingest.IngestService.innerExecute(IngestService.java:473) ~[elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.ingest.IngestService.access$100(IngestService.java:68) ~[elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.ingest.IngestService$4.doRun(IngestService.java:402) [elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751) [elasticsearch-6.7.2.jar:6.7.2]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.7.2.jar:6.7.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [user-agent] not present as part of path [user-agent]

Possible Solution

user-agent parameter must be optional for save log.

Steps to Reproduce (for bugs)

Enable user-agent pipeline in gravitee-gateway

Your Environment

  • Version used: Gravitee-gateway 1.25.3
  • Browser Name and version: Chrome
  • Operating System and version: RHEL 7.6 x64

@brasseld brasseld changed the title [gateway][logging] Error logging on Elasticsearch [elasticsearch] Error when indexing empty user-agent Jun 6, 2019

@brasseld brasseld added this to the APIM - 1.27.0 milestone Jun 6, 2019

brasseld added a commit to gravitee-io/gravitee-elasticsearch that referenced this issue Jun 6, 2019

fix(elasticsearch): Include an empty user-agent field value when pepi…
…le is enabled and no user-agent is provided for the request

Closes gravitee-io/issues#2256

aelamrani added a commit to gravitee-io/gravitee-elasticsearch that referenced this issue Jun 13, 2019

fix(elasticsearch): Include an empty user-agent field value when pepi…
…le is enabled and no user-agent is provided for the request

Closes gravitee-io/issues#2256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.