WHile doing Vagrant up. i am getting the SSH new zero exit status

39 views
Skip to first unread message

Ravjot Singh

unread,
Dec 24, 2019, 3:13:49 AM12/24/19
to Vagrant
Please help on this.. When i run Vagrant up, i get the below error.
Attaching the full logs as under :
I did a vagrant reload to halt and start again and as it asked me to provision, so i ran the command vagrant provision. 

Any idea guys am i doing it correct???


C:\BlockChain\devbox>vagrant reload

==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'ubuntu/xenial64' version '20191211.0.0' is up to date...
==> 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: Forwarding ports...
    default: 8080 (guest) => 8080 (host) (adapter 1)
    default: 4000 (guest) => 4000 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (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: Machine booted and ready!
[default] GuestAdditions 6.0.14 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => C:/BlockChain/devbox
    default: /home/vagrant/bootstrap => C:/BlockChain/devbox/bootstrap
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

C:\BlockChain\devbox>vagrant provision
==> default: Running provisioner: shell...
    default: Running: inline script
    default: /tmp/vagrant-shell: /home/vagrant/bootstrap/install.sh: /bin/bash^M: bad interpreter: No such file or directory
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.

Alvaro Miranda Aguilera

unread,
Dec 24, 2019, 4:40:48 AM12/24/19
to vagra...@googlegroups.com
hello

this error

^M: bad interpreter:

is cause when you edit files on windows and then run in linux, end of line is different between the OS

you will have to remove the end of line that are causing this, you can try using a tool called dos2unix

alvaro.



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/392f8fe4-2db6-45dc-af44-af73a8d89cab%40googlegroups.com.


--
Alvaro

Ravjot Singh

unread,
Dec 24, 2019, 4:48:21 AM12/24/19
to Vagrant
I am not aware what are you saying.? dos2unix needs to be installed on windows right and which file to compare with this tool? and will this help?

To unsubscribe from this group and stop receiving emails from it, send an email to vagra...@googlegroups.com.


--
Alvaro

Alvaro Miranda Aguilera

unread,
Dec 24, 2019, 4:57:10 AM12/24/19
to vagra...@googlegroups.com
Hello

You can learn more here:



basically there are characters in the script you are trying to run, that in the VM are causing issues

bootstrap/install.sh


alvaro


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/3e689c88-c42e-4aa5-af44-b4b39d40b4da%40googlegroups.com.


--
Alvaro

Ravjot Singh

unread,
Dec 24, 2019, 5:12:36 AM12/24/19
to Vagrant
Yeah. i want to compare the bootstrap/install.sh and other files as well under bootstrap.
but this command ie dos2unix  needs to used on windows right. and for that i need to install this also. how to do that in windows. i checked online and it shows only for Liinux

Alvaro Miranda Aguilera

unread,
Dec 24, 2019, 8:48:19 AM12/24/19
to vagra...@googlegroups.com
can be used on linux

if you dont have dos2unix available you could try some different way, some editors allow save on linux compatible format

try notepad++ 

good luck


alvaro

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/463f3bac-2b2b-4aea-b408-22ab7a2a91fb%40googlegroups.com.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages