Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible vagrant Please fix these errors and try again. #1658

Open
DanRoller opened this issue Oct 23, 2020 · 16 comments
Open

ansible vagrant Please fix these errors and try again. #1658

DanRoller opened this issue Oct 23, 2020 · 16 comments
Labels
Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Subject:Deployment related to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker) Type: question asks for support (asks a question)

Comments

@DanRoller
Copy link

Today 10/23
Cleaned prior work and now on all vagrant up attemps
With git clone -b main https://github.com/Islandora-Devops/islandora-playbook
with no changes to Vagrant file, or with changing to Islandora/8
I get similar errors.

vout.bionic:ERROR loader: Unknown config sources: [:"24155960_islandora/8_virtualbox"]
vout.bionic:ERROR loader: Unknown config sources: [:"24155960_islandora/8_virtualbox"]
vout.bionic:ERROR loader: Unknown config sources: [:"24155960_islandora/8_virtualbox"]
vout.bionic:ERROR loader: Unknown config sources: [:"24155960_islandora/8_virtualbox"]
vout.bionic:ERROR loader: Unknown config sources: [:"22271760_ubuntu/bionic64_virtualbox"]
vout.bionic:ERROR loader: Unknown config sources: [:"22271760_ubuntu/bionic64_virtualbox"]
vout.i8:ERROR loader: Unknown config sources: [:"24155960_islandora/8_virtualbox"]
vout.i8:ERROR loader: Unknown config sources: [:"24155960_islandora/8_virtualbox"]
vout.new:ERROR loader: Unknown config sources: [:"24436440_islandora/8_virtualbox"]
vout.new:ERROR loader: Unknown config sources: [:"24436440_islandora/8_virtualbox"]
vout.new:ERROR loader: Unknown config sources: [:"24436440_islandora/8_virtualbox"]
d

Virtrual machine is started but vagrant up times out.

Should I jack up the time out or is the ERROR

@DanRoller
Copy link
Author

dan@dan-VirtualBox:$ VBoxManage --version
6.1.10_Ubuntur138449
dan@dan-VirtualBox:
$ ./vagrant --version
Vagrant 2.2.10

@DanRoller DanRoller changed the title vagrant up Unknown config sources ansible vagrant up Unknown config sources Oct 25, 2020
@DanRoller
Copy link
Author

Messages changed, no error. Please fix these errors and try again.

I revisit this every couple of days, being more careful on each requirements step.
Today, I used ubuntu 18.04 rather than 20.04, and hadn't noted in my install notes, some steps concerning pip.

Results
(1) failed, and failed after setting config.vm.boot_timeout = 3600 in Vagrantfile
but not failing with unknown config sources, now just times out.
(2) but much appreciate vagrant up storing it's startup messages, and writing them on failure.

Please view vagrant output below, the Install notes start with installing ubuntu in Window's VirtualBox.

At this point, I know how to try increasing the timeout assuming downloads are slow, I do live in New Mexico!

vagrant output

Install notes

@DanRoller DanRoller changed the title ansible vagrant up Unknown config sources ansible vagrant Please fix these errors and try again. Oct 27, 2020
@DanRoller
Copy link
Author

@DanRoller
Copy link
Author

DanRoller commented Oct 28, 2020

After changing boot_timeout to 10 hours, vagrant up failed after almost 5 hours.
TASK [geerlingguy.drupal-console : Install Drupal Console.] ********************
Tuesday 27 October 2020 22:46:17 -0600 (0:00:00.056) 4:58:15.234 *******
fatal: [default]: FAILED! => {"changed": false, "dest": "/usr/local/bin/drupal", "elapsed": 3, "msg": "Request failed", "response": "HTTP Error 500: Internal Server Error", "status_code": 500, "url": "https://drupalconsole.com/installer"}

vagrant output at

https://1drv.ms/t/s!AsktWfvz2E2Qg5RQq4XVTsc8Akd9Hw?e=L6TXB8
I don't know how to proceed. Suggestions welcome.

Thanks for your time.

@elizoller
Copy link
Member

there is a fix on the dev branch of the islandora-playbook for the drupal console install

@DanRoller
Copy link
Author

I found the issue relating to the console requirement should be removed.
Hence, I fixed in requirements.yml webserver.yml.

Then what to do? After looking at vagrant commands, I tried vagrant provision,
this led to:
...leading messages
TASK [install python] **********************************************************
Wednesday 28 October 2020 08:58:32 -0600 (0:00:00.078) 0:00:00.078 *****
fatal: [default]: FAILED! => {"msg": "Timeout (32s) waiting for privilege escalation prompt: "}

and then tried adding additional timeout, which didn't work.

Having limited skills here, I suspect that my best choice is

  1. Rename folder. stop and virtual machine
  2. git clone the bleeding edge, vagrant up, which might complete before bedtime.

or
know how to vagrant provision or whatever it is to continue with the current VM

or
beg for someone to provide a local.iso that is probably byte for byte
the same as what I am trying to create. (And then I'd do nightly git\vagrant ups
for some weeks to contribute for the gift).

Remember, I'm just trying to get a full (non-demo) Islandora so I can practice Islandora.

Thanks,
Dan

@elizoller
Copy link
Member

personally i would probably checkout the dev branch, use vagrant destroy to completely destroy any existing vm, use ISLANDORA_DISTRO=ubuntu/bionic64 vagrant up and wait for it to build
if you do vagrant up with no islandora_distro specified then it'll give a kind of pre-built box from the latest release. it is considerably faster and helpful if you're trying to test something, but if you're going to do active development work, slogging through the full build would probably be your best bed (by specifying an islandora_distro)
see here for setting the basebox: http://islandora.github.io/documentation/installation/playbook/#set-the-base-box
you are correct that using vagrant provision essentially reruns the whole playbook on an existing box, which could also work in your case.
there is also a VM image released here https://islandora.ca/downloads if that provides any help for you.
i personally haven't seen any issues with installing python timing out.

@DanRoller
Copy link
Author

Following elizoller advice
.
Went used
git clone -b dev https://github.com/Islandora-Devops/islandora-playbook
and in Vagrantfile
$vagrantBox = ENV.fetch("ISLANDORA_DISTRO", "ubuntu/bionic64")
as suggested and added
config.vm.boot_timeout = 36000
.

failing at
.
.
full text at https://1drv.ms/t/s!AsktWfvz2E2Qg5RSMx4bOcj0BfZAJg?e=CvX9Og
.
TASK [geerlingguy.php-versions : Add repository for PHP versions (Ubuntu).] ****
Wednesday 28 October 2020 19:15:58 -0600 (0:00:00.044) 3:38:18.972 *****
[WARNING]: Module remote_tmp /root/.ansible/tmp did not exist and was created
with a mode of 0700, this may cause issues when running as another user. To
avoid this, create the remote_tmp dir with the correct permissions manually

fatal: [default]: FAILED! => {"changed": false, "cmd": "apt-key adv --recv-keys --no-tty --keyserver hkp://keyserver.ubuntu.com:80 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C", "msg": "Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: connecting dirmngr at '/tmp/apt-key-gpghome.hOAnyaa78W/S.dirmngr' failed: IPC connect call failed\ngpg: keyserver receive failed: No dirmngr", "rc": 2, "stderr": "Warning: apt-key output should not be parsed (stdout is not a terminal)\ngpg: connecting dirmngr at '/tmp/apt-key-gpghome.hOAnyaa78W/S.dirmngr' failed: IPC connect call failed\ngpg: keyserver receive failed: No dirmngr\n", "stderr_lines": ["Warning: apt-key output should not be parsed (stdout is not a terminal)", "gpg: connecting dirmngr at '/tmp/apt-key-gpghome.hOAnyaa78W/S.dirmngr' failed: IPC connect call failed", "gpg: keyserver receive failed: No dirmngr"], "stdout": "Executing: /tmp/apt-key-gpghome.hOAnyaa78W/gpg.1.sh --recv-keys --no-tty --keyserver hkp://keyserver.ubuntu.com:80 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C\n", "stdout_lines": ["Executing: /tmp/apt-key-gpghome.hOAnyaa78W/gpg.1.sh --recv-keys --no-tty --keyserver hkp://keyserver.ubuntu.com:80 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C"]}

RUNNING HANDLER [Islandora-Devops.matomo : restart apache] *********************
Wednesday 28 October 2020 19:17:13 -0600 (0:01:15.577) 3:39:34.549 *****

PLAY RECAP *********************************************************************
default : ok=67 changed=21 unreachable=0 failed=1 skipped=37 rescued=0 ignored=0
.
.
.
I'll now look to see if there is a prior incident.
Dan

@DanRoller
Copy link
Author

Out of some frustration, I redid
vagrant destroy, reboot, vagrant up .. not doing git clone,
and I get different results.

full text https://1drv.ms/t/s!AsktWfvz2E2Qg5RTrS-tSwIoIYvEjw?e=3nHIiz

TASK [geerlingguy.drupal : Generate Drupal project with composer package in /tmp/composer-project (this may take a while).] ***
Thursday 29 October 2020 02:32:46 -0600 (0:00:07.309) 4:59:24.298 ******
fatal: [default]: FAILED! => {"changed": true, "cmd": ["/usr/local/bin/composer", "create-project", "islandora/drupal-project:8.8.1", "/tmp/composer-project", "--prefer-dist", "--stability", "dev", "--no-interaction"], "delta": "0:03:34.144278", "end": "2020-10-29 08:36:20.946960", "msg": "non-zero return code", "rc": 2, "start": "2020-10-29 08:32:46.802682", "stderr": "Creating a "islandora/drupal-project:8.8.1" project at "/tmp/composer-project"\nInstalling islandora/drupal-project (8.8.1)\n - Downloading islandora/drupal-project (8.8.1)\n - Installing islandora/drupal-project (8.8.1): Extracting archive\nCreated project in /tmp/composer-project\n> DrupalProject\composer\ScriptHandler::checkComposerVersion\nLoading composer repositories with package information\nUpdating dependencies\nYour requirements could not be resolved to an installable set of packages.\n\n Problem 1\n - drupal/console[1.0.2, ..., 1.9.5] require drupal/console-extend-plugin ~0 -> satisfiable by drupal/console-extend-plugin[0.1.0, ..., 0.9.4].\n - drupal/console-extend-plugin[0.1.0, ..., 0.9.4] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.\n - Root composer.json requires drupal/console ^1.0.2 -> satisfiable by drupal/console[1.0.2, ..., 1.9.5].\n\nYou are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.", "stderr_lines": ["Creating a "islandora/drupal-project:8.8.1" project at "/tmp/composer-project"", "Installing islandora/drupal-project (8.8.1)", " - Downloading islandora/drupal-project (8.8.1)", " - Installing islandora/drupal-project (8.8.1): Extracting archive", "Created project in /tmp/composer-project", "> DrupalProject\composer\ScriptHandler::checkComposerVersion", "Loading composer repositories with package information", "Updating dependencies", "Your requirements could not be resolved to an installable set of packages.", "", " Problem 1", " - drupal/console[1.0.2, ..., 1.9.5] require drupal/console-extend-plugin ~0 -> satisfiable by drupal/console-extend-plugin[0.1.0, ..., 0.9.4].", " - drupal/console-extend-plugin[0.1.0, ..., 0.9.4] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.", " - Root composer.json requires drupal/console ^1.0.2 -> satisfiable by drupal/console[1.0.2, ..., 1.9.5].", "", "You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2."], "stdout": "", "stdout_lines": []}

@dflitner
Copy link

I'm sorry you're having so much trouble with this, Dan. We were just discussing Composer 2 in our tech call yesterday and we know we need to make some updates to make sure that all of our libraries and modules work with Composer 2.

I don't know how to muck with the Ansible settings but you should be able to change the version of Composer that you have installed on your computer. composer self-update --1 will go back to 1.10.16 and then hopefully it will work for you.

@DanRoller
Copy link
Author

I don't know how to mug Composer.
I'll fall back to doing this nightly until its soup.
I'll proceed with reduced noise.

@DanRoller
Copy link
Author

12/16/2020 I'm back and tried the playbook on new ubuntu.

