Welcome to Centmin Mod Community
Become a Member

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 Member

    55
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    3:00 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 Active Member

    154
    28
    28
    Dec 21, 2017
    Ratings:
    +63
    Local Time:
    5:00 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.
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:00 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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 Member

    55
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    3:00 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 Member

    55
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    3:00 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
    
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:00 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:00 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+