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

Not sure why php is not getting installed. #110

Closed
harikt opened this issue Nov 27, 2014 · 21 comments
Closed

Not sure why php is not getting installed. #110

harikt opened this issue Nov 27, 2014 · 21 comments

Comments

@harikt
Copy link

harikt commented Nov 27, 2014

Hi,

In order to save the time/bandwidth I downloaded a box from https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box and used to change the config.vm.box = "file:///home/hari/Downloads/virtualbox.box". It can download easily. A few errors I noticed seems not respect to box, may be you can help with . Same is happening with @puphpet . See issue puphpet/puphpet#1224

==> default: cp: 
==> default: cannot stat ‘/vagrant/ansible/inventories/dev’
==> default: : No such file or directory
==> default: cat: 
==> default: /vagrant/ansible/files/authorized_keys
==> default: : No such file or directory
==> default: ERROR: the playbook: /vagrant/ansible/playbook.yml could not be found
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.
\w > \u@\h [php:5.5.9-system]\n$ ls
ansible  Vagrantfile
\w > \u@\h [php:5.5.9-system]\n$ vagrant status
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /var/www in PATH, mode 040777
/opt/vagrant/embedded/gems/gems/bundler-1.6.6/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /var/www in PATH, mode 040777
Current machine states:

default                   running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
\w > \u@\h [php:5.5.9-system]\n$ vagrant ssh
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /var/www in PATH, mode 040777
/opt/vagrant/embedded/gems/gems/bundler-1.6.6/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /var/www in PATH, mode 040777
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-40-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Thu Nov 27 01:17:53 UTC 2014

  System load:  0.37              Processes:           86
  Usage of /:   2.7% of 39.34GB   Users logged in:     0
  Memory usage: 16%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.


vagrant@vagrant-ubuntu-trusty-64:~$ php -v
The program 'php' is currently not installed. To run 'php' please ask your administrator to install the package 'php5-cli'
@erikaheidi
Copy link
Member

Hey @harikt! The provisioning didn't run, that's why PHP is not installed at the end. Nothing was executed in the box. It seems like Vagrant is not finding the provisioning files. I'm not sure if this can be related to the box.

Could you show how your directory is structured? Your application folder should look similar to this:

.
├── ansible
│   ├── files
│   │   └── authorized_keys
│   ├── inventories
│   │   └── dev
│   ├── playbook.yml
│   ├── roles
│   │   ├── init
│   │   ├── nginx
│   │   ├── php5-fpm
│   │   └── phpcommon
│   ├── vars
│   │   ├── apachephp.yml
│   │   ├── common.yml
│   │   ├── nginxphp.yml
│   │   └── ws_defaults.yml
│   └── windows.sh
├── index.php
(other application files)
└── Vagrantfile

@harikt
Copy link
Author

harikt commented Nov 27, 2014

ansible
├── files
│   └── authorized_keys
├── inventories
│   └── dev
├── playbook.yml
├── roles
│   ├── app
│   │   └── tasks
│   │       └── main.yml
│   ├── init
│   │   ├── tasks
│   │   │   └── main.yml
│   │   └── templates
│   │       └── timezone.tpl
│   ├── nginx
│   │   ├── handlers
│   │   │   └── main.yml
│   │   ├── tasks
│   │   │   └── main.yml
│   │   └── templates
│   │       └── default.tpl
│   ├── php5-cli
│   │   └── tasks
│   │       └── main.yml
│   ├── php5-fpm
│   │   ├── handlers
│   │   │   └── main.yml
│   │   └── tasks
│   │       └── main.yml
│   └── phpcommon
│       └── tasks
│           └── main.yml
├── vars
│   ├── apachephp.yml
│   ├── common.yml
│   ├── nginxphp.yml
│   └── ws_defaults.yml
└── windows.sh

@naxhh
Copy link
Contributor

naxhh commented Dec 1, 2014

Hmm, for me the problem is here:

==> default: /vagrant/ansible/files/authorized_keys
==> default: : No such file or directory
==> default: ERROR: the playbook: /vagrant/ansible/playbook.yml could not be found

So seems you don't have this folders/files?

I'll try to download that box and run a default playbook this week and report back.

@naxhh
Copy link
Contributor

naxhh commented Dec 1, 2014

Hi again.

I've downloaded that box and created a new playbook.

You can see log here: http://pastebin.com/xgSLExX3

As you can see in my case the provisioning is being executed.
So I'll guess is not a Phansible error?

If there is more info that you can provide it may help.

@harikt
Copy link
Author

harikt commented Dec 1, 2014

@naxhh I wonder whether it is specifically with ubuntu or *nix flavor for your is running on windows ?

@mikeSimonson
Copy link
Contributor

In what folder are you running the command vagrant up ?

@naxhh
Copy link
Contributor

naxhh commented Dec 1, 2014

@harikt I've tried in a win machine because is what I have at work :(

I'll try on a *nix at home.

@harikt
Copy link
Author

harikt commented Dec 1, 2014

@mikeSimonson where the Vagrantfile exists. So the root folder of the project.

@mikeSimonson
Copy link
Contributor

@harikt Do you have a vagrant folder anywhere ?

@harikt
Copy link
Author

harikt commented Dec 1, 2014

\w > \u@\h [php:5.5.9-system]\n$ ls -la     
total 20
drwxrwxr-x  4 hari hari 4096 Nov 27 06:46 .
drwxrwxr-x 10 hari hari 4096 Nov 27 06:44 ..
drwxrwxr-x  6 hari hari 4096 Nov 27 06:44 ansible
drwxrwxr-x  3 hari hari 4096 Nov 27 06:46 .vagrant
-rw-rw-r--  1 hari hari 1862 Nov 27 06:45 Vagrantfile

@mikeSimonson
Copy link
Contributor

@harikt Weird error, but it's hard to know what's going on from here.

@naxhh
Copy link
Contributor

naxhh commented Jan 3, 2015

Hi again @harikt.

Today I've had a bit more time to test this problem.

I tried with a *nix machine and works ok.

I guess that if this happen to you with puphpet is something in your setup.

Anyway, reading puphpet issue and this one. I don't get at all why you are downloading the box.
If you run vagrant up it will download the box just once, it will not download the image every time...

I'm closing this as I'm not able to reproduce this in any way...

@naxhh naxhh closed this as completed Jan 3, 2015
@naxhh naxhh added the invalid label Jan 3, 2015
@harikt
Copy link
Author

harikt commented Jan 4, 2015

Hi @naxhh ,

I don't get at all why you are downloading the box.
If you run vagrant up it will download the box just once, it will not download the image every time

I have a limited bandwidth , and the internet connection is slow. I don't wish to do a vagrant up and go for something else for hours.

I wanted to make use of the box which puphpet itself is downloading. So I just downloaded the box earlier and then the same box can be used on different projects.

Hope that make sense why I am keeping the box url.

Thank you for taking your time to look into the issue.

@naxhh
Copy link
Contributor

naxhh commented Jan 4, 2015

Ah ok, you want to share same box between two projects.
Anyway... I downloaded the box and Phansible setup provisions the box without problem :\

@harikt
Copy link
Author

harikt commented Jan 4, 2015

Ah ok, you want to share same box between two projects.

Yes, I want to share box with many projects.

I downloaded the box and Phansible setup provisions the box without problem :\

:-/ . Not sure then what the cause may be.

@naxhh
Copy link
Contributor

naxhh commented Jan 4, 2015

I'll guess you are using windows.sh...

If that is true, ansible is being executed inside the box...
If the box does not have the files means there is something wrong with your sharing set-up.

check your nfs configurations.

Apart of that I don't have any idea where the problem could be

@harikt
Copy link
Author

harikt commented Jan 5, 2015

I'll guess you are using windows.sh...

Nope. I am not. I am using ubuntu os and not windows just to make things clear.

@naxhh
Copy link
Contributor

naxhh commented Jan 5, 2015

Yes, name of the file is confusing.

We use windows.sh when Vagrantfile detects that you don't have ansible installed in your host machine.

The file installs ansible in the VM and provisions from there.
If your host machine does not have ansible you are using the windows.sh file.
Even in a *nix system.

@maur
Copy link

maur commented Jun 19, 2015

I'm using osx as a host. Downloaded generated zip, unpacked, typed "vagrant up" and ended up with the same error.

full log:

vagrant up
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/opt/vagrant/embedded/gems/gems/bundler-1.7.11/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: muz.local
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
==> default: Running provisioner: shell...
    default: Running: /var/folders/0q/56tpbpr54p38mvzl4j9t4wj00000gn/T/vagrant-shell20150619-14362-1q0beoj.sh
