付録A コンテナー化された Ansible Automation Platform のトラブルシューティング
この情報を使用して、コンテナー化された Ansible Automation Platform のインストールのトラブルシューティングを行います。
A.1. コンテナー化された Ansible Automation Platform のインストールのトラブルシューティング リンクのコピーリンクがクリップボードにコピーされました!
インストールに時間がかかったり、エラーが発生したりする場合は、何を確認すればよいですか?
- システムがインストールガイドに記載されている最小要件を満たしていることを確認してください。不適切なストレージの選択や、多数のホストに分散する際の高レイテンシーなどの項目はすべて、大きな影響を及ぼします。
-
ローカルインストーラー
ansible.cfg内で特に変更されていない限り、デフォルトで./aap_install.logに配置されているインストールログファイルを確認します。 -
タスクプロファイリングコールバックをアドホックベースで有効にして、インストールプログラムが最も多くの時間を費やしている場所の概要を示します。これを行うには、ローカルの
ansible.cfgファイルを使用します。[defaults]セクションの下に次のようなコールバック行を追加します。
cat ansible.cfg [defaults] callbacks_enabled = ansible.posix.profile_tasks
$ cat ansible.cfg
[defaults]
callbacks_enabled = ansible.posix.profile_tasks
Automation Controller が 413 エラーを返します。
このエラーは、manifest.zip ライセンスファイルが nginx_client_max_body_size 設定より大きいために発生します。このエラーが発生した場合は、インストールインベントリーファイルを変更して次の変数を含める必要があります。
nginx_disable_hsts: false nginx_http_port: 8081 nginx_https_port: 8444 nginx_client_max_body_size: 20m nginx_user_headers: []
nginx_disable_hsts: false
nginx_http_port: 8081
nginx_https_port: 8444
nginx_client_max_body_size: 20m
nginx_user_headers: []
現在のデフォルト設定である 20m でこの問題を回避できるはずです。
コントローラー UI に移動すると、“502 Bad Gateway” というエラーメッセージが表示され、インストールが失敗しました。
このようなエラーが発生する可能性があり、インストールアプリケーションの出力には、以下のように表示されます。
TASK [ansible.containerized_installer.automationcontroller : Wait for the Controller API to te ready] ******************************************************
fatal: [daap1.lan]: FAILED! => {"changed": false, "connection": "close", "content_length": "150", "content_type": "text/html", "date": "Fri, 29 Sep 2023 09:42:32 GMT", "elapsed": 0, "msg": "Status code was 502 and not [200]: HTTP Error 502: Bad Gateway", "redirected": false, "server": "nginx", "status": 502, "url": "https://daap1.lan:443/api/v2/ping/"}
TASK [ansible.containerized_installer.automationcontroller : Wait for the Controller API to te ready] ******************************************************
fatal: [daap1.lan]: FAILED! => {"changed": false, "connection": "close", "content_length": "150", "content_type": "text/html", "date": "Fri, 29 Sep 2023 09:42:32 GMT", "elapsed": 0, "msg": "Status code was 502 and not [200]: HTTP Error 502: Bad Gateway", "redirected": false, "server": "nginx", "status": 502, "url": "https://daap1.lan:443/api/v2/ping/"}
-
実行中の
automation-controller-webコンテナーと systemd サービスがあるか確認します。
これは、システム全体のレベルではなく、通常の権限のないユーザーで使用されます。su を使用してコンテナーを実行しているユーザーに切り替えた場合は、ユーザーの systemctl ユニットと対話できるように、XDG_RUNTIME_DIR 環境変数を正しい値に設定する必要があります。
export XDG_RUNTIME_DIR="/run/user/$UID"
export XDG_RUNTIME_DIR="/run/user/$UID"
podman ps | grep web systemctl --user | grep web
podman ps | grep web
systemctl --user | grep web
出力がない場合は、問題があることを示しています。
automation-controller-webサービスを再起動してみてください。systemctl start automation-controller-web.service --user systemctl --user | grep web systemctl status automation-controller-web.service --user
systemctl start automation-controller-web.service --user systemctl --user | grep web systemctl status automation-controller-web.service --userCopy to Clipboard Copied! Toggle word wrap Toggle overflow Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use) Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use) Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 出力は、ポートがすでに別のサービスによって使用されているか、引き続き使用されていることを示します。この場合は
nginxを使用します。以下を実行します。
sudo pkill nginx
sudo pkill nginxCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Web サービスを再起動してステータスを再度確認します。
通常のサービス出力は次のようになり、引き続き実行されているはずです。
インストールプログラムを再度実行して、すべてが期待どおりにインストールされることを確認できます。
Amazon Web Services にコンテナー化された Ansible Automation Platform をインストールしようとすると、デバイスに空き容量がないという出力が表示されます。
TASK [ansible.containerized_installer.automationcontroller : Create the receptor container] ***************************************************
fatal: [ec2-13-48-25-168.eu-north-1.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "Can't create container receptor", "stderr": "Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1\n", "stderr_lines": ["Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1"], "stdout": "", "stdout_lines": []}
TASK [ansible.containerized_installer.automationcontroller : Create the receptor container] ***************************************************
fatal: [ec2-13-48-25-168.eu-north-1.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "Can't create container receptor", "stderr": "Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1\n", "stderr_lines": ["Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1"], "stdout": "", "stdout_lines": []}
/home ファイルシステムをデフォルトの Amazon Web Services マーケットプレイスの RHEL インスタンスにインストールする場合、/home は root / ファイルシステムの一部であるため、サイズが小さすぎる可能性があります。より多くのスペースを確保する必要があります。ドキュメントでは、コンテナー化された Ansible Automation Platform のシングルノードデプロイメントに最低 40 GB を指定しています。