Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Could not find the requested service "firewall" #958

Closed
geerlingguy opened this issue Nov 1, 2016 · 10 comments
Closed

Could not find the requested service "firewall" #958

geerlingguy opened this issue Nov 1, 2016 · 10 comments

Comments

@geerlingguy
Copy link
Owner

geerlingguy commented Nov 1, 2016

On macOS Sierra, running VirtualBox 5.1.8 and Vagrant 1.8.6, with Ansible 2.2.0, a fresh Drupal VM provision is bailing with:

TASK [geerlingguy.firewall : Ensure the firewall is enabled and will start on boot.] ***
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service \"'firewall'\": "}

RUNNING HANDLER [geerlingguy.firewall : restart firewall] **********************

PLAY RECAP *********************************************************************
drupalvm                   : ok=10   changed=6    unreachable=0    failed=1

This looks like it could be related to #829, but I'm doing a little more investigation. For now, the simplest fix is to stay on Ansible 2.1.x (e.g. pip install ansible==2.1) instead of installing Ansible 2.2.x... something's changed with Ansible's service module that must be causing this issue.

On Windows, the issue can be caused by non-UNIX line endings on the firewall service file (see #829 comments), but on Mac/Linux (and on Windows in general), it looks like Ansible 2.2's service module gets snagged, but only on Ubuntu 16.04, which leads me to believe something is missing for systemd.

Temporary Fixes

  1. Switch back to Ansible 2.1.x (e.g. pip install ansible==2.1)
  2. If you see this error, run vagrant reload --provision to restart the VM and continue provisioning)
@geerlingguy
Copy link
Owner Author

See also: geerlingguy/ansible-role-firewall#17

@geerlingguy
Copy link
Owner Author

Ha... then since the firewall is set up but not configured properly... it looks like SSH is being blocked, so fix #2 might not work that great. Or it could be an issue with my latest iteration of the geerlingguy/ubuntu1604 box, or with Vagrant 1.8.6. Or VMware 8.5. Grr.

@enapt
Copy link

enapt commented Nov 2, 2016

Getting same error. :( Tried destorying box, copying from working config, etc, no luck.

@enapt
Copy link

enapt commented Nov 2, 2016

After using vagrant reload --provision - I'm getting..

TASK [geerlingguy.postgresql : Ensure PostgreSQL packages are installed.] ******
fatal: [clbs]: FAILED! => {"failed": true, "msg": "'postgresql_packages' is undefined"}
    to retry, use: --limit @/vagrant/provisioning/playbook.retry

PLAY RECAP *********************************************************************
clbs                       : ok=106  changed=3    unreachable=0    failed=1   

@geerlingguy
Copy link
Owner Author

@enapthine - I opened geerlingguy/ansible-role-postgresql#7 for that issue—it seems I might need to adjust a few things in a few different roles for Ansible 2.2+ compatibility.

@geerlingguy
Copy link
Owner Author

I have a fix for this in the geerlingguy.firewall role. Will continue testing.

@geerlingguy
Copy link
Owner Author

See upstream issue: geerlingguy/ansible-role-firewall#22

@geerlingguy
Copy link
Owner Author

Heh... now that I fixed the firewall issue, I hit the same thing with the mailhog role:

TASK [geerlingguy.mailhog : Ensure mailhog is enabled and will start on boot.] *
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service \"'mailhog'\": "}

Will open another upstream role.

@geerlingguy
Copy link
Owner Author

geerlingguy commented Nov 2, 2016

And now that I fixed mailhog, I'm getting:

TASK [geerlingguy.java : Ensure Java is installed.] ****************************
fatal: [drupalvm]: FAILED! => {"failed": true, "msg": "'java_packages' is undefined"}

Ansible 2.2 is like a hydra for all my roles with custom init scripts and sneakily-defined variables :P

@geerlingguy
Copy link
Owner Author

Issue for Java role: geerlingguy/ansible-role-java#26

brandonratz pushed a commit to confcats/drupal-vm that referenced this issue Nov 18, 2016
kekkis pushed a commit to kekkis/drupal-vm that referenced this issue Feb 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants