Learn about Centmin Mod LEMP Stack today
Become a Member

Sudden nginx error [ PCRE library does not support JIT ]

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Liam W, Oct 12, 2016.

  1. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    4:44 AM
    nginx
    10.3.x
    I upgraded to nginx 1.11.5 but it didn't start with the following error:

    Code:
    [root@maim centminmod]# ngxstart 
    
    Starting nginx: nginx: [warn] PCRE library does not support JIT in /usr/local/nginx/conf/nginx.conf:8
    
    nginx: [emerg] pattern "^(.+?\.php)(/.*)$" must have 2 captures in /usr/local/nginx/conf/php.conf:4
    
                                                              [FAILED]
    
    I tried to downgrade to 1.11.4, which worked, but nginx still won't start - with the same error.

    A few centmin updates back it said something about recompiling PCRE with jit...

    How can I fix this, my sites are currently down?

    Liam

     
  2. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    11:44 AM
    Mainline
    10.2
    I have exactly the same problem.
    OVH Dedicated Server CentOS 64 bit OS.
     
  3. pamamolf

    pamamolf Well-Known Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    6:44 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    You may try to comment that lines and restart.... ?
     
  4. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    4:44 AM
    nginx
    10.3.x
    The jit line commented removed the jit error. However, if you'd taken the time to look, you'd have noticed that the regex is actually a major part of PHP operation.

    Liam
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    To troubleshoot, you need to check the the nginx upgrade log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    also what's output of
    Code (Text):
    nginx -t

    when you run centmin.sh menu option 4 there's a nginx upgrade log timestamped at /root/centminlogs

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @hendry might want to add his issues to this thread too

    can you folks also post output for these 2 commands

    Code (Text):
    ldd $(which nginx) | grep pcre
    ldd $(which php) | grep pcre
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    on new 123.09beta01 the first few lines of /usr/local/nginx/conf/php.conf are
    Code (Text):
    location ~ [^/]\.php(/|$) {
      include /usr/local/nginx/conf/503include-only.conf;
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
            return 404;
        }
    
     
  8. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    11:44 AM
    Mainline
    10.2

    Outputs nothing.
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    few updates back for wget custom 1.18 install you should of have gotten a pcre 8.39 pcre jit update automatically when you launced centmin.sh so should be using that version

    Code (Text):
    wget -V
    GNU Wget 1.18 built on linux-gnu.
    
    -cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
    +ntlm +opie -psl +ssl/openssl
    
    Wgetrc:
        /usr/local/etc/wgetrc (system)
    Locale:
        /usr/local/share/locale
    Compile:
        gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
        -DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib -I
        /usr/local/include -DHAVE_LIBSSL -DNDEBUG -O2 -g -pipe -Wall
        -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
        --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
    Link:
        gcc -I /usr/local/include -DHAVE_LIBSSL -DNDEBUG -O2 -g -pipe -Wall
        -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
        --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
        -L /usr/local/lib -lpcre -lssl -lcrypto -lz -lidn ftp-opie.o
        openssl.o http-ntlm.o ../lib/libgnu.a
    
    Copyright (C) 2015 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://www.gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
    Please send bug reports and questions to <bug-wget@gnu.org>.


    Code (Text):
    ldd $(which nginx) | grep pcre
            libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x00007f90980f3000)
    

    Code (Text):
    ldd $(which php) | grep pcre
            libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x00007f49dd1ba000)
    

    Code (Text):
    which pcretest
    /usr/local/bin/pcretest

    Code (Text):
    pcretest -C
    PCRE version 8.39 2016-06-14
    Compiled with
      8-bit support
      UTF-8 support
      16-bit support
      UTF-16 support
      32-bit support
      UTF-32 support
      Unicode properties support
      Just-in-time compiler support: x86 64bit (little endian + unaligned)
      Newline sequence is LF
      \R matches all Unicode newlines
      Internal link size = 2
      POSIX malloc threshold = 10
      Parentheses nest limit = 250
      Default match limit = 10000000
      Default recursion depth limit = 10000000
      Match recursion uses stack


    What's output for
    Code (Text):
    php -v
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what do you folks get for output of these commands

    Code (Text):
    cat /etc/ld.so.conf.d/wget.conf
    which pcretest
    pcretest -C
    

    for /etc/ld.so.conf.d/wget.conf, should be
    Code (Text):
    cat /etc/ld.so.conf.d/wget.conf
    /usr/local/lib/
     
  11. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    11:44 AM
    Mainline
    10.2
     
  12. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    looks right to me

    what if you type
    Code (Text):
    ldconfig

    then what output do you get from
    Code (Text):
    ldd $(which nginx) | grep pcre
    ldd $(which php) | grep pcre

    and
    Code (Text):
    ldconfig -p | grep libpcre.so.1
     
  13. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    11:44 AM
    Mainline
    10.2
    Nothing.

    Nothing.

     
  14. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    11:44 AM
    Mainline
    10.2
    All my CentOS 7.2 Server went fine.
    Just this CentOS 6.8 Server goes wrong.
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    64bit ?
     
  16. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    11:44 AM
    Mainline
    10.2
    yes.
     
  17. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    strange not able to reproduce this error on centos 6.8 64bit with 123.09beta01

    these are out values for
    Code (Text):
    ldd $(which nginx) | grep pcre
    ldd $(which php) | grep pcre


    returns empty ok
    Code (Text):
    ldd $(which php) | grep pcre


    nginx one returns correctly the newer pcre path with pcre jit support
    Code (Text):
    ldd $(which nginx) | grep pcre
            libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x00007f65c80e4000)


    Code (Text):
    ldconfig -p | grep libpcre.so.1
            libpcre.so.1 (libc6,x86-64) => /usr/local/lib/libpcre.so.1


    centos 6.8 64bit
    with persistent config /etc/centminmod/custom_config.inc settings
    Code (Text):
    NGINX_PAGESPEED=y
    ORESTY_LUANGINX=y
    NGINX_XSLT='n'
    NGINX_LIBBROTLI='y'
    NGXDYNAMIC_XSLT='n'
    NGXDYNAMIC_IMAGEFILTER='y'
    NGXDYNAMIC_GEOIP='y'
    NGXDYNAMIC_STREAM='y'
    NGXDYNAMIC_HEADERSMORE='y'
    NGXDYNAMIC_SETMISC='y'
    NGXDYNAMIC_ECHO='y'
    NGXDYNAMIC_SRCCACHE='y'
    NGXDYNAMIC_MEMC='y'
    NGXDYNAMIC_REDISTWO='y'
    NGXDYNAMIC_NGXPAGESPEED='y'
    NGXDYNAMIC_BROTLI='y'
    PHPMSSQL='y'
    PHP_PGO='y'
    PHP_PGO_CENTOSSIX='y'
    NGINX_DEVTOOLSETGCC='y'
    GENERAL_DEVTOOLSETGCC='y'
    CLANG='n'
    LIBRESSL_SWITCH='n'
    

    but seems i ran into issue with empty persistent config default on centos 6.8 64bit
    Code (Text):
    ngxrestart
    nginx: [warn] PCRE library does not support JIT in /usr/local/nginx/conf/nginx.conf:8
    nginx: [emerg] pattern "^(.+?\.php)(/.*)$" must have 2 captures in /usr/local/nginx/conf/php.conf:3
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

    So need to investigate :)
     
  18. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  19. hendry

    hendry Member

    59
    14
    8
    Sep 19, 2016
    Ratings:
    +18
    Local Time:
    10:44 AM
    nginx/1.11.4
    MariaDB 10
    [root@server1 centminmod]# ldd $(which php) | grep pcre
    [root@server1 centminmod]#

    second command doesn't show up the result and I just update 123beta9 but I still got an error from jit
     
  20. eva2000

    eva2000 Administrator Staff Member

    55,445
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    1:44 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    how did you update 123.09beta01 ? did you do as instructed at end of update output in centmin.sh menu option 23 submenu option 2 and that is to exit centmin.sh via menu option 24, re-enter /usr/local/src/centminmod and re-run centmin.sh then run centmin.sh menu option 4

    and everytime you run into compile issues with nginx, you need to check the the nginx upgrade log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues


    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com