The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Periodic security advisor notification usr/bin/needs-restarting

Discussion in 'General Discussion' started by coursevector, Jul 14, 2016.

  1. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I've been getting these for the past few weeks now coinciding with v56 pushing to STABLE tier (I believe). It is preceded by an abrt crash and then a notification that the server needs restarting. Why is this happening all of a sudden? I've had to restart the servers way more often than I should since this release just to compensate for some unknown issue.

    Code:
    [abrt] a crash has been detected again
    Code:
    abrt_version:   2.0.8
    cmdline:        /usr/bin/python -tt /usr/bin/needs-restarting
    event_log:     
    executable:     /usr/bin/needs-restarting
    hostname:       REDACTED
    kernel:         2.6.32-573.22.1.el6.x86_64
    last_occurrence: 1468298656
    machineid:      sosreport_uploader-dmidecode=700e46a8552074001ccb25e384a3c416b114923b0a1c0914b80897e68f7341cb
    pkg_arch:       noarch
    pkg_epoch:      0
    pkg_fingerprint: 0946 FCA2 C105 B9DE
    pkg_name:       yum-utils
    pkg_release:    37.el6
    pkg_vendor:     CentOS
    pkg_version:    1.1.30
    time:           Fri 17 Jun 2016 12:43:24 AM EDT
    uid:            0
    username:       REDACTED
    
    backtrace:
    :yumRepo.py:840:_getFile:NoMoreMirrorsRepoError: failure: repodata/91b1b5206c0209eb109fc038f1dc324509f689901692729e0d0e7ffb808a46bb-filelists.sqlite.bz2 from system-extras: [Errno 256] No more mirrors to try.
    
    Followed by:

    Code:
    An error occurred while attempting to check whether running executables are up-to-date: The “/usr/bin/needs-restarting” command (process 15784) reported error number 1 when it ended.
    
    Any help with this is appreciated, thanks.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    It looks like this is a potential error with YUM that's resulting in "/usr/bin/needs-restarting" failing to run cleanly. Do you notice any specific error messages when manually running "/usr/bin/needs-restarting"? Are you using a custom REPO in your /etc/yum.repos.d directory that's inaccessible?

    Thank you.
     
  3. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'll have to test running the command next time I see the issue before restarting the server. I had my host test ti and they did not report any errors in the past. As for the custom REPO, I don't believe so. *I* have not configured it that way, is there a way to check that?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you can see a list of YUM repo files with the following command:

    Code:
    ls -al  /etc/yum.repos.d
    Thank you.
     
  5. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Here is what it reports:

    Code:
    [REDACTED@host ~]# ls -al  /etc/yum.repos.d
    total 28
    drwxr-xr-x.  2 root root  4096 Jul 12 12:45 ./
    drwxr-xr-x. 97 root root 12288 Jul 20 14:05 ../
    -rw-r--r--  1 root root  109 Jan 29 00:26 kernelcare.repo
    -rw-r--r--  1 root root  469 Dec  9  2014 yum.sourcedns.repo
    -rw-r--r--  1 root root  606 Dec  9  2014 yum.system.repo
    
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to let us know the outcome the next time this happens. Based on the output you provided, it does appear your server uses a non-default YUM repo (it looks like you are using Kernel Care). This typically isn't a problem, but it's useful to know should the issue happen again.

    Thank you.
     
  7. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Michael,

    It happened again and I manually ran the command as you had suggested, below is the output:

    Code:
    [REDACTED@host ~]# /usr/bin/needs-restarting
    2239 : /usr/local/apache/bin/httpd-kstart-DSSL
    1774 : /usr/sbin/sshd
    2475 : cpsrvd (SSL) - waiting f--llu=1469631399--listen=10,3,4,5,6,7,8,9--accepted=11
    2346 : /usr/sbin/pure-authd-s/var/run/ftpd.sock-r/usr/local/cpanel/bin/pureauth
    2344 : pure-ftpd (SERVER)
    26871 : /usr/sbin/mysqld--basedir=/usr--datadir=/var/lib/mysql--plugin-dir=/usr/lib64/mysql/plugin--user=mysql--log-error=/var/lib/mysql/REDACTED.com.err--open-files-limit=10000--pid-file=/var/lib/mysql/REDACTED.com.pid
    2224 : /usr/sbin/abrtd
    14687 : /usr/local/apache/bin/httpd-kstart-DSSL
    14802 : /usr/local/apache/bin/httpd-kstart-DSSL
    14031 : /usr/local/apache/bin/httpd-kstart-DSSL
    1371 : SonarPush 0.5.236 [sleeping]
    2358 : crond
    14251 : /usr/local/apache/bin/httpd-kstart-DSSL
    14305 : /usr/local/apache/bin/httpd-kstart-DSSL
    2375 : /usr/sbin/atd
    14595 : /usr/local/apache/bin/httpd-kstart-DSSL
    1414 : /usr/sbin/named-unamed
    [REDACTED@host ~]#
    
    Below is the email received:
    Code:
    Subject: [REDACTED.com] ⚠ New security advisor notifications with medium importance
    An error occurred while attempting to check whether running executables are up-to-date: The “/usr/bin/needs-restarting” command (process 22830) reported error number 1 when it ended.
    
     
  8. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Almost forgot the correspond abrt email as well;
    Code:
    Subject: [abrt] a crash has been detected again
    
    abrt_version:   2.0.8
    cmdline:        /usr/bin/python -tt /usr/bin/needs-restarting
    event_log:     
    executable:     /usr/bin/needs-restarting
    hostname:       REDACTED.com
    kernel:         2.6.32-573.22.1.el6.x86_64
    last_occurrence: 1469681160
    machineid:      sosreport_uploader-dmidecode=700e46a8552074001ccb25e384a3c416b114923b0a1c0914b80897e68f7341cb
    pkg_arch:       noarch
    pkg_epoch:      0
    pkg_fingerprint: 0946 FCA2 C105 B9DE
    pkg_name:       yum-utils
    pkg_release:    37.el6
    pkg_vendor:     CentOS
    pkg_version:    1.1.30
    time:           Fri 17 Jun 2016 12:43:24 AM EDT
    uid:            0
    username:       root
    
    sosreport.tar.xz: Binary file, 1421028 bytes
    
    backtrace:
    :yumRepo.py:840:_getFile:NoMoreMirrorsRepoError: failure: repodata/91b1b5206c0209eb109fc038f1dc324509f689901692729e0d0e7ffb808a46bb-filelists.sqlite.bz2 from system-extras: [Errno 256] No more mirrors to try.
    :
    :Traceback (most recent call last):
    :  File "/usr/bin/needs-restarting", line 173, in <module>
    :    sys.exit(main(sys.argv))
    :  File "/usr/bin/needs-restarting", line 154, in main
    :    for oldpkg in my.pkgSack.searchFiles(just_fn): # ghostfiles are always bogons
    :  File "/usr/lib/python2.6/site-packages/yum/packageSack.py", line 472, in searchFiles
    :    return self._computeAggregateListResult("searchFiles", name)
    :  File "/usr/lib/python2.6/site-packages/yum/packageSack.py", line 599, in _computeAggregateListResult
    :    sackResult = apply(method, args)
    :  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 46, in newFunc
    :    return func(*args, **kwargs)
    :  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 934, in searchFiles
    :    self.populate(repo, mdtype='filelists')
    :  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 173, in populate
    :    db_fn = repo._retrieveMD(mydbtype)
    :  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1632, in _retrieveMD
    :    size=thisdata.size)
    :  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 840, in _getFile
    :    raise Errors.NoMoreMirrorsRepoError, errstr
    :NoMoreMirrorsRepoError: failure: repodata/91b1b5206c0209eb109fc038f1dc324509f689901692729e0d0e7ffb808a46bb-filelists.sqlite.bz2 from system-extras: [Errno 256] No more mirrors to try.
    :
    :Local variables in innermost frame:
    :e: URLGrabError(256, 'No more mirrors to try.')
    :start: None
    :url: None
    :text: 'system-extras/filelists_db'
    :self: <yum.yumRepo.YumRepository object at 0x2d7a150>
    :cache: True
    :reget: 'simple'
    :relative: 'repodata/91b1b5206c0209eb109fc038f1dc324509f689901692729e0d0e7ffb808a46bb-filelists.sqlite.bz2'
    :headers: ()
    :checkfunc: <function checkfunc at 0x2d90488>
    :errstr: 'failure: repodata/91b1b5206c0209eb109fc038f1dc324509f689901692729e0d0e7ffb808a46bb-filelists.sqlite.bz2 from system-extras: [Errno 256] No more mirrors to try.'
    :copy_local: 1
    :end: None
    :local: '/var/cache/yum/x86_64/6/system-extras/91b1b5206c0209eb109fc038f1dc324509f689901692729e0d0e7ffb808a46bb-filelists.sqlite.bz2'
    :size: '38658'
    
     
  9. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    This just occurred on another server of ours, although there was no corresponding abrt error email.

    Code:
    An error occurred while attempting to check whether running executables are up-to-date: The “/usr/bin/needs-restarting” command (process 18292) reported error number 1 when it ended.
    
    Manually tried to run the needs-restarting command, this is what it returned:
    Code:
    REDACTED@host [~]# /usr/bin/needs-restarting
    1321 : cpsrvd (SSL) - waiting f --llu=1470060087 --listen=10,11,4,5,6,7,8,9 --accepted=12
    1263 : /usr/sbin/named -u named
    1 : /usr/lib/systemd/systemd --system --deserialize 20
    1242 : /usr/bin/python -Es /usr/sbin/tuned -l -P
    499 : /usr/sbin/rsyslogd -n
    508 : /usr/sbin/nscd
    350 : /usr/lib/systemd/systemd-journald
    490 : /usr/lib/systemd/systemd-logind
    
    Below is this servers YUM repositories just in-case:
    Code:
    REDACTED@host [~]# ls -al  /etc/yum.repos.d
    total 28
    drwxr-xr-x.  2 root root  4096 May  2 14:39 ./
    drwxr-xr-x. 96 root root 12288 Aug  2 10:12 ../
    -rw-r--r--  1 root root  109 May  2 14:39 kernelcare.repo
    -rw-r--r--  1 root root  613 Mar 16 16:14 yum.sourcedns.repo
    -rw-r--r--  1 root root  606 Mar 16 16:14 yum.system.repo
    
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  11. coursevector

    coursevector Active Member

    Joined:
    Feb 23, 2015
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Support Request ID is: 7616699
     
Loading...

Share This Page