Join the community 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:
    5:10 PM
    1.9.9
    Perfect, thank you so much :) It's working now!
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    41,390
    9,298
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,265
    Local Time:
    1:10 AM
    Nginx 1.17.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:
    5:10 PM
    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

    41,390
    9,298
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,265
    Local Time:
    1:10 AM
    Nginx 1.17.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:
    5:10 PM
    i tried it with 123.09beta01.
    i will look out for the fix

    thank you
     
  6. eva2000

    eva2000 Administrator Staff Member

    41,390
    9,298
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,265
    Local Time:
    1:10 AM
    Nginx 1.17.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

    41,390
    9,298
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,265
    Local Time:
    1:10 AM
    Nginx 1.17.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