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

Oj is not installed, and failing back to Yajl for json parser even if oj gem is installed #2136

Closed
alexander-stepanov opened this issue Sep 22, 2018 · 2 comments

Comments

@alexander-stepanov
Copy link

I can see this warning in the log when we have migrated from alpine 3.7 to 3.8 in our base Docker container with ruby 2.5.1, fluentd 1.2.5, and installed oj-3.6.10:

"#0 [http_input] Oj is not installed, and failing back to Yajl for json parser"

Steps to reproduce:
Run an official Alpine Docker container docker run -it --rm alpine:3.8 and execute the following commands:

apk add --update ruby ruby-dev ruby-irb build-base
gem install etc json oj webrick fluentd -N
fluentd -s
fluentd

An example log:

2018-09-22 08:21:33 +0000 [info]: starting fluentd-1.2.5 pid=1423 ruby="2.5.1"
2018-09-22 08:21:33 +0000 [info]: spawn command to main:  cmdline=["/usr/bin/ruby", "-Eascii-8bit:ascii-8bit", "/usr/bin/fluentd", "--under-supervisor"]
2018-09-22 08:21:33 +0000 [info]: gem 'fluentd' version '1.2.5'
2018-09-22 08:21:33 +0000 [info]: adding match pattern="debug.**" type="stdout"
2018-09-22 08:21:33 +0000 [info]: adding match pattern="system.**" type="forward"
2018-09-22 08:21:33 +0000 [info]: #0 adding forwarding server '192.168.0.12:24224' host="192.168.0.12" port=24224 weight=60 plugin_id="object:2aed9b79cc38"
2018-09-22 08:21:33 +0000 [info]: #0 [forward_output] adding forwarding server '192.168.0.11:24224' host="192.168.0.11" port=24224 weight=60 plugin_id="forward_output"
2018-09-22 08:21:33 +0000 [info]: adding source type="forward"
2018-09-22 08:21:33 +0000 [info]: adding source type="http"
2018-09-22 08:21:33 +0000 [info]: #0 [http_input] Oj is not installed, and failing back to Yajl for json parser
2018-09-22 08:21:33 +0000 [info]: adding source type="monitor_agent"
2018-09-22 08:21:33 +0000 [info]: adding source type="debug_agent"
2018-09-22 08:21:33 +0000 [info]: #0 starting fluentd worker pid=1427 ppid=1423 worker=0
2018-09-22 08:21:33 +0000 [info]: #0 delayed_commit_timeout is overwritten by ack_response_timeout
2018-09-22 08:21:33 +0000 [info]: #0 [forward_output] delayed_commit_timeout is overwritten by ack_response_timeout
2018-09-22 08:21:33 +0000 [info]: #0 [debug_agent_input] listening dRuby uri="druby://127.0.0.1:24230" object="Fluent::Engine" worker=0
2018-09-22 08:21:33 +0000 [info]: #0 [forward_input] listening port port=24224 bind="0.0.0.0"
2018-09-22 08:21:33 +0000 [info]: #0 fluentd worker is now running worker=0

The same scenario worked well in Alpine 3.7 (the only notable difference it had Ruby 2.4.4).

@okkez
Copy link
Contributor

okkez commented Sep 25, 2018

You must run gem install bigdecimal or apk add --update ruby-bigdecimal in you Dockerfile.
Because ruby-bigdecimal is the separated package.

@alexander-stepanov
Copy link
Author

Thanks, @okkez
I've added the bigdecimal gem to our Dockerfile and it did the trick!

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

2 participants