==> default: stdin: is not a tty
==> default: Ign http://security.ubuntu.com trusty-security InRelease
==> default: Ign http://archive.ubuntu.com trusty InRelease
==> default: Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
==> default: Ign http://archive.ubuntu.com trusty-updates InRelease
==> default: Hit http://archive.ubuntu.com trusty Release.gpg
==> default: Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
==> default: Get:3 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
==> default: Hit http://archive.ubuntu.com trusty Release
==> default: Get:4 http://archive.ubuntu.com trusty-updates Release [63.5 kB]
==> default: Get:5 http://security.ubuntu.com trusty-security/main Sources [85.8 kB]
==> default: Get:6 http://security.ubuntu.com trusty-security/universe Sources [26.2 kB]
==> default: Get:7 http://archive.ubuntu.com trusty/main Sources [1,064 kB]
==> default: Get:8 http://security.ubuntu.com trusty-security/main amd64 Packages [299 kB]
==> default: Get:9 http://security.ubuntu.com trusty-security/universe amd64 Packages [109 kB]
==> default: Hit http://security.ubuntu.com trusty-security/main Translation-en
==> default: Get:10 http://security.ubuntu.com trusty-security/universe Translation-en [61.4 kB]
==> default: Get:11 http://archive.ubuntu.com trusty/universe Sources [6,399 kB]
==> default: Hit http://archive.ubuntu.com trusty/main amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/universe amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/main Translation-en
==> default: Hit http://archive.ubuntu.com trusty/universe Translation-en
==> default: Get:12 http://archive.ubuntu.com trusty-updates/main Sources [210 kB]
==> default: Get:13 http://archive.ubuntu.com trusty-updates/universe Sources [121 kB]
==> default: Get:14 http://archive.ubuntu.com trusty-updates/main amd64 Packages [557 kB]
==> default: Get:15 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [290 kB]
==> default: Get:16 http://archive.ubuntu.com trusty-updates/main Translation-en [269 kB]
==> default: Get:17 http://archive.ubuntu.com trusty-updates/universe Translation-en [151 kB]
==> default: Ign http://archive.ubuntu.com trusty/main Translation-en_US
==> default: Ign http://archive.ubuntu.com trusty/universe Translation-en_US
==> default: Fetched 9,771 kB in 8s (1,182 kB/s)
==> default: Reading package lists...
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: software-properties-common is already the newest version.
==> default: 0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
==> default: gpg:
==> default: keyring `/tmp/tmpzlsa8n08/secring.gpg' created
==> default: gpg:
==> default: keyring `/tmp/tmpzlsa8n08/pubring.gpg' created
==> default: gpg:
==> default: requesting key 7BB9C367 from hkp server keyserver.ubuntu.com
==> default: gpg:
==> default: /tmp/tmpzlsa8n08/trustdb.gpg: trustdb created
==> default: gpg:
==> default: key 7BB9C367: public key "Launchpad PPA for Ansible, Inc." imported
==> default: gpg:
==> default: Total number processed: 1
==> default: gpg:
==> default:               imported: 1
==> default:   (RSA: 1)
==> default: OK
==> default: Ign http://ppa.launchpad.net trusty InRelease
==> default: Get:1 http://ppa.launchpad.net trusty Release.gpg [836 B]
==> default: Get:2 http://ppa.launchpad.net trusty Release [15.1 kB]
==> default: Get:3 http://ppa.launchpad.net trusty/main amd64 Packages [489 B]
==> default: Ign http://security.ubuntu.com trusty-security InRelease
==> default: Ign http://archive.ubuntu.com trusty InRelease
==> default: Get:4 http://ppa.launchpad.net trusty/main Translation-en [322 B]
==> default: Ign http://archive.ubuntu.com trusty-updates InRelease
==> default: Hit http://security.ubuntu.com trusty-security Release.gpg
==> default: Hit http://archive.ubuntu.com trusty Release.gpg
==> default: Hit http://security.ubuntu.com trusty-security Release
==> default: Hit http://archive.ubuntu.com trusty-updates Release.gpg
==> default: Hit http://security.ubuntu.com trusty-security/main Sources
==> default: Hit http://archive.ubuntu.com trusty Release
==> default: Hit http://security.ubuntu.com trusty-security/universe Sources
==> default: Hit http://archive.ubuntu.com trusty-updates Release
==> default: Hit http://security.ubuntu.com trusty-security/main amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/main Sources
==> default: Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/universe Sources
==> default: Hit http://security.ubuntu.com trusty-security/main Translation-en
==> default: Hit http://archive.ubuntu.com trusty/main amd64 Packages
==> default: Hit http://security.ubuntu.com trusty-security/universe Translation-en
==> default: Hit http://archive.ubuntu.com trusty/universe amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty/main Translation-en
==> default: Hit http://archive.ubuntu.com trusty/universe Translation-en
==> default: Hit http://archive.ubuntu.com trusty-updates/main Sources
==> default: Hit http://archive.ubuntu.com trusty-updates/universe Sources
==> default: Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages
==> default: Hit http://archive.ubuntu.com trusty-updates/main Translation-en
==> default: Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
==> default: Ign http://archive.ubuntu.com trusty/main Translation-en_US
==> default: Ign http://archive.ubuntu.com trusty/universe Translation-en_US
==> default: Fetched 16.7 kB in 4s (3,976 B/s)
==> default: Reading package lists...
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following extra packages will be installed:
==> default:   python-jinja2 python-markupsafe python-paramiko python-support sshpass
==> default: Suggested packages:
==> default:   python-jinja2-doc
==> default: The following NEW packages will be installed:
==> default:   ansible python-jinja2 python-markupsafe python-paramiko python-support
==> default:   sshpass
==> default: 0 upgraded, 6 newly installed, 0 to remove and 12 not upgraded.
==> default: Need to get 942 kB of archives.
==> default: After this operation, 6,148 kB of additional disk space will be used.
==> default: Get:1 http://ppa.launchpad.net/ansible/ansible/ubuntu/ trusty/main ansible all 1.9.1-1ppa~trusty [624 kB]
==> default: Get:2 http://archive.ubuntu.com/ubuntu/ trusty/universe python-support all 1.0.15 [26.7 kB]
==> default: Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main python-markupsafe amd64 0.18-1build2 [14.3 kB]
==> default: Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main python-jinja2 all 2.7.2-2 [161 kB]
==> default: Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main python-paramiko all 1.10.1-1git1build1 [106 kB]
==> default: Get:6 http://archive.ubuntu.com/ubuntu/ trusty/universe sshpass amd64 1.05-1 [10.5 kB]
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
==> default: Fetched 942 kB in 1s (717 kB/s)
==> default: Selecting previously unselected package python-support.
==> default: (Reading database ... 86712 files and directories currently installed.)
==> default: Preparing to unpack .../python-support_1.0.15_all.deb ...
==> default: Unpacking python-support (1.0.15) ...
==> default: Selecting previously unselected package python-markupsafe.
==> default: Preparing to unpack .../python-markupsafe_0.18-1build2_amd64.deb ...
==> default: Unpacking python-markupsafe (0.18-1build2) ...
==> default: Selecting previously unselected package python-jinja2.
==> default: Preparing to unpack .../python-jinja2_2.7.2-2_all.deb ...
==> default: Unpacking python-jinja2 (2.7.2-2) ...
==> default: Selecting previously unselected package python-paramiko.
==> default: Preparing to unpack .../python-paramiko_1.10.1-1git1build1_all.deb ...
==> default: Unpacking python-paramiko (1.10.1-1git1build1) ...
==> default: Selecting previously unselected package sshpass.
==> default: Preparing to unpack .../sshpass_1.05-1_amd64.deb ...
==> default: Unpacking sshpass (1.05-1) ...
==> default: Selecting previously unselected package ansible.
==> default: Preparing to unpack .../ansible_1.9.1-1ppa~trusty_all.deb ...
==> default: Unpacking ansible (1.9.1-1ppa~trusty) ...
==> default: Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
==> default: Setting up python-support (1.0.15) ...
==> default: Setting up python-markupsafe (0.18-1build2) ...
==> default: Setting up python-jinja2 (2.7.2-2) ...
==> default: Setting up python-paramiko (1.10.1-1git1build1) ...
==> default: Setting up sshpass (1.05-1) ...
==> default: Setting up ansible (1.9.1-1ppa~trusty) ...
==> default: Processing triggers for python-support (1.0.15) ...
==> default: cp:
==> default: cannot stat ‘/vagrant/ansible/inventories/dev’
==> default: : No such file or directory
==> default: cat:
==> default: /vagrant/ansible/files/authorized_keys
==> default: : No such file or directory
==> default: ERROR: the playbook: /vagrant/ansible/playbook.yml could not be found
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.

@maur
Copy link

maur commented Jun 19, 2015

Which may be important - I'm trying to install configuration with php 5.4

@naxhh
Copy link
Contributor

naxhh commented Jun 19, 2015

If I should guess I'll say it has something to do with #71
Review that and try it. If not please open a new issue about the error :)

Thanks!

@phansible phansible locked and limited conversation to collaborators Jun 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants