Discussion:
[ansible-project] ansible gem not installing dependencies
J Soetanto
2014-10-26 23:57:58 UTC
Permalink
Hi there,

I tried to install fluentd elasticsearch plugin using ansible gem, however
for some reason the installation does not install the dependencies even
though i explicitly set to install dependencies

Background:

- ansible 1.7.1
- ubuntu 12.04
- elasticsearch installed separately
- install fluentd from tresuredata repo
- apt_key: url=http://packages.treasuredata.com/GPG-KEY-td-agent
state=present
- apt_repository: repo='deb
http://packages.treasuredata.com/2/ubuntu/precise/ precise contrib' state
=present
- apt: name=td-agent state=present force=yes

Trying the following code result with success, however the td-agent service
can't start because it is missing some dependencies

gem: name=fluent-plugin-elasticsearch state=present executable=/opt/td-agent
/embedded/bin/fluent-gem include_dependencies=yes

When starting the service ,receive error

fluent/supervisor.rb:257:rescue in main_process: config error file=
"/etc/td-agent/td-agent.conf" error="Unknown output plugin 'elasticsearch'.
Run 'gem search -rd fluent-plugin' to find plugins"

However if i execute it using standard command (below) , i don't encounter
the problem

command: /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-
elasticsearch

How do i know it is missing dependencies? When i see the gem list under
td-agent directory (/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/) no
elasticsearch listed there when installing using "ansible gem" . if i try
to install elasticsearch using "ansible gem" it will complain it is missing
other fluentd plugins.

Is this problem with gem plugin ? or can anyone shed any light on this?

Thanks,
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3ca38c32-3cc0-4c1a-8046-dba0af11e723%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
J Soetanto
2014-10-27 01:43:39 UTC
Permalink
​Really weird, after tinkering i got it working by adding "user_install=no"
. The gem executable is slightly different

gem: name=fluent-plugin-elasticsearch state=present executable=/usr/sbin/td-
agent-gem user_install=no​

For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?
Post by J Soetanto
Hi there,
I tried to install fluentd elasticsearch plugin using ansible gem, however
for some reason the installation does not install the dependencies even
though i explicitly set to install dependencies
- ansible 1.7.1
- ubuntu 12.04
- elasticsearch installed separately
- install fluentd from tresuredata repo
- apt_key: url=http://packages.treasuredata.com/GPG-KEY-td-agent
state=present
- apt_repository: repo='deb
http://packages.treasuredata.com/2/ubuntu/precise/ precise contrib'
state=present
- apt: name=td-agent state=present force=yes
Trying the following code result with success, however the td-agent
service can't start because it is missing some dependencies
gem: name=fluent-plugin-elasticsearch state=present executable=/opt/td-
agent/embedded/bin/fluent-gem include_dependencies=yes
When starting the service ,receive error
fluent/supervisor.rb:257:rescue in main_process: config error file=
"/etc/td-agent/td-agent.conf" error="Unknown output plugin
'elasticsearch'. Run 'gem search -rd fluent-plugin' to find plugins"
However if i execute it using standard command (below) , i don't encounter
the problem
command: /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-
elasticsearch
How do i know it is missing dependencies? When i see the gem list under
td-agent directory (/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/) no
elasticsearch listed there when installing using "ansible gem" . if i try
to install elasticsearch using "ansible gem" it will complain it is missing
other fluentd plugins.
Is this problem with gem plugin ? or can anyone shed any light on this?
Thanks,
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael DeHaan
2014-10-30 17:55:45 UTC
Permalink
"For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?"

I would hope so, yes.

Perhaps this is something about that particular gem?
Post by J Soetanto
​Really weird, after tinkering i got it working by adding
"user_install=no" . The gem executable is slightly different
gem: name=fluent-plugin-elasticsearch state=present executable=/usr/sbin/
td-agent-gem user_install=no​
For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?
Post by J Soetanto
Hi there,
I tried to install fluentd elasticsearch plugin using ansible gem,
however for some reason the installation does not install the dependencies
even though i explicitly set to install dependencies
- ansible 1.7.1
- ubuntu 12.04
- elasticsearch installed separately
- install fluentd from tresuredata repo
- apt_key: url=http://packages.treasuredata.com/GPG-KEY-td-agent
state=present
- apt_repository: repo='deb http://packages.treasuredata.
com/2/ubuntu/precise/ precise contrib' state=present
- apt: name=td-agent state=present force=yes
Trying the following code result with success, however the td-agent
service can't start because it is missing some dependencies
gem: name=fluent-plugin-elasticsearch state=present executable=/opt/td-
agent/embedded/bin/fluent-gem include_dependencies=yes
When starting the service ,receive error
fluent/supervisor.rb:257:rescue in main_process: config error file=
"/etc/td-agent/td-agent.conf" error="Unknown output plugin
'elasticsearch'. Run 'gem search -rd fluent-plugin' to find plugins"
However if i execute it using standard command (below) , i don't
encounter the problem
command: /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-
elasticsearch
How do i know it is missing dependencies? When i see the gem list under
td-agent directory (/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/) no
elasticsearch listed there when installing using "ansible gem" . if i try
to install elasticsearch using "ansible gem" it will complain it is missing
other fluentd plugins.
Is this problem with gem plugin ? or can anyone shed any light on this?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgz%2B6rDHWXLPodV9Zeg7%2BOErifsdqUKuFQEJFXhe37t4Ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Kyle Tarplee
2015-07-29 15:56:52 UTC
Permalink
I'm having the same issue with beanstalkd_view
gem: name=beanstalkd_view user_install=no include_dependencies=yes
state=present

