Discover Centmin Mod today
Register Now

Phusion Passenger Nginx Module for Python & Ruby Deployments

Discussion in 'Add Ons' started by eva2000, Jun 12, 2015.

Tags:
  1. Juli112

    Juli112 New Member

    4
    2
    3
    Jan 23, 2016
    Ratings:
    +2
    Local Time:
    7:09 AM
    1.9.9
    Perfect, thank you so much :) It's working now!
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    excellent thanks for the confirmation :)
     
  3. churchill

    churchill New Member

    23
    6
    3
    Sep 25, 2014
    Ratings:
    +6
    Local Time:
    7:09 AM
    i was just trying to install passenger but i got this error while recompiling nginx

    Code:
    make -f objs/Makefile install
    make[1]: Entering directory `/svr-setup/nginx-1.11.4'
    ccache /usr/bin/gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -m64 -mtune=native -mfpmath=sse -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST  -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../pcre-8.39 -I ../libressl-2.4.2/.openssl/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I src/stream \
            -o objs/addon/nginx_module/ContentHandler.o \
            /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c
    /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c: In function ‘create_request’:
    /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c:567:20: error: ‘state.content_length.len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             total_size += state->content_length.len;
                        ^
    /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c:762:36: note: ‘state.content_length.len’ was declared here
         buffer_construction_state      state;
                                        ^
    cc1: all warnings being treated as errors
    make[1]: *** [objs/addon/nginx_module/ContentHandler.o] Error 1
    make[1]: Leaving directory `/svr-setup/nginx-1.11.4'
    make: *** [install] Error 2
    
    real    0m0.432s
    user    0m0.368s
    sys     0m0.070s
    
    Thu Sep 15 16:22:37 UTC 2016
    Success: Nginx was installed properly
    
    Something with ruby
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    yeah passenger hasn't been tested in a while unfortunately so not entirely sure if it's compatible with nginx 1.11 branch

    will check it out

    which version of centmin mod 123.08stable or 123.09beta01. Any fixes will be in 123.09beta01 most likely
     
  5. churchill

    churchill New Member

    23
    6
    3
    Sep 25, 2014
    Ratings:
    +6
    Local Time:
    7:09 AM
    i tried it with 123.09beta01.
    i will look out for the fix

    thank you
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    yup ran into same passenger nginx compile errors with nginx 1.11.4
    Code (Text):
    ccache /usr/bin/gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -m64 -mtune=native -mfpmath=sse -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST  -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../pcre-8.39 -I ../libressl-2.4.2/.openssl/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I src/stream \
            -o objs/addon/src/ndk.o \
            ../ngx_devel_kit-0.3.0/src/ndk.c
    /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c: In function ‘create_request’:
    /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c:567:20: error: ‘state.content_length.len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             total_size += state->content_length.len;
                        ^
    /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30/src/nginx_module/ContentHandler.c:762:36: note: ‘state.content_length.len’ was declared here
         buffer_construction_state      state;
                                        ^
    cc1: all warnings being treated as errors
    make[1]: *** [objs/addon/nginx_module/ContentHandler.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/nginx-1.11.4'
    make: *** [build] Error 2
    
    real    1m24.591s
    user    3m21.156s
    sys     0m57.240s


    bug reported at Compilation of nginx module on Ubuntu Xenial fails with `-Werror -O3` · Issue #1808 · phusion/passenger · GitHub

    will try compile with -O2 instead of -O3 if NGINX_PASSENGER=y
     
  7. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Latest committed fixes in 123.09beta01 branch have working nginx passenger now. Problem was the compiler -O3 flag, so updated to detect NGINX_PASSENGER=y and switch automatically to -O2

    Centmin Mod 123.09beta01 + nginx 1.11.4 + nginx passenger 5.0.30

    1st post in this thread instructions for nginx passenger setup have been updated to apply to Centmin Mod 123.09beta01.

    contents of generated /usr/local/nginx/conf/passenger.conf include file in nginx.conf
    Code (Text):
    passenger_root /usr/local/rvm/gems/ruby-2.3.1/gems/passenger-5.0.30;
    passenger_ruby /usr/local/rvm/bin/ruby;
    passenger_max_pool_size 4;

    Code (Text):
    node -v
    v4.5.0
    

    Code (Text):
    npm --version
    3.10.7
    

    Code (Text):
    passenger -v | head -n1
    Phusion Passenger 5.0.30
    

    Code (Text):
    rails --version
    Rails 5.0.0.1
    

    Ignore Apache warning :)
    Code (Text):
    passenger-memory-stats | sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g"
    *** WARNING: The Apache executable cannot be found.
    Please set the APXS2 environment variable to your 'apxs2' executable's filename, or set the HTTPD environment variable to your 'httpd' or 'apache2' executable's filename.
    Version: 5.0.30
    Date   : 2016-09-15 19:41:05 +0000
    ------------- Apache processes -------------
    
    
    ---------- Nginx processes -----------
    PID    PPID   VMSize    Private  Name
    --------------------------------------
    20581  1      117.9 MB  3.3 MB   nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    20582  20581  121.9 MB  7.4 MB   nginx: worker process
    20585  20581  121.9 MB  7.4 MB   nginx: worker process
    ### Processes: 3
    ### Total private dirty RSS: 18.10 MB
    
    
    ----- Passenger processes ------
    PID    VMSize     Private  Name
    --------------------------------
    20553  420.4 MB   0.9 MB   Passenger watchdog
    20556  1045.8 MB  2.0 MB   Passenger core
    20564  428.6 MB   1.0 MB   Passenger ust-router
    ### Processes: 3
    ### Total private dirty RSS: 3.91 MB
    
     
    Last edited: Sep 16, 2016
  8. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
    There may be a problem with the current Passenger script's using Ruby 2.6. I tried to get it working on my own system, and it seemed to focus on 2.6 instead of 2.6.3, where the Gems were installed. But changing the Passenger install script to 2.7 may have solved the problem for me.
     
  9. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    been a while since I tested phusion passenger with nginx. If you set RUBYVER='2.7.0' in persistent config file /etc/centminmod/custom_config.inc prior to running addons/passenger.sh it works ?
     
  10. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
    I'm trying different Ruby versions and I see errors in the installation log. Here's Ruby 2.3 for example (similar errors with other versions):

    Code:
    Loaded plugins: fastestmirror, priorities, versionlock
    No Match for argument: ruby-mode
    Resolving Dependencies
    --> Running transaction check
    ---> Package ruby.x86_64 0:2.0.0.648-36.el7 will be erased
    ---> Package ruby-libs.x86_64 0:2.0.0.648-36.el7 will be erased
    --> Processing Dependency: libruby.so.2.0()(64bit) for package: rubygem-bigdecimal-1.2.0-36.el7.x86_64
    --> Processing Dependency: libruby.so.2.0()(64bit) for package: rubygem-psych-2.0.0-36.el7.x86_64
    --> Processing Dependency: libruby.so.2.0()(64bit) for package: rubygem-json-1.7.7-36.el7.x86_64
    --> Processing Dependency: libruby.so.2.0()(64bit) for package: rubygem-io-console-0.4.2-36.el7.x86_64
    --> Processing Dependency: ruby(release) for package: rubygem-rdoc-4.0.0-36.el7.noarch
    --> Processing Dependency: ruby(release) for package: rubygem-bigdecimal-1.2.0-36.el7.x86_64
    --> Processing Dependency: ruby(release) for package: rubygem-psych-2.0.0-36.el7.x86_64
    --> Processing Dependency: ruby(release) for package: rubygem-json-1.7.7-36.el7.x86_64
    --> Processing Dependency: ruby(release) for package: rubygem-io-console-0.4.2-36.el7.x86_64
    --> Processing Dependency: ruby-libs = 2.0.0.648 for package: ruby-irb-2.0.0.648-36.el7.noarch
    ---> Package rubygems.noarch 0:2.0.14.1-36.el7 will be erased
    --> Running transaction check
    ---> Package ruby-irb.noarch 0:2.0.0.648-36.el7 will be erased
    ---> Package rubygem-bigdecimal.x86_64 0:1.2.0-36.el7 will be erased
    ---> Package rubygem-io-console.x86_64 0:0.4.2-36.el7 will be erased
    ---> Package rubygem-json.x86_64 0:1.7.7-36.el7 will be erased
    ---> Package rubygem-psych.x86_64 0:2.0.0-36.el7 will be erased
    ---> Package rubygem-rdoc.noarch 0:4.0.0-36.el7 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package                  Arch         Version                Repository   Size
    ================================================================================
    Removing:
     ruby                     x86_64       2.0.0.648-36.el7       @base        63 k
     ruby-libs                x86_64       2.0.0.648-36.el7       @base        10 M
     rubygems                 noarch       2.0.14.1-36.el7        @base       586 k
    Removing for dependencies:
     ruby-irb                 noarch       2.0.0.648-36.el7       @base       157 k
     rubygem-bigdecimal       x86_64       1.2.0-36.el7           @base        83 k
     rubygem-io-console       x86_64       0.4.2-36.el7           @base        16 k
     rubygem-json             x86_64       1.7.7-36.el7           @base        93 k
     rubygem-psych            x86_64       2.0.0-36.el7           @base       110 k
     rubygem-rdoc             noarch       4.0.0-36.el7           @base       1.2 M
    
    Transaction Summary
    ================================================================================
    Remove  3 Packages (+6 Dependent packages)
    
    Installed size: 13 M
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Erasing    : rubygem-io-console-0.4.2-36.el7.x86_64                       1/9
      Erasing    : rubygem-psych-2.0.0-36.el7.x86_64                            2/9
      Erasing    : rubygem-bigdecimal-1.2.0-36.el7.x86_64                       3/9
      Erasing    : ruby-2.0.0.648-36.el7.x86_64                                 4/9
      Erasing    : ruby-irb-2.0.0.648-36.el7.noarch                             5/9
      Erasing    : rubygem-json-1.7.7-36.el7.x86_64                             6/9
      Erasing    : rubygem-rdoc-4.0.0-36.el7.noarch                             7/9
      Erasing    : rubygems-2.0.14.1-36.el7.noarch                              8/9
      Erasing    : ruby-libs-2.0.0.648-36.el7.x86_64                            9/9
      Verifying  : rubygems-2.0.14.1-36.el7.noarch                              1/9
      Verifying  : ruby-2.0.0.648-36.el7.x86_64                                 2/9
      Verifying  : rubygem-psych-2.0.0-36.el7.x86_64                            3/9
      Verifying  : ruby-irb-2.0.0.648-36.el7.noarch                             4/9
      Verifying  : rubygem-bigdecimal-1.2.0-36.el7.x86_64                       5/9
      Verifying  : rubygem-json-1.7.7-36.el7.x86_64                             6/9
      Verifying  : rubygem-io-console-0.4.2-36.el7.x86_64                       7/9
      Verifying  : ruby-libs-2.0.0.648-36.el7.x86_64                            8/9
      Verifying  : rubygem-rdoc-4.0.0-36.el7.noarch                             9/9
    
    Removed:
      ruby.x86_64 0:2.0.0.648-36.el7        ruby-libs.x86_64 0:2.0.0.648-36.el7
      rubygems.noarch 0:2.0.14.1-36.el7
    
    Dependency Removed:
      ruby-irb.noarch 0:2.0.0.648-36.el7
      rubygem-bigdecimal.x86_64 0:1.2.0-36.el7
      rubygem-io-console.x86_64 0:0.4.2-36.el7
      rubygem-json.x86_64 0:1.7.7-36.el7
      rubygem-psych.x86_64 0:2.0.0-36.el7
      rubygem-rdoc.noarch 0:4.0.0-36.el7
    
    Complete!
    
    node.js install already detected
    groupadd: group 'rvm' already exists
    curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
    gpg: key D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed
    gpg: Total number processed: 1
    gpg:              unchanged: 1
    curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
    gpg: key 39499BDB: "Piotr Kuczynski <piotr.kuczynski@gmail.com>" not changed
    gpg: Total number processed: 1
    gpg:              unchanged: 1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   194  100   194    0     0   1260      0 --:--:-- --:--:-- --:--:--  1267
    100 24535  100 24535    0     0   134k      0 --:--:-- --:--:-- --:--:--  134k
    Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz
    Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc
    gpg: Signature made Wed 10 Jul 2019 04:31:02 AM EDT using RSA key ID 39499BDB
    gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>"
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    Primary key fingerprint: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
    GPG verified '/usr/local/rvm/archives/rvm-1.29.9.tgz'
    Upgrading the RVM installation in /usr/local/rvm/
    Upgrade of RVM in /usr/local/rvm/ is complete.
      * Please do NOT forget to add your users to the <code>rvm</code> group.
         The installer no longer auto-adds root or users to the rvm group. Admins must do this.
         Also, please note that group memberships are ONLY evaluated at login time.
         This means that users must log out then back in before group membership takes effect!
    
    <warn>Thanks for installing RVM </warn>
    Please consider donating to our open collective to help us maintain RVM.
    
      Donate: <code>https://opencollective.com/rvm/donate</code>
    
    
    checks...
    --------------------------------
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/root/mpr-tools:/usr/local/rvm/bin
    
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/root/mpr-tools:/usr/local/rvm/bin
    --------------------------------
    Checking requirements for centos.
    Installing requirements for centos.
    Installing required packages: ruby...........
    Requirements installation successful.
    --------------------------------
       ruby-2.2.4 [ x86_64 ]
       ruby-2.3.1 [ x86_64 ]
    
    # Default ruby not set. Try 'rvm alias create default <ruby>'.
    
    # => - current
    # =* - current && default
    #  * - default
    
    
    --------------------------------
    rvm is a function
    --------------------------------
    rvm install 2.3
    rvm use 2.3 --default
    rvm rubygems current
    --------------------------------
    
    
    --------------------------------
    gem install rake rails sqlite3 mysql bundler --no-ri --no-rdoc
    gem install passenger --no-ri --no-rdoc
    --------------------------------
    Searching for binary rubies, this might take some time.
    No binary rubies available for: centos/7/x86_64/ruby-2.3.8.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for centos.
    Requirements installation successful.
    Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.3.8, this may take a while depending on your cpu(s)...
    ruby-2.3.8 - #downloading ruby-2.3.8, this may take a while depending on your connection...
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 13.7M  100 13.7M    0     0  19.5M      0 --:--:-- --:--:-- --:--:-- 19.5M
    ruby-2.3.8 - #extracting ruby-2.3.8 to /usr/local/rvm/src/ruby-2.3.8.....
    ruby-2.3.8 - #configuring...........................................................
    ruby-2.3.8 - #post-configuration..
    ruby-2.3.8 - #compiling..........................................................................-
    ruby-2.3.8 - #installing............................
    ruby-2.3.8 - #making binaries executable..
    ruby-2.3.8 - #downloading rubygems-3.0.6
    ruby-2.3.8 - #extracting rubygems-3.0.6......
    ruby-2.3.8 - #removing old rubygems........
    ruby-2.3.8 - #installing rubygems-3.0.6...............................................
    ruby-2.3.8 - #gemset created /usr/local/rvm/gems/ruby-2.3.8@global
    ruby-2.3.8 - #importing gemset /usr/local/rvm/gemsets/global.gems................................-
    ruby-2.3.8 - #generating global wrappers.......
    ruby-2.3.8 - #gemset created /usr/local/rvm/gems/ruby-2.3.8
    ruby-2.3.8 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
    ruby-2.3.8 - #generating default wrappers.......
    ruby-2.3.8 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
    Install of ruby-2.3.8 - #complete
    Ruby was built without documentation, to build it run: rvm docs generate-ri
    --------------------------------
    Using /usr/local/rvm/gems/ruby-2.3.8
    --------------------------------
    PATH echo...
    --------------------------------
    Rubygems 3.0.6 already available in installed ruby, skipping installation, use --force to reinstall.
    --------------------------------
    RubyGems Environment:
      - RUBYGEMS VERSION: 3.0.6
      - RUBY VERSION: 2.3.8 (2018-10-18 patchlevel 459) [x86_64-linux]
      - INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.3.8
      - USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.3.0
      - RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.3.8/bin/ruby
      - GIT EXECUTABLE: /usr/bin/git
      - EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.3.8/bin
      - SPEC CACHE DIRECTORY: /root/.gem/specs
      - SYSTEM CONFIGURATION DIRECTORY: /usr/local/rvm/rubies/ruby-2.3.8/etc
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86_64-linux
      - GEM PATHS:
         - /usr/local/rvm/gems/ruby-2.3.8
         - /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/gems/2.3.0
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :backtrace => false
         - :bulk_threshold => 1000
      - REMOTE SOURCES:
         - https://rubygems.org/
      - SHELL PATH:
         - /usr/local/rvm/gems/ruby-2.3.8/bin
         - /usr/local/rvm/gems/ruby-2.3.8@global/bin
         - /usr/local/rvm/rubies/ruby-2.3.8/bin
         - /usr/local/rvm/bin
         - /usr/local/sbin
         - /usr/local/bin
         - /usr/sbin
         - /usr/bin
         - /usr/lib64/ccache
         - /usr/local/sbin
         - /usr/local/bin
         - /sbin
         - /bin
         - /usr/sbin
         - /usr/bin
         - /root/bin
         - /root/bin
         - /root/mpr-tools
    --------------------------------
    ERROR:  While executing gem ... (OptionParser::InvalidOption)
        invalid option: --no-ri
    ERROR:  While executing gem ... (OptionParser::InvalidOption)
        invalid option: --no-ri
    --------------------------------
    more checks...
    --------------------------------
    ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
    --------------------------------
    ./passenger.sh: line 347: rails: command not found
    --------------------------------
    ./passenger.sh: line 349: passenger: command not found
    --------------------------------
    ./passenger.sh: line 352: passenger-memory-stats: command not found
    --------------------------------
    --------------------------------
    bigdecimal (default: 1.2.8)
    bundler (default: 1.17.3)
    bundler-unload (1.0.2)
    did_you_mean (1.0.0)
    executable-hooks (1.6.0)
    gem-wrappers (1.4.0)
    io-console (default: 0.4.5)
    json (default: 1.8.3.1)
    minitest (5.8.5)
    net-telnet (0.1.1)
    power_assert (0.2.6)
    psych (default: 2.1.0.1)
    rake (10.4.2)
    rdoc (default: 4.2.1)
    rubygems-bundler (1.4.5)
    rvm (1.11.3.9)
    test-unit (3.1.5)
    --------------------------------
    ./passenger.sh: line 368: passenger-config: command not found
    -------------------------------------------
    Setup /usr/local/nginx/conf/passenger.conf
    -------------------------------------------
    Passenger root located at:
    -------------------------------------------
    Setup completed...
    -------------------------------------------
    
     
  11. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    How are you installing/trying different ruby versions ? exact commands used ?

    You don't want to use CentOS 7 native system ruby versions, they're too old. Ruby installed from addons/passenger.sh is newer was 2.6.0 but latest 123.09beta01 updated just a few hours ago is ruby 2.7.0 now too

    Centmin Mod 123.09beta01 can update via cmupdate command
    Code (Text):
    cmupdate
    

    then run centmin.sh menu once and exit which will update centmin mod code itself and then addons/passenger.sh will be latest version as yours does look old with ruby 2.3

    addons/passenger.sh commit history at centminmod/centminmod shows

    RUBYVER was set in passenger.sh
    or are you installing ruby via addons/ruby.sh ? I just updated addons/ruby.sh to use ruby 2.7.0 as well. Commit history for addons/ruby.sh in 123.09beta01 centminmod/centminmod
     
  12. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
  13. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
    Replacing those deprecated options in passenger.sh with --no-document or -N mostly worked, but now I see this error (most recently attempted with Ruby 2.6.3):

    Code:
    ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.
    
     
  14. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
    Here's the full error if I log out and back in and try installing mysql by itself (gem install mysql --no-document):

    Code:
    gem install mysql --no-document
    Building native extensions. This could take a while...
    ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.
    
        current directory: /usr/local/rvm/gems/ruby-2.7.0/gems/mysql-2.9.1/ext/mysql_api
    /usr/local/rvm/rubies/ruby-2.7.0/bin/ruby -I /usr/local/rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0 -r ./siteconf20200129-7234-19402t7.rb extconf.rb
    checking for mysql_ssl_set()... yes
    checking for rb_str_set_len()... yes
    checking for rb_thread_start_timer()... no
    checking for mysql.h... yes
    creating Makefile
    
    current directory: /usr/local/rvm/gems/ruby-2.7.0/gems/mysql-2.9.1/ext/mysql_api
    make "DESTDIR=" clean
    
    current directory: /usr/local/rvm/gems/ruby-2.7.0/gems/mysql-2.9.1/ext/mysql_api
    make "DESTDIR="
    compiling mysql.c
    mysql.c: In function ‘real_connect’:
    mysql.c:276:17: error: ‘MYSQL’ has no member named ‘reconnect’
         myp->handler.reconnect = 0;
                     ^
    mysql.c: In function ‘real_connect2’:
    mysql.c:350:6: error: ‘MYSQL’ has no member named ‘reconnect’
         m->reconnect = 0;
          ^
    mysql.c: In function ‘reconnect’:
    mysql.c:920:27: error: ‘MYSQL’ has no member named ‘reconnect’
         return GetHandler(obj)->reconnect ? Qtrue : Qfalse;
                               ^
    mysql.c: In function ‘reconnect_set’:
    mysql.c:926:20: error: ‘MYSQL’ has no member named ‘reconnect’
         GetHandler(obj)->reconnect = (flag == Qnil || flag == Qfalse) ? 0 : 1;
                        ^
    mysql.c: In function ‘stmt_bind_result’:
    mysql.c:1320:74: error: ‘rb_cFixnum’ undeclared (first use in this function)
      else if (argv[i] == rb_cNumeric || argv[i] == rb_cInteger || argv[i] == rb_cFixnum)
                                                                              ^
    mysql.c:1320:74: note: each undeclared identifier is reported only once for each function it appears in
    mysql.c: In function ‘reconnect’:
    mysql.c:921:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    mysql.c: At top level:
    cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
    cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
    cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
    cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
    cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
    make: *** [mysql.o] Error 1
    
    make failed, exit code 2
    
    Gem files will remain installed in /usr/local/rvm/gems/ruby-2.7.0/gems/mysql-2.9.1 for inspection.
    Results logged to /usr/local/rvm/gems/ruby-2.7.0/extensions/x86_64-linux/2.7.0/mysql-2.9.1/gem_make.out
    
     
  15. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
    It looks like the mysql gem hasn't been updated in many years, so mysql2 would probably be better to install, which installed easily for me.
     
  16. Daniel J. Lewis

    Daniel J. Lewis Award-winning podcaster and consultant

    117
    15
    18
    Oct 20, 2014
    Ratings:
    +33
    Local Time:
    1:09 AM
    1.8.0
    5.6
  17. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    ah i fixed that back on Dec 30, 2018 for addons/ruby.sh update addons/ruby.sh in 123.09beta01 · centminmod/centminmod@caabde7 but didn't for addons/passenger.sh

    thanks for heads up, will update 123.09beta01 after this post with addons/passenger.sh and addons/ruby.sh to use Ruby 2.6.3 and remove the invalid flags from addons/passenger.sh

    edit: updated addons/passenger.sh part 2 update addons/passenger.sh & addons/ruby.sh in 123.09beta01 · centminmod/centminmod@cf14996 so run cmupdate to update your local 123.09beta01 code
     
  18. saigoncrypto

    saigoncrypto New Member

    23
    2
    3
    Nov 14, 2017
    Ratings:
    +2
    Local Time:
    10:09 PM
    i am getting an error trying to compile passenger:

    Code:
    *** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***
    *** Running 'rake  nginx CACHING=false' in /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.4/src/nginx_module... ***
    (in /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.4)
    ccache g++ -o buildout/support-binaries/CoreMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -Isrc/cxx_supportlib/vendor-copy/websocketpp -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -ggdb -std=gnu++11 -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/agent/Core/CoreMain.cpp
    g++: fatal error: Killed signal terminated program cc1plus
    compilation terminated.
    rake aborted!
    Command failed with status (1): [ccache g++ -o buildout/support-binaries/CoreMain.o  -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -Isrc/cxx_supportlib/vendor-copy/websocketpp -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -ggdb -std=gnu++11 -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/agent/Core/CoreMain.cpp]
    /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.4/build/support/cplusplus.rb:53:in `run_compiler'
    /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.4/build/support/cplusplus.rb:104:in `compile_cxx'
    /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.4/build/support/cplusplus.rb:162:in `block in define_cxx_object_compilation_task'
    /usr/local/rvm/gems/ruby-2.6.3/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
    /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
    /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
    Tasks: TOP => nginx => nginx_without_native_support => buildout/support-binaries/PassengerAgent => buildout/support-binaries/CoreMain.o
    (See full trace by running task with --trace)
    
     
  19. eva2000

    eva2000 Administrator Staff Member

    45,654
    10,358
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,076
    Local Time:
    4:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    @saigoncrypto

    did you run centmin mod 123.09beta01, cmupdate first to ensure all latest updates are applied ?

    how much memory does your server have, might be system ran out of memory during compilation

    what is output for
    Code (Text):
    free -mlt
     
  20. saigoncrypto

    saigoncrypto New Member

    23
    2
    3
    Nov 14, 2017
    Ratings:
    +2
    Local Time:
    10:09 PM
    @eva2000 I did run cmpudate before. I am on latest verison.

    Code:
    free -mlt
                  total        used        free      shared  buff/cache   available
    Mem:            991         271         188          40         531         441
    Low:            991         802         188
    High:             0           0           0
    Swap:          1023         685         338
    Total:         2015         957         526
    i am on the lowest tier of DO instance... i am a bit worried i dont have enough memory... any other options?
     
    Last edited: May 9, 2020