Closed envintus closed 6 years ago
@majormoses I know you've been doing a lot of the leg work with getting new releases cut, but could I trouble you to take a look at this? My Ruby isn't great and the only real differences I see between this plugin and others is in the actual gem spec itself. Not sure if that's helpful at all.
@envintus does this also have the same issue? /opt/sensu/embedded/bin/gem install sensu-plugins-memcached
, trying to rule out a bug with sensu-install.
Actually, I believe I may have been inaccurate in my description or didn't provide enough detail.
We are not using sensu-install. We use /opt/sensu/embedded/bin/gem to install the Sensu plugins, because we need to install other gems on our master. So, using the embedded gem installer it fails the first time and is successful the second time.
[image: FC_MIC2017StandardLogo.png]
[image: TransLoc_logos_wordmark_blue.png]
Hunter Satterwhite
Lead Build & Operations Engineer, TransLoc
252.762.5177 | www.transloc.com
[image: facebook-color-32px.png] https://www.facebook.com/TransLoc/ [image: linkedin-color-32px.png] https://www.linkedin.com/company/transloc [image: twitter-color-32px.png] http://www.twitter.com/transloc [image: instagram-color-32px.png] http://www.instagram.com/transloc_inc
On Fri, May 12, 2017 at 11:33 AM, Ben Abrams notifications@github.com wrote:
@envintus https://github.com/envintus does this also have the same issue? /opt/sensu/embedded/bin/gem install sensu-plugins-memcached, trying to rule out a bug with sensu-install.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sensu-plugins/sensu-plugins-memcached/issues/4#issuecomment-301109721, or mute the thread https://github.com/notifications/unsubscribe-auth/AIESglifxUK1ObJe_SAkh8hpd1czGBkIks5r5HvOgaJpZM4NZZ9D .
This seems suspicious to me: sh: 1: ruby: not found
which seems to indicate a $PATH issue.
Agreed, but all of the other plugins previous to it and after it install without a hitch. Maybe the path is getting munged some how? But other plugins, like sensu-memory-checks use some of the same build dependencies.
[image: FC_MIC2017StandardLogo.png]
[image: TransLoc_logos_wordmark_blue.png]
Hunter Satterwhite
Lead Build & Operations Engineer, TransLoc
252.762.5177 | www.transloc.com
[image: facebook-color-32px.png] https://www.facebook.com/TransLoc/ [image: linkedin-color-32px.png] https://www.linkedin.com/company/transloc [image: twitter-color-32px.png] http://www.twitter.com/transloc [image: instagram-color-32px.png] http://www.instagram.com/transloc_inc
On Fri, May 12, 2017 at 12:06 PM, Ben Abrams notifications@github.com wrote:
This seems suspicious to me: sh: 1: ruby: not found which seems to indicate a $PATH issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sensu-plugins/sensu-plugins-memcached/issues/4#issuecomment-301118153, or mute the thread https://github.com/notifications/unsubscribe-auth/AIESgtBO81EbRy6z4AnoKIGqJczXUEmbks5r5INogaJpZM4NZZ9D .
ya needs further investigation just pointing it out as it might be relevant and I am probably not gonna have much time until the weekend to take a look.
Have a couple of questions:
I just tried installing it locally (2.2.5 and will try the same later with 2.4) and after installing the package it prompted me to it worked afterwards.
$ gem install sensu-plugins-memcached
Fetching: memcached-1.8.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing sensu-plugins-memcached:
ERROR: Failed to build gem native extension.
/home/babrams/.rbenv/versions/2.2.5/bin/ruby -r ./siteconf20170512-8261-v72zx0.rb extconf.rb
checking for sasl/sasl.h... no
Please install SASL to continue. The package is called libsasl2-dev on Ubuntu and cyrus-sasl on Gentoo.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/babrams/.rbenv/versions/2.2.5/bin/$(RUBY_BASE_NAME)
extconf failed, exit code 1
Gem files will remain installed in /home/babrams/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/gems/memcached-1.8.0 for inspection.
Results logged to /home/babrams/.rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/memcached-1.8.0/gem_make.out
$ sudo apt-get install libsasl2-dev
[sudo] password for babrams:
Sorry, try again.
[sudo] password for babrams:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic
linux-headers-4.4.0-70 linux-headers-4.4.0-70-generic
linux-headers-4.4.0-71 linux-headers-4.4.0-71-generic
linux-image-4.4.0-66-generic linux-image-4.4.0-70-generic
linux-image-4.4.0-71-generic linux-image-extra-4.4.0-66-generic
linux-image-extra-4.4.0-70-generic linux-image-extra-4.4.0-71-generic
snap-confine
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
libsasl2-dev
0 upgraded, 1 newly installed, 0 to remove and 39 not upgraded.
Need to get 254 kB of archives.
After this operation, 831 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libsasl2-dev amd64 2.1.26.dfsg1-14build1 [254 kB]
Fetched 254 kB in 0s (582 kB/s)
Selecting previously unselected package libsasl2-dev.
(Reading database ... 479078 files and directories currently installed.)
Preparing to unpack .../libsasl2-dev_2.1.26.dfsg1-14build1_amd64.deb ...
Unpacking libsasl2-dev (2.1.26.dfsg1-14build1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libsasl2-dev (2.1.26.dfsg1-14build1) ...
$ gem install sensu-plugins-memcached
Building native extensions. This could take a while...
Successfully installed memcached-1.8.0
Fetching: sensu-plugins-memcached-0.0.3.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-memcached-0.0.3
Parsing documentation for memcached-1.8.0
Installing ri documentation for memcached-1.8.0
Parsing documentation for sensu-plugins-memcached-0.0.3
Installing ri documentation for sensu-plugins-memcached-0.0.3
Done installing documentation for memcached, sensu-plugins-memcached after 17 seconds
2 gems installed
@envintus I tried replicating locally outside of the context of sensu and was not able to: https://gist.github.com/majormoses/b4cc44accb0e8ac264a3eef5023c39f3
@envintus finally was able to re-produce: https://gist.github.com/majormoses/e22b1fb88d88bf6c333cbb1aa478a417
I feel this is rather sensu specific and not gem install specific. @cwjohnston are you aware of any issues in the newer versions of sensu that sound similar? I can only replicate in a sensu embedded ruby env and only on newer sensu versions than I am running in my env (I am still on .26 I believe).
babrams@ip-10-55-142-189:~$ sudo apt-get install libsasl2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libsasl2-dev
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 311 kB of archives.
After this operation, 827 kB of additional disk space will be used.
Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libsasl2-dev amd64 2.1.25.dfsg1-17build1 [311 kB]
Fetched 311 kB in 0s (20.7 MB/s)
Selecting previously unselected package libsasl2-dev.
(Reading database ... 142244 files and directories currently installed.)
Preparing to unpack .../libsasl2-dev_2.1.25.dfsg1-17build1_amd64.deb ...
Unpacking libsasl2-dev (2.1.25.dfsg1-17build1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libsasl2-dev (2.1.25.dfsg1-17build1) ...
babrams@ip-10-55-142-189:~$ sudo /opt/sensu/embedded/bin/gem install sensu-plugins-memcached
Fetching: memcached-1.8.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed memcached-1.8.0
Fetching: sensu-plugins-memcached-0.0.3.gem (100%)
You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu
Successfully installed sensu-plugins-memcached-0.0.3
Parsing documentation for memcached-1.8.0
Installing ri documentation for memcached-1.8.0
Parsing documentation for sensu-plugins-memcached-0.0.3
Installing ri documentation for sensu-plugins-memcached-0.0.3
Done installing documentation for memcached, sensu-plugins-memcached after 52 seconds
2 gems installed
@cwjohnston I feel like this GMAKE_CMD='make' CXXFLAGS='-I/opt/sensu/embedded/include -O2 -O3 -g -pipe -std=gnu++98 -I/opt/sensu/embedded/include -O2 -O3 -g -pipe -fPIC -I/opt/sensu/embedded/include -O2 -O3 -g -pipe -fPIC' SOURCE_DIR='libmemcached-0.32' HERE='/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/memcached-1.8.0/ext' ruby ../extconf-make.rb
should have ruby with its full path...am I missing something?
I can do some work to cleanup the gemspec but I don't see anything other than possibly pinning sensu-plugin to 1.2.0
rather than ~> 1.2
but I highly doubt that is the issue...
We could do a release as it looks like there are changes that have not been released yet...I will see later if I can figure out if there is anything that looks like it fixes this.
well I tried doing a release but its not showing up rubygems... @eheydrick can you look into that?
Fixed rubygems deploy with be7e4239036426995f6ac0943c70123af251f095.
oops my bad...
@envintus sorry this fell off my radar, is this still happening with the latest release: https://rubygems.org/gems/sensu-plugins-memcached/versions/0.1.1 ? I assume it still is.
Hey Ben,
I'll test this and try it out. Will let you know as soon as I do so. Thanks!
[image: FC_MIC2017StandardLogo.png]
[image: TransLoc_logos_wordmark_blue.png]
Hunter Satterwhite
Lead Build & Operations Engineer, TransLoc
252.762.5177 | www.transloc.com
[image: facebook-color-32px.png] https://www.facebook.com/TransLoc/ [image: linkedin-color-32px.png] https://www.linkedin.com/company/transloc [image: twitter-color-32px.png] http://www.twitter.com/transloc [image: instagram-color-32px.png] http://www.instagram.com/transloc_inc
On Sat, Jun 3, 2017 at 2:17 AM, Ben Abrams notifications@github.com wrote:
@envintus https://github.com/envintus sorry this fell off my radar, is this still happening with the latest release: https://rubygems.org/gems/ sensu-plugins-memcached/versions/0.1.1 ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sensu-plugins/sensu-plugins-memcached/issues/4#issuecomment-305954851, or mute the thread https://github.com/notifications/unsubscribe-auth/AIESghmilyYwr7MV1-L4ztbHfJrDl1Yxks5sAPpxgaJpZM4NZZ9D .
@envintus have not heard from you, are you planning on trying this again and reporting back?
FYI I've just encountered this on a fresh install using Sensu 1.0.0 on Ubuntu 16.04. Happy to give feedback/test.
when I have some time I will try to work on re-producing this, I'd really like to get this sorted out. Please ping me if I don't report anything back by monday as I hope to have some time this weekend to try working on this.
Will do, as a work around export PATH=$PATH:/opt/sensu/embedded/bin/
allows it to install
ya this feels like an omnibus issue but is just odd that I have not seen this in any other gem...
Sorry did not have time this weekend to work on this.
No worries. I'll see if I can have a go at it at some point soon.
this should be fixed in #8 by replacing the unmaintained memcached
gem with dail
which is being actively maintained, written in pure ruby (no c extensions), and is designed to be a drop in replacement. I am working on cutting a release and will link pack with the released gem once it passes CI and is pushed.
released: https://rubygems.org/gems/sensu-plugins-memcached/versions/0.1.3
If you still have issues please open a new issue, thank you for your patience and shoutout to @bleything for proposing several solutions and fixing it.
This plugin fails on the first run, but a subsequent attempt to install is always successful. All dependencies are installed, like libsasl, etc.
The following output is from sensu-install: `ERROR: Error installing sensu-plugins-memcached: ERROR: Failed to build gem native extension.
This output is from
/opt/sensu/embedded/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/memcached-1.8.0/mkmf.log
: