Learn about Centmin Mod LEMP Stack today
Register Now

[Solved] centmin.sh I saw this bug when access the menu

Discussion in 'Bug Reports' started by huaanhhuy, Jul 16, 2020.

  1. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    12:52 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.19.1
    • PHP Version Installed: 7.4.8
    • MariaDB MySQL Version Installed: 10.4
    • When was last time updated Centmin Mod code base ? : 3 days ago
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      

      Post output in CODE tags.
    Code:
    MARCH_TARGETNATIVE='n'                                                         
    LETSENCRYPT_DETECT='y'                                                         
    RCLONE_ENABLE='y'                                                               
    ENABLE_MARIADBTENTWOUPGRADE='y'                                                 
    ENABLE_MARIADBTENTHREEUPGRADE='y'                                               
    ENABLE_MARIADBTENFOURUPGRADE='y'                                               
    NGXDYNAMIC_BROTLI='y'                                                           
    NGINX_LIBBROTLI='y'
    Hi @eva2000 , today i access CMM menu and i see this error notification, my server and website seem to be normal. Please help me check it

     
  2. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:52 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    error shows everytime you run centmin.sh or only 1 time where every subsequent centmin.sh run is fine ? if it's latter then it should be fine
    if not, you can try running centmin.sh menu option 24 in debug mode logged to debug.txt text file in /root/centminlogs directory by running these 3 commands
    Code (Text):
    cd /usr/local/src/centminmod
    echo 24 | bash -x centmin.sh 2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' | tee /root/centminlogs/debug.txt && echo "debug log saved at /root/centminlogs/debug.txt"
    sed -i "s|$(hostname)|hostname|g" /root/centminlogs/debug.txt
    

    Then copy the contents of /root/centminlogs/debug.txt into a pastebin.com or gist.github.com shared link - with an sensitive info masked. At least server hostname will be replaced with word hostname instead via last sed replacement line
     
  3. tininho

    tininho Premium Member Premium Member

    114
    26
    28
    May 22, 2019
    Nordic
    Ratings:
    +75
    Local Time:
    8:52 PM
    Having the same problem everytime centmin.sh is ran.
    debug.txt

    Code:
    2020-07-16 11:10:14 ++ grep python2-pip
    2020-07-16 11:10:14 + [[ -n '' ]]
    2020-07-16 11:10:14 + [[ '' = \p\i\p ]]
    2020-07-16 11:10:14 + [[ psutil = \p\s\u\t\i\l ]]
    2020-07-16 11:10:14 + export CC=gcc
    2020-07-16 11:10:14 + CC=gcc
    2020-07-16 11:10:14 ++ rpm -qa python2-psutil
    2020-07-16 11:10:14 ++ LC_ALL=C
    2020-07-16 11:10:14 ++ grep -o python2-psutil
    2020-07-16 11:10:15 + [[ '' = \p\y\t\h\o\n\2\-\p\s\u\t\i\l ]]
    2020-07-16 11:10:15 + PYTHONWARNINGS=ignore:::pip._internal.cli.base_command
    2020-07-16 11:10:15 + pip install -qqq --upgrade psutil
    2020-07-16 11:10:17 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:52 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    @tininho thanks for digging into the specific debug log location :)

    what pip version does your system use right now ? output from
    Code (Text):
    pip --version
    

    i.e.
    Code (Text):
    pip --version
    pip 20.1.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
    

    as when I manually update psutil via pip
    Code (Text):
    export CC='gcc'
    PYTHONWARNINGS=ignore:::pip._internal.cli.base_command pip install --upgrade psutil
    

    i get
    Code (Text):
    PYTHONWARNINGS=ignore:::pip._internal.cli.base_command pip install --upgrade psutil
    Collecting psutil
      Downloading psutil-5.7.2.tar.gz (460 kB)
         |████████████████████████████████| 460 kB 21.1 MB/s 
    Using legacy setup.py install for psutil, since package 'wheel' is not installed.
    Installing collected packages: psutil
      Attempting uninstall: psutil
        Found existing installation: psutil 5.7.0
        Uninstalling psutil-5.7.0:
          Successfully uninstalled psutil-5.7.0
        Running setup.py install for psutil ... done
    Successfully installed psutil-5.7.2
    
     
  5. tininho

    tininho Premium Member Premium Member

    114
    26
    28
    May 22, 2019
    Nordic
    Ratings:
    +75
    Local Time:
    8:52 PM
    Code:
     pip --version
    pip 20.1.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
    Code:
    PYTHONWARNINGS=ignore:::pip._internal.cli.base_command pip install --upgrade psutil
    Collecting psutil
      Using cached psutil-5.7.2.tar.gz (460 kB)
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x5oA_L/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-x5oA_L/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3ahxgY
             cwd: /tmp/pip-install-x5oA_L/psutil/
        Complete output (3 lines):
        /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
          warnings.warn(msg)
        error in psutil setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    https://raw.githubusercontent.com/tinof/centmininit/master/custom_config.inc
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:52 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  7. huaanhhuy

    huaanhhuy New Member

    21
    0
    1
    Jun 10, 2020
    Ratings:
    +1
    Local Time:
    12:52 AM
    Hi @eva2000 i fixed the error above but today i see another error below, please help me

    Code:
    [04:42][root@mainserver.huaanhhuy.tk centminmod]# cmdir
    /usr/local/src/centminmod /usr/local/src/centminmod
    [04:42][root@mainserver.huaanhhuy.tk centminmod]# tools/pip-updates.sh update
    [04:43][root@mainserver.huaanhhuy.tk centminmod]# centmin
    /usr/local/src/centminmod /usr/local/src/centminmod
    
    grep: /etc/postfix/main.cf: No such file or directory
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Data Transfer (TBA)
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:52 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    are emails sent from server working ? as Postfix mail server should be installed and should have /etc/postfix/main.cf config file.

    what is output for these commands
    Code (Text):
    ls -lah /etc/postfix/main.cf

    Code (Text):
    yum history list postfix
     
  9. eva2000

    eva2000 Administrator Staff Member

    45,192
    10,277
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,927
    Local Time:
    3:52 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x