Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-46030

dnf-automatic crashes with traceback for Network issue.

    • Icon: Bug Bug
    • Resolution: Can't Do
    • Icon: Normal Normal
    • rhel-8.10
    • rhel-8.10
    • dnf
    • None
    • Moderate
    • ZStream
    • rhel-sst-cs-software-management
    • ssg_core_services
    • 0
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • Approved Blocker
    • None
    • None
    • noarch
    • None

      What were you trying to do that didn't work?

      Trying to run 'dnf-automatic install'  on system with network issue.

      Please provide the package NVR for which bug is seen:

      Customer has below version of package installed:
      ~~~
      dnf-4.7.0-11.el8.noarch                                     Thu May  4 11:58:26 2023

      but the buggy code is also present in latest version available through CDN for 8.10

      dnf-4.7.0-20.el8.noarch

      How reproducible:

      100%

      Steps to reproduce

      1.  Have a system with network issue
      2.  Run dnf-automatic command on it

      Expected results

        Command shows warning/error message failing to send email instead of crashing with a traceback. 

      Actual results

      [daria.vasileva@crashing-wasp ~]$ sudo dnf-automatic install
      Updating Subscription Management repositories.
      Last metadata expiration check: 1:23:02 ago on Tue 02 Jul 2024 01:37:14 PM EEST.
      Traceback (most recent call last):
        File "/bin/dnf-automatic", line 32, in <module>
          sys.exit(dnf.automatic.main.main(sys.argv[1:]))
        File "/usr/lib/python3.6/site-packages/dnf/automatic/main.py", line 330, in main
          emitters.commit()
        File "/usr/lib/python3.6/site-packages/dnf/util.py", line 528, in fn
          return list(map(call_what, self))
        File "/usr/lib/python3.6/site-packages/dnf/util.py", line 527, in call_what
          return method(*args, **kwargs)
        File "/usr/lib/python3.6/site-packages/dnf/automatic/emitter.py", line 106, in commit
          smtp = smtplib.SMTP(self._conf.email_host, timeout=300)
        File "/usr/lib64/python3.6/smtplib.py", line 251, in _init_
          (code, msg) = self.connect(host, port)
        File "/usr/lib64/python3.6/smtplib.py", line 336, in connect
          self.sock = self._get_socket(host, port, self.timeout)
        File "/usr/lib64/python3.6/smtplib.py", line 307, in _get_socket
          self.source_address)
        File "/usr/lib64/python3.6/socket.py", line 724, in create_connection
          raise err
        File "/usr/lib64/python3.6/socket.py", line 713, in create_connection
          sock.connect(sa)
      ConnectionRefusedError: [Errno 111] Connection refused

              packaging-team-maint packaging-team-maint
              rhn-support-plawate Pranav Lawate
              packaging-team-maint packaging-team-maint
              Martin Banas Martin Banas
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: