SUSE Support

Here When You Need Us

salt-minion crashes with [ERROR] module 'pkg_resources' has no attribute 'iter_entry_points'

This document (000020547) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 SP3
SUSE Manager 4.2 Server
 

Situation

The salt-minion service crashes with the following error message:
admin@system:~> salt-minion -l trace 2>&1 | tee /tmp/salt-minion-trace.log
admin@system:~> cat /tmp/salt-minion-trace.log
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Including configuration from '/etc/salt/minion.d/susemanager.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/susemanager.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: devhana2020.snp.ag
[ERROR   ] module 'pkg_resources' has no attribute 'iter_entry_points'
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/utils/parsers.py", line 212, in parse_args
    mixin_after_parsed_func(self)
  File "/usr/lib/python3.6/site-packages/salt/utils/parsers.py", line 882, in __setup_extended_logging
    log.setup_extended_logging(self.config)
  File "/usr/lib/python3.6/site-packages/salt/log/setup.py", line 417, in setup_extended_logging
    providers = salt.loader.log_handlers(opts)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 607, in log_handlers
    base_path=os.path.join(SALT_BASE_PATH, "log"),
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 153, in _module_dirs
    for entry_point in pkg_resources.iter_entry_points(
AttributeError: module 'pkg_resources' has no attribute 'iter_entry_points'
Usage: salt-minion [options]

salt-minion: error: Error while processing <function LogLevelMixIn.__setup_extended_logging at 0x7f3f2f189048>: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/utils/parsers.py", line 212, in parse_args
    mixin_after_parsed_func(self)
  File "/usr/lib/python3.6/site-packages/salt/utils/parsers.py", line 882, in __setup_extended_logging
    log.setup_extended_logging(self.config)
  File "/usr/lib/python3.6/site-packages/salt/log/setup.py", line 417, in setup_extended_logging
    providers = salt.loader.log_handlers(opts)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 607, in log_handlers
    base_path=os.path.join(SALT_BASE_PATH, "log"),
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 153, in _module_dirs
    for entry_point in pkg_resources.iter_entry_points(
AttributeError: module 'pkg_resources' has no attribute 'iter_entry_points'

Resolution

Using following steps there is a chance to identify what is causing such issue:

1. Verify the integrity of python3 related packages on top of affected salt minion system:
for i in `rpm -qa | grep python3`; do echo $i;rpm -V $i;echo "---------------------------------";done
2. Check where python is loading "pkg_resources" from and double check if something can be observed there:
python3
Python 3.6.15 (default, Sep 15 2021, 14:20:42) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources
>>> pkg_resources.__path__
>>> pkg_resources.iter_entry_points
>>> Ctrl+D to exit
3. When the mentioned "Traceback" occurs, there is a high chance to fix that by reinstalling python3-setuptools on top of affected salt minion system:
zypper in -f python3-setuptools

 

Cause

The reason for this error message is a corrupted python3-setuptools package. 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020547
  • Creation Date: 24-Jan-2022
  • Modified Date:31-Jan-2022
    • SUSE Linux Enterprise Server
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.