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

grok filter crashes process on Alpine 3.8 #151

Open
nhnicwaller opened this issue Dec 8, 2018 · 0 comments
Open

grok filter crashes process on Alpine 3.8 #151

nhnicwaller opened this issue Dec 8, 2018 · 0 comments

Comments

@nhnicwaller
Copy link

I'm trying to install node-logstash in a Docker container based on Alpine Linux. Ideally I would like to use node-logstash within app containers to preprocess logs (trimming and structuring) before they are sent to my central log aggregation server.

I was able to get it working with the most basic pipeline configuration (stdin -> stdout) but when I add a grok pattern, the process immediately crashes on startup, as shown below.

[Sat, 08 Dec 2018 19:21:39 GMT] NOTICE Starting node-logstasth-agent 0.0.5
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Max http socket 100
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Loading config file : /opt/logstash/pipeline.conf
[Sat, 08 Dec 2018 19:21:39 GMT] INFO File loaded, 3 urls found
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Loading config : 6 urls
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Initializing output Stdout
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Initializing filter AddHost
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Initializing filter AddTimestamp
[Sat, 08 Dec 2018 19:21:39 GMT] INFO Initializing filter AddVersion


#
# Fatal error in ../deps/v8/src/api.cc, line 1249
# Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().
#

The Dockerfile is very simple.

FROM alpine:3.8
RUN apk add --update make g++ python2 nodejs-npm \
  && mkdir -p /opt/logstash \
  && cd /opt/logstash \
  && npm install --no-optional [email protected] [email protected] node-logstash
ADD pipeline.conf /opt/logstash/pipeline.conf
CMD ["/opt/logstash/node_modules/.bin/node-logstash-agent", "--config_file", "/opt/logstash/pipeline.conf" ]

The pipeline.conf is also simple.

input { stdin {} }
filter { grok { match => "" } }
output { stdout {} }

With the files shown above, here are the steps to reproduce.

docker build --tag node-logstash .
docker run --rm -it node-logstash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant