meonkeys / shb

Source code for an awesome book about self-hosting.
https://selfhostbook.com
GNU Affero General Public License v3.0
55 stars 2 forks source link

`Timeout (12s) waiting for privilege escalation prompt` #2

Closed a-w-1806 closed 2 months ago

a-w-1806 commented 3 months ago

Hi. I am seeing this error.

❯ ❯ ./provision.sh
BECOME password:

PLAY [all] ********************************************************************************************************************************

TASK [base : Configure apt cache] *********************************************************************************************************
fatal: [mario_server]: FAILED! => {"msg": "Timeout (12s) waiting for privilege escalation prompt: "}

PLAY RECAP ********************************************************************************************************************************
mario_server               : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
  1. What does "BECOME password" mean?
  2. Why am I seeing this privilege escalation prompt?

Update

Following https://stackoverflow.com/questions/39533532/ansible-timeout-12s-waiting-for-privilege-escalation-prompt can solve the issue. I think it makes sense if we add this in this repo.

meonkeys commented 3 months ago

Ahoy!

I am seeing this error

Does this error occur every time you try to run provision.sh? Just checking if this issue is persistent or intermittent. I'm guessing the latter based on your other issues which clearly show your provision (almost) completing.

I can't reproduce the error on my server.

What does "BECOME password" mean?

That's Ansible asking you for a password to assume root privileges (become root) to be able to make changes to the system, such as installing packages. Illustrated in the book in listing mario second run output (🏠 admin computer).

Following (stackoverflow 39533532) can solve the issue.

Do you know which answer?

a-w-1806 commented 3 months ago

Yes it's consistently happening to me (note that at that time I am still having https://github.com/meonkeys/shb/issues/4#issuecomment-2190450282 this).

The change I made is adding the timeout=60 in ansible.cfg.

[defaults]
inventory = hosts.yml
timeout = 60
meonkeys commented 3 months ago

I wonder if this is related to #5. What do you think?

meonkeys commented 3 months ago

Just a heads-up that I'll likely close issues after a while if they remain idle. When I do, please feel free to reopen them, open more/other issues, and use the chat and forum. I hope we can get your server up and running and working well.

meonkeys commented 2 months ago

Closing. Please see https://github.com/meonkeys/shb/issues/2#issuecomment-2200737880