[2020-07-04T04:20:32,313][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 500 ({"type"=>"exception", "reason"=>"java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [uid] already exists", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"java.lang.IllegalArgumentException: field [uid] already exists", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"field [uid] already exists"}}, "header"=>{"processor_type"=>"rename"}})
[2020-07-04T04:20:32,313][INFO ][logstash.outputs.elasticsearch] Retrying individual bulk actions that failed or were rejected by the previous bulk request. {:count=>1}
{"ts":"2020-07-04T16:11:44.436863Z","uid":"C0ZaPQKzQcZauSjn4","id.orig_h":"172.16.81.226","id.orig_p":53098,"id.resp_h":"172.217.14.202","id.resp_p":443,"version":"TLSv13","cipher":"TLS_AES_128_GCM_SHA256","curve":"x25519","server_name":"addons-pa.clients6.google.com","resumed":true,"established":true}
Example log in /var/log/apache2/other_vhosts_access.log
nsm.domain.ca:81 nsm.domain.ca - - [06/Jul/2020:22:48:35 +0000] "OPTIONS * HTTP/1.0\" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection)
gets parsed
**Phase 1: Completed pre-decoding.
full event: 'nsm.domain.ca:81 nsm.domain.ca - - [06/Jul/2020:22:48:35 +0000] "OPTIONS * HTTP/1.0\" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection) '
timestamp: '(null)'
hostname: 'calnsm'
program_name: '(null)'
log: 'nsm.domain.ca:81 nsm.domain.ca - - [06/Jul/2020:22:48:35 +0000] "OPTIONS * HTTP/1.0\" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection) '
**Phase 2: Completed decoding.
decoder: 'web-accesslog'
srcip: 'nsm.domain.ca'
protocol: 'OPTIONS'
url: '*'
id: '200'
resulting in an archives.json record of
{"timestamp":"2020-07-06T22:48:37.400+0000","agent":{"id":"000","name":"calnsm.domain.ca"},"manager":{"name":"calnsm.domain.ca"},"id":"1594075717.3281941","full_log":"nsm.domain.ca:81 nsm.domain.ca - - [06/Jul/2020:22:48:35 +0000] \"OPTIONS * HTTP/1.0\" 200 126 \"-\" \"Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection)\"","decoder":{"parent":"web-accesslog","name":"web-accesslog"},"data":{"protocol":"OPTIONS","srcip":"nsm.domain.ca","id":"200","url":"*"},"location":"/var/log/apache2/other_vhosts_access.log"}
which due to the non-IP value placed in the srcip field by the decoder, upsets the Logstash geoip filter
[2020-07-06T20:39:03,717][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 500 ({"type"=>"exception", "reason"=>"java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: 'nsm.domain.ca' is not an IP string literal.", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"java.lang.IllegalArgumentException: 'nsm.domain.ca' is not an IP string literal.", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"'nsm.domain.ca' is not an IP string literal."}}, "header"=>{"processor_type"=>"geoip"}})
and for some reason this causes Logstash to completely jam, endlessly retrying the same impossible geoip operation on that non-IP address value.
[2020-07-06T20:39:03,717][INFO ][logstash.outputs.elasticsearch] Retrying individual bulk actions that failed or were rejected by the previous bulk request. {:count=>1}
--
Follow Security Onion on Twitter!
https://twitter.com/securityonion
---
You received this message because you are subscribed to the Google Groups "security-onion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to security-onio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/security-onion/CA%2BdGL9Fds1p6c6gxUjOc1kQ%2BskJf%2BDNUAyX24rWYNZOF-h9mLw%40mail.gmail.com.
"geoip": {
"field": "destination_ip",
"target_field": "destination_geo",
"database_file": "GeoLite2-City.mmdb",
"ignore_missing": true,
"ignore_failure": true,
"properties": ["ip", "country_name", "region_iso_code", "region_name", "city_name", "timezone", "location"]
}
Then run so-elasticsearch-pipelines, and confirm that the updated pipeline is loaded:
curl -s localhost:9200/_ingest/pipeline/common | jq . | grep geoip -A5
Let me know if you still run into issues after doing so.
Thanks,
Wes
To view this discussion on the web visit https://groups.google.com/d/msgid/security-onion/CAHjBB6GJjTfPukj0jqxHQC0QARmHJJ%2BWQ2DOzrL8657J3NMM%2Bw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/security-onion/CA%2BdGL9EVvn_djtmcuPKuJm4DZKZnbMSJEjBmvCfVL%2BAkYoUf2w%40mail.gmail.com.