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

Errors on Vagrant Up... #290

Open
JimPirrie opened this issue Nov 15, 2016 · 12 comments
Open

Errors on Vagrant Up... #290

JimPirrie opened this issue Nov 15, 2016 · 12 comments

Comments

@JimPirrie
Copy link

Suddenly started getting errors on booting up VMs: changed overnight with no changes in my local environment. The error message has changed (which again suggests it's not a local issue), but It seems to be to do with loading PHP. Any ideas? Thanks in advance for your help!

Here's the tail end of the log:

==> default: TASK [php : Add ppa Repository] ************************************************
==> default: fatal: [192.168.33.99]: FAILED! => {"changed": false, "failed": true, "msg": "failed to fetch PPA information, error was: HTTP Error 404: Not Found"}
==> default:
==> default: RUNNING HANDLER [apache : restart apache] **************************************
==> default: to retry, use: --limit @/vagrant/ansible/playbook.retry
==> default:
==> default: PLAY RECAP *********************************************************************
==> default: 192.168.33.99 : ok=20 changed=18 unreachable=0 failed=1
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

@hsegnitz
Copy link

this seems to be a duplicate of #289 -- I'm having the same issues.

@JimPirrie
Copy link
Author

Thanks @hsegnitz.

I tried changing the entry in all.yaml to ppa: php as suggested (apart from that the files I'm using are clean output from phansible.com today), sadly still fails, but in a different way:

==> default: TASK [php : Install PHP Packages] **********************************************
==> default: failed: 192.168.33.99 => {"failed": true, "item": ["php.packages"], "msg": "No package matching 'php.packages' is available"}
==> default:
==> default: RUNNING HANDLER [apache : restart apache] **************************************
==> default: to retry, use: --limit @/vagrant/ansible/playbook.retry
==> default:
==> default: PLAY RECAP *********************************************************************
==> default: 192.168.33.99 : ok=24 changed=22 unreachable=0 failed=1
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

@JimPirrie JimPirrie reopened this Nov 15, 2016
@JimPirrie
Copy link
Author

(sorry - new around here...)

@debo
Copy link
Member

debo commented Nov 15, 2016

@JimPirrie no problem, I'll have a look as soon as I can, I am still having internet issues in my new place in Australia

@hsegnitz
Copy link

hsegnitz commented Nov 15, 2016

Maybe this helps:

I had the same problem, "No package matching 'php.packages' is available" - after I changed the ppa to just "php". I tried a lot of things and what finally seemed to work was moving the list of PHP-Modules out of all.yml to php/tasks/main.yml.
and change their names to specify the php-version.

so it reads now:

with_items: [php5.6-cli, php5.6-intl, php5.6-mcrypt, php5.6-curl, php5.6-fpm, php5.6-mysql, php5.6-xdebug, php5.6-xsl, php5.6-redis]

then, I had to change the php-fpm socket (I'm using nginx) to this:

fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;

But this comes with a big "YMMV" -- I might have done a few things out of vagrant/ansible inside the machine -- and I can't throw it away currently since I'm actively developing an application using it.

@JimPirrie
Copy link
Author

@debo thanks! And good luck with the connection. Not a good problem to have if you're in this business!

@JimPirrie
Copy link
Author

@hsegnitz thanks. I'm using my pre-production dev servers for the time being. Not ideal!

@floodedcodeboy
Copy link

Okay ... so I recently forked the project and came across the same issues on vagrant up.

I'm running:
vagrant 1.8.6
ansible 2.2.0
macOS 10.12.1

The First was

fatal: [192.168.56.121]: FAILED! => {"changed": false, "failed": true, "msg": "failed to fetch PPA information, error was: HTTP Error 404: Not Found"}

This one is a quick fix. The PPA has moved! Not the most common knowledge
The fix for this is to update the ppa line in the ansible/group_vars/webservers file from php5 to simply php

After this I destroyed the box and ran vagrant up again.

The next error I got was similar to @JimPirrie except it was dealing with sys_packages

failed: [192.168.56.121] (item=[u'sys_packages']) => {"failed": true, "item": ["sys_packages"], "msg": "No package matching 'sys_packages' is available"}

The issue here and in @JimPirrie 's issue is the way that the sys_packages variable is referenced. My fix for this was to update the roles/init/tasks/main.yml file to reference sys_packages as "{{ sys_packages }}"

My final issue was exactly the same as @JimPirrie - my fix was exactly the same as the sys_packages issue above.

I hope this helps.

@JimPirrie
Copy link
Author

@floodedcodeboy you are a complete star!! Thank you so much! Worked perfectly.

Not sure I should close this issue thread until the root-cause on phansible.com is fixed, though?

@floodedcodeboy
Copy link

@JimPirrie great to hear that that helped. I agree with you, open is good until it can be fixed properly.

@naxhh
Copy link
Contributor

naxhh commented Nov 16, 2016

Keep it open. when fixed someone will close it :)

We have two problems here:

1st. the ppa has changed the structure (already specified in another task)
2nd. is the sys_packages property

@debo
Copy link
Member

debo commented Feb 2, 2017

@JimPirrie @floodedcodeboy @hsegnitz the PHP role was fixed here and a fix for sys_packages it's on its way. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants