Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant up fails with stdin, start, ssh, stderr & stdout errors

I cannot for the life of me...after reinstalling all things VVV/VBox(4.3.10) & running vagrant up --provision figure out why this beauty(VVV) wont run. I'm unable to access any of the wordpress sites such as http://local.wordpress.dev/.

Specs: Windows 8.1 Cygwin

Final lines after running the cmd -> vagrant up --provision

==> default: http://gruntjs.com/getting-started
==> default: Downloading phpMyAdmin 4.1.14...
==> default: Restart Nginx...
==> default:  * Restarting nginx nginx
==> default:    ...done.
==> default: Cleaning the virtual machine's /etc/hosts file...
==> default: Adding domains to the virtual machine's /etc/hosts file...
==> default:  * Added vvv.dev from /srv/www/vvv-hosts
==> default:  * Added local.wordpress.dev from /srv/www/vvv-hosts
==> default:  * Added local.wordpress-trunk.dev from /srv/www/vvv-hosts
==> default:  * Added src.wordpress-develop.dev from /srv/www/vvv-hosts
==> default:  * Added build.wordpress-develop.dev from /srv/www/vvv-hosts
==> default: -----------------------------
==> default: Provisioning complete in 1636 seconds
==> default: External network connection established, packages up to date.
==> default: For further setup instructions, visit http://vvv.dev
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: start: Job is already running: mysql
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell

Stdout from the command:



Stderr from the command:

stdin: is not a tty
start: Job is already running: mysql

Where am I going wrong?

like image 915
djfrsn Avatar asked Jun 26 '14 02:06

djfrsn


2 Answers

Add the following line in your Vagrantfile

config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"

This starts bash as a non-login shell, but also tells it to source /etc/profile, which I hypothesised to be the only reason to use a login shell by default. Works for me with the stock precise64 Vagrant box.

like image 112
Bernard Banta Avatar answered Sep 23 '22 08:09

Bernard Banta


Not anything you are doing. Apparently this is a known issue.

I fixed it by running vagrant ssh

and then

sudo service mysql restart || true

You can find a record of the issue here

like image 2
robskidmore Avatar answered Sep 20 '22 08:09

robskidmore