Ansible 在RHEL8上启动yum和dnf安装/更新需要5分钟

Ansible 在RHEL8上启动yum和dnf安装/更新需要5分钟,ansible,yum,rhel,dnf,Ansible,Yum,Rhel,Dnf,如果我在最新更新的RHEL8上以root用户身份运行yum或dnf,那么它工作得很顺利。只要我尝试用sudo用户(添加到wheel组)运行它,就需要5分钟 打扫卫生对她没有帮助 我通常使用Ansible从远程主机运行更新,但Ansible在尝试运行yum模块几分钟后会断开连接 我将SELinux设置为disabled,以防万一,并在dnf.conf中检查了代理设置-看起来一切正常。非常感谢您的任何意见 这是dnf.log 2020-02-20T15:33:13Z INFO Updating Su

如果我在最新更新的RHEL8上以root用户身份运行yum或dnf,那么它工作得很顺利。只要我尝试用sudo用户(添加到wheel组)运行它,就需要5分钟

打扫卫生对她没有帮助

我通常使用Ansible从远程主机运行更新,但Ansible在尝试运行yum模块几分钟后会断开连接

我将SELinux设置为disabled,以防万一,并在dnf.conf中检查了代理设置-看起来一切正常。非常感谢您的任何意见

这是dnf.log

2020-02-20T15:33:13Z INFO Updating Subscription Management repositories.
2020-02-20T15:37:36Z DEBUG DNF version: 4.2.7
2020-02-20T15:37:36Z DDEBUG Command: yum update
2020-02-20T15:37:36Z DDEBUG Installroot: /
2020-02-20T15:37:36Z DDEBUG Releasever: 8
2020-02-20T15:37:36Z DEBUG cachedir: /var/cache/dnf
2020-02-20T15:37:36Z DDEBUG Base command: update
2020-02-20T15:37:36Z DDEBUG Extra commands: ['update']
2020-02-20T15:37:37Z DEBUG repo: using cache for: epel-modular
2020-02-20T15:37:37Z DEBUG epel-modular: using metadata from Sat Feb 15 03:19:39 2020.
2020-02-20T15:37:37Z DEBUG repo: using cache for: epel
2020-02-20T15:37:37Z DEBUG epel: using metadata from Thu Feb 20 06:38:22 2020.
2020-02-20T15:37:38Z DEBUG reviving: 'rhel-8-for-x86_64-baseos-rpms' can be revived - repomd matches.
2020-02-20T15:37:38Z DEBUG rhel-8-for-x86_64-baseos-rpms: using metadata from Thu Feb 13 10:30:57 2020.
2020-02-20T15:37:38Z DEBUG reviving: 'rhel-8-for-x86_64-appstream-rpms' can be revived - repomd matches.
2020-02-20T15:37:39Z DEBUG rhel-8-for-x86_64-appstream-rpms: using metadata from Thu Feb 20 11:06:31 2020.
2020-02-20T15:37:39Z DDEBUG timer: sack setup: 3550 ms
2020-02-20T15:37:39Z DEBUG Completion plugin: Generating completion cache...
2020-02-20T15:37:40Z DEBUG --> Starting dependency resolution
2020-02-20T15:37:40Z DEBUG --> Finished dependency resolution
2020-02-20T15:37:40Z DDEBUG timer: depsolve: 277 ms
2020-02-20T15:37:40Z INFO Dependencies resolved.
2020-02-20T15:37:40Z INFO Nothing to do.
2020-02-20T15:37:40Z INFO Complete!
2020-02-20T15:37:40Z DDEBUG Cleaning up.

我解决了这个问题。未在/etc/rhsm/rhsm.conf中正确设置代理
我不明白为什么以root用户身份运行不会导致同样的问题。

欢迎使用SatckOverflow!StackOverflow旨在积累与软件开发相关的问题和答案。你现在有更多的机会得到答案