talk@lists.collectionspace.org

Targeted discussion among implementers and between implementers and the CollectionSpace development team

View all threads

Need help with automated installer

W
ww@williwolf.net
Fri, Sep 10, 2021 1:49 PM

Hi,

I’m new to the ansible installer. I’m just doing a basic testing setup. My workstation is called primary and the server vm is called ahn-backup. I’m getting this error on the workstation. (I’m also going to paste the auth.log from the ahn-backup vm at the bottom of this message.) thanks — Willi

Ansible playbook error on workstation:

cspace-installer@primary:~/cspace-installer$ ansible-playbook -i $DOMAIN, collectionspace.yml -u $USER -e @vars/deploy.yml

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

TASK [Gathering Facts] *************************************************************************************************

Friday 10 September 2021  06:35:58 -0700 (0:00:00.033)      0:00:00.033 ******

fatal: [172.21.62.198]: FAILED! => {"msg": "Missing sudo password"}

PLAY RECAP *************************************************************************************************************

172.21.62.198              : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Friday 10 September 2021  06:35:59 -0700 (0:00:00.773)      0:00:00.806 ******


---=============

Gathering Facts ------------------------------------------------------------------------------------------------- 0.77s

Auth.log on server:

ubuntu@ahn-backup:/var/log$ tail auth.log

Sep 10 06:35:59 ahn-backup sshd[16503]: pam_unix(sshd:session): session opened for user cspace-installer by (uid=0)

Sep 10 06:35:59 ahn-backup systemd-logind[651]: New session 25 of user cspace-installer.

Sep 10 06:35:59 ahn-backup systemd: pam_unix(systemd-user:session): session opened for user cspace-installer by (uid=0)

Sep 10 06:35:59 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-oqqetswikayxfcxkrbicsobiljzzytex ; /usr/bin/python3

Sep 10 06:36:48 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-dnpcrhgasmgqmgdegpaznhdbasorhtkl ; /usr/bin/python3

Sep 10 06:37:48 ahn-backup sshd[16592]: Received disconnect from 172.21.53.45 port 56782:11: disconnected by user

Sep 10 06:37:48 ahn-backup sshd[16592]: Disconnected from user cspace-installer 172.21.53.45 port 56782

Sep 10 06:37:48 ahn-backup sshd[16503]: pam_unix(sshd:session): session closed for user cspace-installer

Sep 10 06:37:48 ahn-backup systemd-logind[651]: Session 25 logged out. Waiting for processes to exit.

Sep 10 06:37:48 ahn-backup systemd-logind[651]: Removed session 25.

