Discover Centmin Mod today
Register Now

Centmin Logs being created every few seconds. Currently have 34,000+ logs

Discussion in 'Bug Reports' started by Simon Brown, Sep 29, 2018.

  1. Simon Brown

    Simon Brown Premium Member Premium Member

    32
    5
    8
    Feb 9, 2017
    Ratings:
    +16
    Local Time:
    6:26 AM
    1.11.9
    Hello, I've just checked my /root/centminlogs directory and there are over 34,000 logs.
    Is there a way to turn off: cmm-login-git-checks_*-*.log

    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. 1.15.3
    • PHP Version Installed: 7.0.31
    • MariaDB MySQL Version Installed: 10.1.xx
    • When was last time updated Centmin Mod code base? : today
     

    Attached Files:

  2. Meirami

    Meirami Member

    104
    13
    18
    Dec 21, 2017
    Ratings:
    +36
    Local Time:
    8:26 AM
    Wow, that's a lot. I have 7 *git-check* files. And total 266 files in that directory.
    I think those git checks should be automatically deleted so only few newest are left.
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    36,333
    7,979
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,287
    Local Time:
    3:26 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Currently no way to turn this off. Those cmm-login-git-checks logs created on each SSH login and are automatically deleted on next SSH login when they're older than 5+ days. So if you have SSH logins that are long lived connections, maybe there isn't a chance for the routine to do the clean up of older than 5 day cmm-login-git-checks logs ? Try exiting all SSH sessions and logging back into SSH as well. Make sure you have latest centmin mod 123.09beta01 by running = cmupdate command in SSH to update your code. This routine was added ~8 months ago and last committed code related to this specific routine was ~2 months ago.

    The cmm-login-git-checks log is to record the nginx and centmin mod github checks to see if there's new nginx version or updated centmin mod code available and is the routine responsible for when you see this message on first SSH login if there's updates available
    Code (Text):
    ===============================================================================
    * Nginx Update May Be Available via centmin.sh menu option 4
    * see https://centminmod.com/nginx.html#nginxupgrade
    ===============================================================================
    * Current Nginx Version:           1.15.2
    * Latest Nginx Mainline Available: 1.15.4 (centminmod.com/nginxnews)
    * Latest Nginx Stable Available:   1.14.0
    ===============================================================================
    
    ===============================================================================
     Centmin Mod code updates available for /usr/local/src/centminmod
     to update, run cmupdate command in SSH & re-run centmin.sh once & exit
    ===============================================================================
    

    the cmm-login-git-checks log records how much time it takes for those routines to check nginx and centmin mod github for updates to aid in troubleshooting slowness in the routines and optional persistent config variable you can enable DMOTD_DEBUGSSHLOGIN='y' in /etc/centminmod/custom_config.inc which will make such time logging more verbose to troubleshoot slow SSH logins related to nginx and centmin mod github code and version update reporting.

    that's a crazy number of cmm-login-git-checks logs created, if the routine is working that would be number of times a SSH login was made to the server in the past 1-5 days ! 34k/5 = 6,800 SSH logins per day ! If it is I'd double check security of your server and SSH login security.

    You can count the number of those logs you have via command
    Code (Text):
    find /root/centminlogs/ -type f -name "cmm-login-git-checks*.log" | wc -l
    


    Also check for maybe rogue running processes for this logging in your process list
    Code (Text):
    ps aufxw
    

    don't share the output publicly as it may reveal sensitive running processes and reveal private info
     
    Last edited: Sep 29, 2018
  4. Simon Brown

    Simon Brown Premium Member Premium Member

    32
    5
    8
    Feb 9, 2017
    Ratings:
    +16
    Local Time:
    6:26 AM
    1.11.9
    Maybe this is related to lsyncd?
    It watches directories on three servers and uses rsync to ssh files to keep everything mirrored.
     
  5. Simon Brown

    Simon Brown Premium Member Premium Member

    32
    5
    8
    Feb 9, 2017
    Ratings:
    +16
    Local Time:
    6:26 AM
    1.11.9
    Hello, quick update...
    The issue was lsyncd. As a workaround/fix I set the config to delay 60 secs before lsyncd updating the other 2 servers. The servers are part of a cluster. A delay of 60 seconds before uploaded files appear on all severs/websites should be acceptable for my needs.

    Here's an example of the lsyncd config for others to use if needed:

    Code:
    for _, server in ipairs( serverList ) do
      for _, source in ipairs( sourceList ) do
        sync {
              default.rsyncssh,
              delete = 'running',
              delay = 60,
              source=source,
              host=server,
              targetdir=source,
              excludeFrom="/etc/lsyncd-excludes.txt",
              rsync={compress = true, owner = true, perms = true, archive = true, verbose = true, update = true},
              ssh = {port = 2020}
        }
      end
    end
    
     
    • Informative Informative x 1
  6. eva2000

    eva2000 Administrator Staff Member

    36,333
    7,979
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,287
    Local Time:
    3:26 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    thanks for the insight.. definitely will need to think how i can improve such logging in future for usage cases like yours :) Maybe limit the log file to one per day regardless of how many times during that day you login via SSH.
     
..