A.2. 诊断问题


对于基于容器的常规故障排除,您可以检查任何正在运行的服务的容器日志,以帮助对底层问题进行故障排除。

识别正在运行的容器

要获取正在运行的容器名称列表,请运行以下命令:

$ podman ps --all --format "{{.Names}}"
Copy to Clipboard Toggle word wrap
Expand
表 A.2. 容器详情
组件组容器名称用途

自动化控制器

automation-controller-rsyslog

处理自动化控制器的集中式日志记录。

自动化控制器

automation-controller-task

管理并运行与自动化控制器相关的任务,如运行 playbook 并与清单交互。

自动化控制器

automation-controller-web

为自动化控制器提供 REST API 的 Web 服务器。这可以通过平台网关访问和路由,以进行用户交互。

Event-Driven Ansible

automation-eda-api

公开用于 Event-Driven Ansible 的 API,允许外部系统触发和管理事件驱动的自动化。

Event-Driven Ansible

automation-eda-daphne

用于 Event-Driven Ansible 的 Web 服务器,处理 WebSocket 连接并提供静态文件。

Event-Driven Ansible

automation-eda-web

为 Event-Driven Ansible 提供 REST API 的 Web 服务器。这可以通过平台网关访问和路由,以进行用户交互。

Event-Driven Ansible

automation-eda-worker-<number>

这些容器根据传入的事件运行自动化规则和 playbook。

Event-Driven Ansible

automation-eda-activation-worker-<number>

这些容器管理自动化规则的激活,确保它们在满足特定条件时运行。

Event-Driven Ansible

automation-eda-scheduler

负责调度和管理周期性任务和规则激活。

平台网关

automation-gateway-proxy

充当反向代理,将传入请求路由到适当的 Ansible Automation Platform 服务。

平台网关

automation-gateway

负责对平台的身份验证、授权和整体请求处理,所有这些都通过 REST API 公开并由 Web 服务器提供。

Automation hub

automation-hub-api

为自动化中心提供 API,启用与集合内容、用户管理和其他自动化中心功能的交互。

Automation hub

automation-hub-content

管理并提供存储在自动化中心中的 Ansible 内容集合、角色和模块。

Automation hub

automation-hub-web

为自动化中心提供 REST API 的 Web 服务器。这可以通过平台网关访问和路由,以进行用户交互。

Automation hub

automation-hub-worker-<number>

这些容器处理自动化中心的后台任务,如内容同步、索引和验证。

Performance Co-Pilot

pcp

如果启用了 Performance Co-Pilot Monitoring,则此容器用于系统性能监控和数据收集。

PostgreSQL

postgresql

托管 Ansible Automation Platform 的 PostgreSQL 数据库。

Receptor

receptor

促进 Ansible Automation Platform 中安全可靠的通信。

Redis

redis-<suffix>

负责缓存、实时分析和快速数据检索。

检查日志

容器化 Ansible Automation Platform 使用 journald 进行 Podman 日志记录。要检查任何正在运行的容器日志,请运行 journalctl 命令:

$ journalctl CONTAINER_NAME=<container_name>
Copy to Clipboard Toggle word wrap

带有输出的命令示例:

$ journalctl CONTAINER_NAME=automation-gateway-proxy

Oct 08 01:40:12 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 00:40:12.885][2][info][upstream] [external/envoy/source/common/upstream/cds_ap>
Oct 08 01:40:12 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 00:40:12.885][2][info][upstream] [external/envoy/source/common/upstream/cds_ap>
Oct 08 01:40:19 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T00:40:16.753Z] "GET /up HTTP/1.1" 200 - 0 1138 10 0 "192.0.2.1" "python->
Copy to Clipboard Toggle word wrap

要实时查看正在运行的容器的日志,请运行 podman logs -f 命令:

$ podman logs -f <container_name>
Copy to Clipboard Toggle word wrap

控制容器操作

您可以通过运行 systemctl 命令来控制容器的操作:

$ systemctl --user status <container_name>
Copy to Clipboard Toggle word wrap

带有输出的命令示例:

$ systemctl --user status automation-gateway-proxy
● automation-gateway-proxy.service - Podman automation-gateway-proxy.service
    Loaded: loaded (/home/user/.config/systemd/user/automation-gateway-proxy.service; enabled; preset: disabled)
    Active: active (running) since Mon 2024-10-07 12:39:23 BST; 23h ago
       Docs: man:podman-generate-systemd(1)
    Process: 780 ExecStart=/usr/bin/podman start automation-gateway-proxy (code=exited, status=0/SUCCESS)
   Main PID: 1919 (conmon)
      Tasks: 1 (limit: 48430)
     Memory: 852.0K
        CPU: 2.996s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/automation-gateway-proxy.service
             └─1919 /usr/bin/conmon --api-version 1 -c 2dc3c7b2cecd73010bad1e0aaa806015065f92556ed3591c9d2084d7ee209c7a -u 2dc3c7b2cecd73010bad1e0aaa80>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:02.926Z] "GET /api/galaxy/_ui/v1/settings/ HTTP/1.1" 200 - 0 654 58 47 ">
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:03.387Z] "GET /api/controller/v2/config/ HTTP/1.1" 200 - 0 4018 58 44 "1>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:03.370Z] "GET /api/galaxy/v3/plugin/ansible/search/collection-versions/?>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:03.405Z] "GET /api/controller/v2/organizations/?role_level=notification_>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.366Z] "GET /api/galaxy/_ui/v1/me/ HTTP/1.1" 200 - 0 1368 79 40 "192.1>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.360Z] "GET /api/controller/v2/workflow_approvals/?page_size=200&statu>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.379Z] "GET /api/controller/v2/job_templates/7/ HTTP/1.1" 200 - 0 1356>
Oct 08 11:44:10 aap.example.org automation-gateway-proxy[1919]: [2024-10-08T10:44:04.378Z] "GET /api/galaxy/_ui/v1/feature-flags/ HTTP/1.1" 200 - 0 207 81>
Oct 08 11:44:13 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 10:44:13.856][2][info][upstream] [external/envoy/source/common/upstream/cds_ap>
Oct 08 11:44:13 aap.example.org automation-gateway-proxy[1919]: [2024-10-08 10:44:13.856][2][info][upstream] [external/envoy/source/common/upstream/cds_ap
Copy to Clipboard Toggle word wrap

获取有关执行平面的容器信息

要获取有关自动化控制器、Event-Driven Ansible 和 execution_nodes 节点的容器信息,请给任何 Podman 命令添加前缀:

CONTAINER_HOST=unix://run/user/<user_id>/podman/podman.sock
Copy to Clipboard Toggle word wrap

or

CONTAINERS_STORAGE_CONF=<user_home_directory>/aap/containers/storage.conf
Copy to Clipboard Toggle word wrap

输出示例:

$ CONTAINER_HOST=unix://run/user/1000/podman/podman.sock podman images

REPOSITORY                                                            TAG         IMAGE ID      CREATED     SIZE
registry.redhat.io/ansible-automation-platform-25/ee-supported-rhel8  latest      59d1bc680a7c  6 days ago  2.24 GB
registry.redhat.io/ansible-automation-platform-25/ee-minimal-rhel8    latest      a64b9fc48094  6 days ago  338 MB
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat