@テク野路ジーロード

配信タグシェアリングシステムpickvyを開発、運営開始。最近は、Googleアナリティクスを研究中

GLIBC_2.14 not foundで、Sqale上のアプリが突如停止していた件

今回は、ペパボのPaasである、Sqale上で動かしていたアプリが突如停止していたという世にも恐ろしい話し(嘘です)を書きます。

あ、ところで大阪は暑いですね。sunday150です。

なんかですね、きづいたら、アプリが503番エラーを吐き出していたんですよ。
どうせ自分しか使っていないからいいかと放置してましたけど、
本腰入れて解決させるか!と、久しぶりにSqaleへssh接続しました。

Sqaleへのssh接続方法を忘れていて、ちょっと調べ直してね(~~;

Sqaleアプリのログ作成場所は以下ね。Sqaleのウェブページにも記載されてます。https://sqale.jp/support/manual/faq-technical#app-log

  1. /var/log/app/stderr.log
  2. /var/log/app/stdout.log

そしたら、stderr.logにこんなログが出ていたんですよ!

I, [2016-08-15T17:17:35.037410 #10603]  INFO -- : Starting the application ...
I, [2016-08-15T17:17:35.052821 #10603]  INFO -- : Gemfile: /home/sqale/current/Gemfile
I, [2016-08-15T17:17:35.055435 #10603]  INFO -- : Application: /home/sqale/current/config.ru
/home/sqale/current/vendor/bundle/ruby/1.9.1/gems/kgio-2.10.0/lib/kgio.rb:31:in `require': /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/sqale/current/vendor/bundle/ruby/1.9.1/extensions/x86_64-linux/1.9.1-static/kgio-2.10.0/kgio_ext.so) - /home/sqale/current/vendor/bundle/ruby/1.9.1/extensions/x86_64-linux/1.9.1-static/kgio-2.10.0/kgio_ext.so (LoadError)
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/kgio-2.10.0/lib/kgio.rb:31:in `<top (required)>'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/unicorn-5.1.0/lib/unicorn.rb:4:in `require'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/unicorn-5.1.0/lib/unicorn.rb:4:in `<top (required)>'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/unicorn-5.1.0/lib/unicorn/launcher.rb:9:in `require'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/unicorn-5.1.0/lib/unicorn/launcher.rb:9:in `<top (required)>'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/unicorn-5.1.0/bin/unicorn:3:in `require'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/gems/unicorn-5.1.0/bin/unicorn:3:in `<top (required)>'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
    from /home/sqale/current/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'

 

正直、なんじゃこれ!ですよ。どうすりゃいいんですかいな。

Twitter界隈を散策すると、どうやら同じような現象に遭遇している方を発見。

GLIBCがアップデートされた!?サーバメンテナンスで!?ファッ!?

右往左往して、解決策を探す。ツイートされていた方はMecabで発生していたようだけど、私のケースとは若干異る。私の場合は、kgioなるもので発生しているようだ。
そんなもの意図的に入れた覚えはないんだけどな...

エラーログを見ると、kgioというのはvendorのgemディレクトリに入っていて、unicronというgemから呼び出されているようだ。

Gemfileを見ると、確かに「gem unicorn」が記載されている。

一旦、gemであるunicornをアンインストールして再度bundle isntallしてみたがダメだった。先にkgioをアンインストールしてから、unicornをアインインストール。その上で、bundle installしたら、復活! 以下の感じでコマンドを打った。

sqale@xxxxx:~/current$ bundle exec gem uninstall kgio

You have requested to uninstall the gem:
kgio-2.10.0

unicorn-5.1.0 depends on kgio (~> 2.6)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN] y
Successfully uninstalled kgio-2.10.0
ERROR: While executing gem ... (NoMethodError)
undefined method `delete' for #<Bundler::SpecSet:0x00000001070ac0>

sqale@xxxxx:~/current$ bundle exec gem uninstall unicorn
Could not find kgio-2.10.0 in any of the sources
Run `bundle install` to install missing gems.

sqale@xxxxx:~/current$ bundle install
Fetching gem metadata from http://gemproxy001.sqale.lan/...........
Fetching additional metadata from http://gemproxy001.sqale.lan/..

 

サーバ借りている場合は、ベンダ発のサーバメンテナンスでどんな影響が出るかわからんから、ちゃんとお知らせ情報をキャッチして備えておかないといかんな。