Cannot download passenger_native_support for the 2.2.2 Ruby

509 views
Skip to first unread message

dantaiko

unread,
Jul 28, 2016, 5:03:20 AM7/28/16
to Phusion Passenger Discussions

Hi,

We currently use open-source Passenger (installed as a gem) with NGINX. There are two Rails apps running on two different Ruby (1.9.3 and 2.2.2) with RVM support.

 

One rails app (on 1.9.3 ruby) runs fine, but another one (on 2.2.2 Ruby) throws the following error into the passenger log:

stderr:  --> Compiling passenger_native_support.so for the current Ruby interpreter...

stderr:

stderr:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)

stderr:

stderr:      Warning: compilation didn't succeed. To learn why, read this file:

stderr:      /tmp/passenger_native_support-1q8ot9n.log

stderr:  --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...

stderr:      (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)

stderr:      Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.21/rubyext-ruby-2.2.2-x86_64-linux.tar.z: The requested URL returned error: 404 Not Found

stderr:      Trying next mirror...

stderr:      Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/5.0.21/rubyext-ruby-2.2.2-x86_64-linux.targz: The requested URL returned error: 403 Forbidden

stderr:  --> Continuing without passenger_native_support.so.



The rails app on 2.2.2 Ruby runs quite slowly.

 

I’ve tried manually to compile passenger_native_support for the 2.2.2 Ruby with the commands:

rvm use 2.2.2

ruby /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/bin/passenger-config build-native-support


But no luck. :-(

 

Please, advise how to get the passenger_native_support for the 2.2.2 Ruby.

Thanks in advance.



P.S. In any case I give related log data:

/tmp/passenger_native_support-1q8ot9n.log
# mkdir -p /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/buildout/ruby/ruby-2.2.2-x86_64-linux
Encountered permission error, trying a different directory...
-------------------------------
# mkdir -p /home/webadmin/.passenger/native_support/5.0.21/ruby-2.2.2-x86_64-linux
# cd /home/webadmin/.passenger/native_support/5.0.21/ruby-2.2.2-x86_64-linux
# /home/webadmin/.rvm/gems/ruby-2.2.2@herba_mycity/wrappers/ruby /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/src/ruby_native_extension/extconf.rb
checking for alloca.h... *** /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/src/ruby_native_extension/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=/home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/src/ruby_native_extension
--curdir
--ruby=/home/webadmin/.rvm/rubies/ruby-2.2.2/bin/$(RUBY_BASE_NAME)
/home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:587:in `try_cpp'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:1060:in `block in have_header'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
from /home/webadmin/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb:1059:in `have_header'
from /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/src/ruby_native_extension/extconf.rb:38:in `<main>'



 mkmf.log
"gcc -o conftest -I/home/webadmin/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/x86_64-linux -I/home/webadmin/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby/backward -I/home/webadmin/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0 -I/home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21/src/ruby_native_extension     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  -fPIC -g conftest.c  -L. -L/home/webadmin/.rvm/rubies/ruby-2.2.2/lib -Wl,-R/home/webadmin/.rvm/rubies/ruby-2.2.2/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     -Wl,-rpath,'/../lib' -Wl,-R'/../lib' -lruby  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */


Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

dantaiko

unread,
Aug 2, 2016, 7:09:07 AM8/2/16
to Phusion Passenger Discussions
The situation has been resolved by the 'gmp' installation. For Ubuntu or Debian:
sudo apt-get install libgmp3-dev

After that the passenger_native_support for the 2.2.2 Ruby has been installed correctly by:

dantaiko

unread,
Aug 3, 2016, 3:53:48 AM8/3/16
to Phusion Passenger Discussions
Hi,

Despite the ruby native support installation, one of mine apps (which is on Ruby 2.2.2) has still run slow. In the Passenger log there are the following warnings:
Disconnecting long-running connections for process …

 Trying to handle that, I had put the ‘passenger_pool_idle_time 0;’ into the NGINX config like this: ing warnings:
...

http {

    passenger_root /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.21;

    passenger_log_file /u/apps/passenger.log;

    passenger_pool_idle_time 0;
...

And even after NGINX restarting it has no effect on the situation.


Could anyone, please, advise what is the best solution to this?
  • Put the ‘passenger_pool_idle_time 0;’ into another place to make it work?
  • Upgrade the Passenger as a gem?

  • Install the Passenger as standalone with RVM support for my apps?

I'd appreciate your any answer.
Thanks in advance.

Camden Narzt

unread,
Aug 10, 2016, 12:14:58 PM8/10/16
to Phusion Passenger Discussions
Upgrading to 5.0.30 is a good first step, continuing to use the gem is fine.

Cam

dantaiko

unread,
Aug 13, 2016, 10:09:34 AM8/13/16
to Phusion Passenger Discussions
Dear Cam,

Your advice looks promising. Thanks!
I will adhere to it and report the result in near future.

Regards,
Konstantin

среда, 10 августа 2016 г., 19:14:58 UTC+3 пользователь Camden Narzt написал:

dantaiko

unread,
Aug 28, 2016, 11:44:08 AM8/28/16
to phusion-...@googlegroups.com
Dear Cam,

I have upgraded Passenger to 5.0.30 as a gem, but the 2.2.2 Ruby apps has still been running slow despite the 'passenger_pool_idle_time 0;' setting in the NGINX config.

Every http-request throws the following lines into Passenger log:
App 23060 stdout:
[ 2016-08-28 17:36:44.8355 22569/7fe699e5a700 age/Cor/CoreMain.cpp:819 ]: Checking whether to disconnect long-running connections for process 22961, application /u/apps/example/current/public
App 23084 stdout:

I'm getting desperate with this.
Please, advise how to handle this.

This is the NGINX config:
user webadmin;
worker_processes 6;
events {
worker_connections 1024;
}
http {
passenger_root /home/webadmin/.rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.30;
passenger_ruby /home/webadmin/.rvm/gems/ruby-1.9.3-p551/wrappers/ruby;
passenger_log_file /u/apps/passenger.log;
passenger_pool_idle_time 0;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
...
server {
listen 443 ssl;
server_name speakers.example.ru;
ssl_certificate /home/webadmin/ssl/example.chained.crt;
ssl_certificate_key /home/webadmin/ssl/example.key;
error_log /u/apps/example/shared/log/nginx.error.log;
access_log /u/apps/example/shared/log/nginx.access.log; #charset koi8-r;
root /u/apps/example/current/public;
passenger_ruby /home/webadmin/.rvm/gems/ruby-2.2.2@example/wrappers/ruby;
passenger_enabled on;
}
...
}


среда, 10 августа 2016 г., 19:14:58 UTC+3 пользователь Camden Narzt написал:
Upgrading to 5.0.30 is a good first step, continuing to use the gem is fine.

Cam

Daniel Knoppel

unread,
Aug 29, 2016, 6:36:45 AM8/29/16
to Phusion Passenger Discussions
Please mention it here when you cross post to Github:

- Daniel

dantaiko

unread,
Sep 2, 2016, 5:15:30 AM9/2/16
to Phusion Passenger Discussions
Sorry, guys.

The whole problem was due to my flub.
To my shame I found the 'always_restart.txt' in the 'tmp/sockets/'.
After deleting it the app runs fine.
Reply all
Reply to author
Forward
0 new messages