saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
571 stars 65 forks source link

Error - Wait until Controller is ready #209

Closed ChiefORZ closed 1 month ago

ChiefORZ commented 1 month ago

Describe the bug

When running a re-install i encountered an error that i can not bypass:

TASK [docker : Controller | Path] ***********************************************************************************
Wednesday 22 May 2024  08:03:10 +0200 (0:00:00.295)       0:03:09.754 ********* 
ok: [localhost]

TASK [docker : Controller | Import 'saltbox_managed_docker_controller.service'] *************************************
Wednesday 22 May 2024  08:03:10 +0200 (0:00:00.144)       0:03:09.899 ********* 
ok: [localhost]

TASK [docker : Controller | Enable 'saltbox_managed_docker_controller.service'] *************************************
Wednesday 22 May 2024  08:03:11 +0200 (0:00:00.382)       0:03:10.281 ********* 
changed: [localhost]

TASK [docker : Controller | Wait until Controller is ready] *********************************************************
Wednesday 22 May 2024  08:03:11 +0200 (0:00:00.691)       0:03:10.973 ********* 
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (12 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (11 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (10 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (9 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (8 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (7 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (6 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (5 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (4 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (3 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (2 retries left).
FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 12, "changed": false, "connection": "close", "content": "{\"detail\":\"Application not ready\"}", "content_length": "34", "content_type": "application/json", "date": "Wed, 22 May 2024 06:04:14 GMT", "elapsed": 0, "json": {"detail": "Application not ready"}, "msg": "Status code was 503 and not [200]: HTTP Error 503: Service Unavailable", "redirected": false, "server": "uvicorn", "status": 503, "url": "http://127.0.0.1:3377/ping"}

PLAY RECAP **********************************************************************************************************
localhost                  : ok=248  changed=74   unreachable=0    failed=1    skipped=121  rescued=0    ignored=0   

Wednesday 22 May 2024  08:04:15 +0200 (0:01:03.228)       0:04:14.201 ********* 
=============================================================================== 
docker : Controller | Wait until Controller is ready -------------------------------------------------------- 63.23s
docker : Wait for 30 seconds before commencing -------------------------------------------------------------- 30.24s
remote : Wait for 10 seconds -------------------------------------------------------------------------------- 10.48s
docker : Wait for 10 seconds -------------------------------------------------------------------------------- 10.21s
system : sysctl | Tuning ------------------------------------------------------------------------------------- 4.82s
motd : Import dynamic motd files ----------------------------------------------------------------------------- 4.69s
docker : Controller | Install pip requirements --------------------------------------------------------------- 4.44s
system : APT | APT update ------------------------------------------------------------------------------------ 3.68s
docker : Binary | Install 'docker-compose-plugin' ------------------------------------------------------------ 2.92s
docker : Controller | Create venv ---------------------------------------------------------------------------- 2.88s
docker : Binary | Install 'containerd.io' -------------------------------------------------------------------- 2.86s
docker : Binary | Install 'docker-ce' ------------------------------------------------------------------------ 2.85s
docker : Binary | Install 'docker-ce-rootless-extras' -------------------------------------------------------- 2.83s
docker : Binary | Install 'docker-ce-cli' -------------------------------------------------------------------- 2.82s
unionfs : MergerFS | Uninstall mergerfs ---------------------------------------------------------------------- 2.80s
sanity_check : Ansible Tags | Get all available Ansible tags if cache is not available ----------------------- 2.80s
unionfs : MergerFS | Install mergerfs ------------------------------------------------------------------------ 2.52s
user : User Account | Reset ownership of '/srv/' path -------------------------------------------------------- 2.39s
system : Gather the package facts ---------------------------------------------------------------------------- 2.10s
docker : Gather package facts -------------------------------------------------------------------------------- 2.10s

Error: Playbook /srv/git/saltbox/saltbox.yml run failed, scroll up to the failed task to review.

I looked up that the controller is located at /etc/systemd/system/saltbox_managed_docker_controller.service and when trying to start the service i get the following message:

$ systemctl start saltbox_managed_docker_controller.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'saltbox_managed_docker_controller.service'.
Multiple identities can be used for authentication:
 1.  Ubuntu (ubuntu)
 2.  saltbox
Choose identity to authenticate as (1-2): 

and because the playbook will never give the answer, it will resolve in the following timeout:

$ systemctl start saltbox_managed_docker_controller.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'saltbox_managed_docker_controller.service'.
Multiple identities can be used for authentication:
 1.  Ubuntu (ubuntu)
 2.  saltbox
Choose identity to authenticate as (1-2): Failed to start saltbox_managed_docker_controller.service: Connection timed out
See system logs and 'systemctl status saltbox_managed_docker_controller.service' for details.

My question is now, should i delete my default ubuntu user on this mashine, or is there a way to force the systemd service to be started with the current user?

System Information

saltydk commented 1 month ago

Please join the discord for support, we don't really do support through issues.

On Wed, 22 May 2024, 08:22 ChiefORZ, @.***> wrote:

Describe the bug

When running a re-install i encountered an error that i can not bypass:

TASK [docker : Controller | Path] *** Wednesday 22 May 2024 08:03:10 +0200 (0:00:00.295) 0:03:09.754 * ok: [localhost]

TASK [docker : Controller | Import 'saltbox_managed_docker_controller.service'] ***** Wednesday 22 May 2024 08:03:10 +0200 (0:00:00.144) 0:03:09.899 * ok: [localhost]

TASK [docker : Controller | Enable 'saltbox_managed_docker_controller.service'] ***** Wednesday 22 May 2024 08:03:11 +0200 (0:00:00.382) 0:03:10.281 * changed: [localhost]

TASK [docker : Controller | Wait until Controller is ready] ***** Wednesday 22 May 2024 08:03:11 +0200 (0:00:00.691) 0:03:10.973 * FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (12 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (11 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (10 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (9 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (8 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (7 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (6 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (5 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (4 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (3 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (2 retries left). FAILED - RETRYING: [localhost]: Controller | Wait until Controller is ready (1 retries left). fatal: [localhost]: FAILED! => {"attempts": 12, "changed": false, "connection": "close", "content": "{\"detail\":\"Application not ready\"}", "content_length": "34", "content_type": "application/json", "date": "Wed, 22 May 2024 06:04:14 GMT", "elapsed": 0, "json": {"detail": "Application not ready"}, "msg": "Status code was 503 and not [200]: HTTP Error 503: Service Unavailable", "redirected": false, "server": "uvicorn", "status": 503, "url": "http://127.0.0.1:3377/ping"}

PLAY RECAP ** localhost : ok=248 changed=74 unreachable=0 failed=1 skipped=121 rescued=0 ignored=0

Wednesday 22 May 2024 08:04:15 +0200 (0:01:03.228) 0:04:14.201 *****

docker : Controller | Wait until Controller is ready -------------------------------------------------------- 63.23s docker : Wait for 30 seconds before commencing -------------------------------------------------------------- 30.24s remote : Wait for 10 seconds -------------------------------------------------------------------------------- 10.48s docker : Wait for 10 seconds -------------------------------------------------------------------------------- 10.21s system : sysctl | Tuning ------------------------------------------------------------------------------------- 4.82s motd : Import dynamic motd files ----------------------------------------------------------------------------- 4.69s docker : Controller | Install pip requirements --------------------------------------------------------------- 4.44s system : APT | APT update ------------------------------------------------------------------------------------ 3.68s docker : Binary | Install 'docker-compose-plugin' ------------------------------------------------------------ 2.92s docker : Controller | Create venv ---------------------------------------------------------------------------- 2.88s docker : Binary | Install 'containerd.io' -------------------------------------------------------------------- 2.86s docker : Binary | Install 'docker-ce' ------------------------------------------------------------------------ 2.85s docker : Binary | Install 'docker-ce-rootless-extras' -------------------------------------------------------- 2.83s docker : Binary | Install 'docker-ce-cli' -------------------------------------------------------------------- 2.82s unionfs : MergerFS | Uninstall mergerfs ---------------------------------------------------------------------- 2.80s sanity_check : Ansible Tags | Get all available Ansible tags if cache is not available ----------------------- 2.80s unionfs : MergerFS | Install mergerfs ------------------------------------------------------------------------ 2.52s user : User Account | Reset ownership of '/srv/' path -------------------------------------------------------- 2.39s system : Gather the package facts ---------------------------------------------------------------------------- 2.10s docker : Gather package facts -------------------------------------------------------------------------------- 2.10s

Error: Playbook /srv/git/saltbox/saltbox.yml run failed, scroll up to the failed task to review.

I looked up that the controller is located at /etc/systemd/system/saltbox_managed_docker_controller.service and when trying to start the service i get the following message:

$ systemctl start saltbox_managed_docker_controller.service ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to start 'saltbox_managed_docker_controller.service'. Multiple identities can be used for authentication:

  1. Ubuntu (ubuntu)
  2. saltbox Choose identity to authenticate as (1-2):

and because the playbook will never give the answer, it will resolve in the following timeout:

$ systemctl start saltbox_managed_docker_controller.service ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to start 'saltbox_managed_docker_controller.service'. Multiple identities can be used for authentication:

  1. Ubuntu (ubuntu)
  2. saltbox Choose identity to authenticate as (1-2): Failed to start saltbox_managed_docker_controller.service: Connection timed out See system logs and 'systemctl status saltbox_managed_docker_controller.service' for details.

My question is now, should i delete my delete my default ubuntu user on this mashine, or is there a way to force the systemd service to be started with the current user?

System Information

  • Operating System: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
  • Linux Kernel: 5.15.0-107-generic

— Reply to this email directly, view it on GitHub https://github.com/saltyorg/Saltbox/issues/209, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSIMLT7LV4GJBAX4N24KI3ZDQ2TRAVCNFSM6AAAAABIC573VKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDSNRWHA3DMMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>