/home/dan/.local/lib/python2.7/site-packages/ansible/parsing/vault/init.py:41: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography.exceptions import InvalidSignature

PLAY [bootstrap] ***************************************************************

TASK [install python] **********************************************************
Tuesday 15 December 2020 23:22:01 -0700 (0:00:00.202) 0:00:00.202 ******
fatal: [default]: FAILED! => {"msg": "Timeout (32s) waiting for privilege escalation prompt: "}

PLAY RECAP *********************************************************************
default : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Tuesday 15 December 2020 23:22:34 -0700 (0:00:33.024) 0:00:33.227 ******

install python --------------------------------------------------------- 33.02s
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
dan@danU2004:~/islandora-playbook$

Is is required to link python to python3?

@alxp
Copy link
Contributor

alxp commented Jan 4, 2021

I just had a similar-seeming problem after upgrading to macOS 11.1.

Tried un-installing and re-installing VirtualBox and Vagrant with no results, and vagrant halt was hanging at its attempt to force shutdown the VM.

What I ended up needing to do was to go to System Preferences -> Security and Privacy, and under the Firewall tab, clicking the lock to make changes and then clicking 'Firewall Options', scrolling down to "VBoxHeadless" where I now saw two instances, one of which was set to 'Block incoming connections'. After changing this to 'Allow' and rebooting, my VM starts and is provisioning (dev branch of islandora-playbook) as expected.

image

Hope this helps anyone experiencing this problem.

@DanRoller
Copy link
Author

DanRoller commented Mar 1, 2021

Every once in a while I return to this problem.
I gave up on nested virtualbox, then tried to do Windows WSL, and the trail of suggestions for vagrant is long, and still doesn't work.

Last week, I dug out an extremely old/slow laptop running windows and installed Ubuntu, and vagrant worked the 1st time,
but that machine has a wierd wifi card, spent a week and a usb wifi, and still doesn't work. I can't permanently move my development to the 1 ethernet port in my house.

I DO NOT WANT TO SOVLE endless Ubuntu problems so that I might be able to volunteer to work on Islandora.

Now, I also want to leave my current development machine alone, it has too much history attached to it for Islandora development.

SO. For those who can VAGRANT UP at will, please give me a sense of your configuration and I will buy the appropriate hardware.

Today I thought that I might buy an Macbook Pro and duel boot MacOS and Ubuntu (I might enjoy MacOS on it own. BUT NOT AN M1, the Intel!
This would give me two chances (1) virtualbox vagrant up under macos or (2) virtualbox vagrant under ubuntu 20.04
However I see that there is the same trail of Wifi cards not being recognized and there is a least one 20 step Ubuntu fix for this!
But I haven't found the trail of tears for a MacOS appoach (other than last post by alxp ).

I'd love your option of the best, simplest, or your setup.
Thanks in advance, and sorry about the rant!
Dan

@DanRoller
Copy link
Author

Today, vagrant is working if I use box islandora/8.
However if I want the dev environment by using $vagrantBox = ENV.fetch("ISLANDORA_DISTRO", "ubuntu/bionic64")
I get error
Stderr: VBoxManage.exe: error: RawFile#0 failed to create the raw output file
/mnt/c/Users/dan00/I8/islandora-playbook/ubuntu-bionic-18.04-cloudimg-console.log
(VERR_PATH_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

I am vagranting up from Windows WSL Ubuntu 20.04.
This was failing silently before, but everything was!

Do I need to build from 18.04?

@kstapelfeldt kstapelfeldt added Subject:Deployment related to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker) Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Type: question asks for support (asks a question) and removed Ansible labels Sep 25, 2021
@kstapelfeldt
Copy link
Member

Hi Dan, I know this doesn't answer your question: # Available boxes are 'islandora/8' and 'ubuntu/focal64’ - https://github.com/Islandora-Devops/islandora-playbook/blob/dev/Vagrantfile#L14

Unfortunately, we don't have good current instructions for setting up in Windows.

Can you take a look at this recent pull request and see if this will work for you? Islandora-Devops/islandora-playbook#201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Subject:Deployment related to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker) Type: question asks for support (asks a question)
Projects
Development

No branches or pull requests

5 participants