will not install dependencies of beanstalkd_view.
Ubuntu 14.04LTS and the ansible 1.9.2
Post by Michael DeHaan
"For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?"
I would hope so, yes.
Perhaps this is something about that particular gem?
Post by J Soetanto
​Really weird, after tinkering i got it working by adding
"user_install=no" . The gem executable is slightly different
gem: name=fluent-plugin-elasticsearch state=present executable=/usr/sbin/
td-agent-gem user_install=no​
For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?
Post by J Soetanto
Hi there,
I tried to install fluentd elasticsearch plugin using ansible gem,
however for some reason the installation does not install the dependencies
even though i explicitly set to install dependencies
- ansible 1.7.1
- ubuntu 12.04
- elasticsearch installed separately
- install fluentd from tresuredata repo
- apt_key: url=http://packages.treasuredata.com/GPG-KEY-td-agent
state=present
- apt_repository: repo='deb http://packages.treasuredata.
com/2/ubuntu/precise/ precise contrib' state=present
- apt: name=td-agent state=present force=yes
Trying the following code result with success, however the td-agent
service can't start because it is missing some dependencies
gem: name=fluent-plugin-elasticsearch state=present executable=/opt/td-
agent/embedded/bin/fluent-gem include_dependencies=yes
When starting the service ,receive error
fluent/supervisor.rb:257:rescue in main_process: config error file=
"/etc/td-agent/td-agent.conf" error="Unknown output plugin
'elasticsearch'. Run 'gem search -rd fluent-plugin' to find plugins"
However if i execute it using standard command (below) , i don't
encounter the problem
command: /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-
elasticsearch
How do i know it is missing dependencies? When i see the gem list under
td-agent directory (/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/)
no elasticsearch listed there when installing using "ansible gem" . if i
try to install elasticsearch using "ansible gem" it will complain it is
missing other fluentd plugins.
Is this problem with gem plugin ? or can anyone shed any light on this?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ce8e2e66-5875-4b4d-bea7-8670290c4c88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kyle Tarplee
2015-07-29 16:12:50 UTC
Permalink
I just figured it out. The existence of /root/.gems that met the
dependencies of beanstalkd_view is what caused the issue. Gem thought the
dependencies were met eventhough they were not when it was installing
system wide in /var/lib/gems. I think the default for user_install should
be false (system wide should be the default). That is why I had packages
installed in root's home directory to begin with. Removing the directory
/root/.gems solved the problem.
Post by Kyle Tarplee
I'm having the same issue with beanstalkd_view
gem: name=beanstalkd_view user_install=no include_dependencies=yes
state=present
will not install dependencies of beanstalkd_view.
Ubuntu 14.04LTS and the ansible 1.9.2
Post by Michael DeHaan
"For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?"
I would hope so, yes.
Perhaps this is something about that particular gem?
Post by J Soetanto
​Really weird, after tinkering i got it working by adding
"user_install=no" . The gem executable is slightly different
gem: name=fluent-plugin-elasticsearch state=present executable=/usr/sbin
/td-agent-gem user_install=no​
For some reason without user install option , i found that the gem was
installed under root home directory. Shouldn't by default it install it
system wide?
Post by J Soetanto
Hi there,
I tried to install fluentd elasticsearch plugin using ansible gem,
however for some reason the installation does not install the dependencies
even though i explicitly set to install dependencies
- ansible 1.7.1
- ubuntu 12.04
- elasticsearch installed separately
- install fluentd from tresuredata repo
- apt_key: url=http://packages.treasuredata.com/GPG-KEY-td-agent
state=present
- apt_repository: repo='deb http://packages.treasuredata.
com/2/ubuntu/precise/ precise contrib' state=present
- apt: name=td-agent state=present force=yes
Trying the following code result with success, however the td-agent
service can't start because it is missing some dependencies
gem: name=fluent-plugin-elasticsearch state=present executable=/opt/td-
agent/embedded/bin/fluent-gem include_dependencies=yes
When starting the service ,receive error
fluent/supervisor.rb:257:rescue in main_process: config error file=
"/etc/td-agent/td-agent.conf" error="Unknown output plugin
'elasticsearch'. Run 'gem search -rd fluent-plugin' to find plugins"
However if i execute it using standard command (below) , i don't
encounter the problem
command: /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-
elasticsearch
How do i know it is missing dependencies? When i see the gem list under
td-agent directory (/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/)
no elasticsearch listed there when installing using "ansible gem" . if i
try to install elasticsearch using "ansible gem" it will complain it is
missing other fluentd plugins.
Is this problem with gem plugin ? or can anyone shed any light on this?
Thanks,
--
You received this message because you are subscribed to the Google
Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/602a726d-a055-4237-877d-ceb3f7613c77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...