Hi, I’m new to the ansible installer. I’m just doing a basic testing setup. My workstation is called primary and the server vm is called ahn-backup. I’m getting this error on the workstation. (I’m also going to paste the auth.log from the ahn-backup vm at the bottom of this message.) thanks — Willi Ansible playbook error on workstation: cspace-installer@primary:\~/cspace-installer$ ansible-playbook -i $DOMAIN, collectionspace.yml -u $USER -e @vars/deploy.yml PLAY \[all\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* TASK \[Gathering Facts\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Friday 10 September 2021 06:35:58 -0700 (0:00:00.033) 0:00:00.033 \*\*\*\*\*\* fatal: \[172.21.62.198\]: FAILED! => {"msg": "Missing sudo password"} PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 172\.21.62.198 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Friday 10 September 2021 06:35:59 -0700 (0:00:00.773) 0:00:00.806 \*\*\*\*\*\* =============================================================================== Gathering Facts ------------------------------------------------------------------------------------------------- 0.77s Auth.log on server: ubuntu@ahn-backup:/var/log$ tail auth.log Sep 10 06:35:59 ahn-backup sshd\[16503\]: pam_unix(sshd:session): session opened for user cspace-installer by (uid=0) Sep 10 06:35:59 ahn-backup systemd-logind\[651\]: New session 25 of user cspace-installer. Sep 10 06:35:59 ahn-backup systemd: pam_unix(systemd-user:session): session opened for user cspace-installer by (uid=0) Sep 10 06:35:59 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-oqqetswikayxfcxkrbicsobiljzzytex ; /usr/bin/python3 Sep 10 06:36:48 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-dnpcrhgasmgqmgdegpaznhdbasorhtkl ; /usr/bin/python3 Sep 10 06:37:48 ahn-backup sshd\[16592\]: Received disconnect from 172.21.53.45 port 56782:11: disconnected by user Sep 10 06:37:48 ahn-backup sshd\[16592\]: Disconnected from user cspace-installer 172.21.53.45 port 56782 Sep 10 06:37:48 ahn-backup sshd\[16503\]: pam_unix(sshd:session): session closed for user cspace-installer Sep 10 06:37:48 ahn-backup systemd-logind\[651\]: Session 25 logged out. Waiting for processes to exit. Sep 10 06:37:48 ahn-backup systemd-logind\[651\]: Removed session 25.
MC
Mark Cooper
Fri, Sep 17, 2021 5:49 PM

Apologies to the list, I replied directly to Willi, so just for the record:

Connection issue:

Because the user you're connecting as doesn't have passwordless sudo privileges you need: -K, --ask-become-pass: [ask for privilege escalation password]

ansible-playbook -i $DOMAIN, collectionspace.yml -u $USER -e @vars/deploy.yml -K

ElasticSearch issue:

There was a port 9200 timeout / ES not starting:
"Thanks, turns out my vm was out of memory, which was easily increased."

Environment issue:

It looks like it had a problem with the contents of your "collectionspace_environment" variable. To get some output you can set no_log to false here: https://github.com/collectionspace/cspace-installer/blob/master/roles/collectionspace/tasks/user.yml#L2https://github.com/collectionspace/cspace-installer/blob/master/roles/collectionspace/tasks/user.yml#L26. To make this a bit more efficient you can add a tag to that task (say user_env) and then run the playbook command with --tags user_env

This was a non-core tenant config issue resolved by: https://github.com/collectionspace/cspace-installer/commit/4553ad97292f5b2825f19acb89c9e5f30a5713f5

Best,
Mark


From: ww@williwolf.net ww@williwolf.net
Sent: Friday, September 10, 2021 6:49 AM
To: talk@lists.collectionspace.org talk@lists.collectionspace.org
Subject: [Talk] Need help with automated installer

Hi,

I’m new to the ansible installer. I’m just doing a basic testing setup. My workstation is called primary and the server vm is called ahn-backup. I’m getting this error on the workstation. (I’m also going to paste the auth.log from the ahn-backup vm at the bottom of this message.) thanks — Willi

Ansible playbook error on workstation:

cspace-installer@primary:~/cspace-installer$ ansible-playbook -i $DOMAIN, collectionspace.yml -u $USER -e @vars/deploy.yml

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

TASK [Gathering Facts] *************************************************************************************************

Friday 10 September 2021 06:35:58 -0700 (0:00:00.033) 0:00:00.033 ******

fatal: [172.21.62.198]: FAILED! => {"msg": "Missing sudo password"}

PLAY RECAP *************************************************************************************************************

172.21.62.198 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Friday 10 September 2021 06:35:59 -0700 (0:00:00.773) 0:00:00.806 ******


---=============

Gathering Facts ------------------------------------------------------------------------------------------------- 0.77s

Auth.log on server:

ubuntu@ahn-backup:/var/log$ tail auth.log

Sep 10 06:35:59 ahn-backup sshd[16503]: pam_unix(sshd:session): session opened for user cspace-installer by (uid=0)

Sep 10 06:35:59 ahn-backup systemd-logind[651]: New session 25 of user cspace-installer.

Sep 10 06:35:59 ahn-backup systemd: pam_unix(systemd-user:session): session opened for user cspace-installer by (uid=0)

Sep 10 06:35:59 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-oqqetswikayxfcxkrbicsobiljzzytex ; /usr/bin/python3

Sep 10 06:36:48 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-dnpcrhgasmgqmgdegpaznhdbasorhtkl ; /usr/bin/python3

Sep 10 06:37:48 ahn-backup sshd[16592]: Received disconnect from 172.21.53.45 port 56782:11: disconnected by user

Sep 10 06:37:48 ahn-backup sshd[16592]: Disconnected from user cspace-installer 172.21.53.45 port 56782

Sep 10 06:37:48 ahn-backup sshd[16503]: pam_unix(sshd:session): session closed for user cspace-installer

Sep 10 06:37:48 ahn-backup systemd-logind[651]: Session 25 logged out. Waiting for processes to exit.

Sep 10 06:37:48 ahn-backup systemd-logind[651]: Removed session 25.

Apologies to the list, I replied directly to Willi, so just for the record: Connection issue: Because the user you're connecting as doesn't have passwordless sudo privileges you need: -K, --ask-become-pass: [ask for privilege escalation password] ansible-playbook -i $DOMAIN, collectionspace.yml -u $USER -e @vars/deploy.yml -K ElasticSearch issue: There was a port 9200 timeout / ES not starting: "Thanks, turns out my vm was out of memory, which was easily increased." Environment issue: It looks like it had a problem with the contents of your "collectionspace_environment" variable. To get some output you can set no_log to false here: https://github.com/collectionspace/cspace-installer/blob/master/roles/collectionspace/tasks/user.yml#L2<https://github.com/collectionspace/cspace-installer/blob/master/roles/collectionspace/tasks/user.yml#L26>. To make this a bit more efficient you can add a tag to that task (say user_env) and then run the playbook command with --tags user_env This was a non-core tenant config issue resolved by: https://github.com/collectionspace/cspace-installer/commit/4553ad97292f5b2825f19acb89c9e5f30a5713f5 Best, Mark ________________________________ From: ww@williwolf.net <ww@williwolf.net> Sent: Friday, September 10, 2021 6:49 AM To: talk@lists.collectionspace.org <talk@lists.collectionspace.org> Subject: [Talk] Need help with automated installer Hi, I’m new to the ansible installer. I’m just doing a basic testing setup. My workstation is called primary and the server vm is called ahn-backup. I’m getting this error on the workstation. (I’m also going to paste the auth.log from the ahn-backup vm at the bottom of this message.) thanks — Willi Ansible playbook error on workstation: cspace-installer@primary:~/cspace-installer$ ansible-playbook -i $DOMAIN, collectionspace.yml -u $USER -e @vars/deploy.yml PLAY [all] ************************************************************************************************************* TASK [Gathering Facts] ************************************************************************************************* Friday 10 September 2021 06:35:58 -0700 (0:00:00.033) 0:00:00.033 ****** fatal: [172.21.62.198]: FAILED! => {"msg": "Missing sudo password"} PLAY RECAP ************************************************************************************************************* 172.21.62.198 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Friday 10 September 2021 06:35:59 -0700 (0:00:00.773) 0:00:00.806 ****** =============================================================================== Gathering Facts ------------------------------------------------------------------------------------------------- 0.77s Auth.log on server: ubuntu@ahn-backup:/var/log$ tail auth.log Sep 10 06:35:59 ahn-backup sshd[16503]: pam_unix(sshd:session): session opened for user cspace-installer by (uid=0) Sep 10 06:35:59 ahn-backup systemd-logind[651]: New session 25 of user cspace-installer. Sep 10 06:35:59 ahn-backup systemd: pam_unix(systemd-user:session): session opened for user cspace-installer by (uid=0) Sep 10 06:35:59 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-oqqetswikayxfcxkrbicsobiljzzytex ; /usr/bin/python3 Sep 10 06:36:48 ahn-backup sudo: cspace-installer : a password is required ; TTY=unknown ; PWD=/home/cspace-installer ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-dnpcrhgasmgqmgdegpaznhdbasorhtkl ; /usr/bin/python3 Sep 10 06:37:48 ahn-backup sshd[16592]: Received disconnect from 172.21.53.45 port 56782:11: disconnected by user Sep 10 06:37:48 ahn-backup sshd[16592]: Disconnected from user cspace-installer 172.21.53.45 port 56782 Sep 10 06:37:48 ahn-backup sshd[16503]: pam_unix(sshd:session): session closed for user cspace-installer Sep 10 06:37:48 ahn-backup systemd-logind[651]: Session 25 logged out. Waiting for processes to exit. Sep 10 06:37:48 ahn-backup systemd-logind[651]: Removed session 25.