Lecture: Hostname and cluster configuration, script aborted

I’m struggling with handsout m312/nodes-vagrant-env.zip. When I run vagrant up with provision and hostnames_and_cluster_config.sh it is aborted with the following error message.
m1: + wget -q -O mongodb-linux-x86_64-enterprise-ubuntu1404-3.4.2.tgz ‘https://downloads.mongodb.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-3.4.2.tgz?jmp=university
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.
I think it tries to download the mongodb-linux-x86_64-enterprise-ubuntu1404-3.4.2.tgz because the size of the file is 0 byte. I don’t have any firewall rules that doesn’t allow to download.
I already tried to run manually the config script but it didn’t work.
I’m stucked to go ahead because of that. Any suggestion will be appreciated. Thanks.

Have you installed vbguest plugin?
File cannot be zero bytes
Are you able to download it manually(not thru install script)
Could be network issue
Did you try from another location

Where I have to install the vbguest plugin and where I can find it.
Yes, I downloaded manually and I ran the installation of MongoDb successfully but it wasn’t enough to properly configure the three server to get the replica set working.
No, I don’t think could be any network because everything else is working fine.
No I didn’t try from another location because I don’t know that, if you can suggest other location I’ll appreciate.

I was referring to this step
vagrant plugin install vagrant-vbguest

Connect your laptop/PC from another place or use different internet connection like mobile hotspot and see if it works.Are you connected to VPN or other antivirus softwares which may block downloads
Please check our forum threads for other fixes
Sometimes version related issues also cause problems

I tried with another internet connection from my mobile but again it didn’t work.
I ran three time because for every VM the script stopped with the following error messages:

*m1: ERROR: Command "/usr/bin/python3 /usr/local/lib/python3.4/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpk4x5wqnt" failed with error code 1 in /tmp/pip-install-ifjeia7c/psutil*
  • m1: WARNING: You are using pip version 19.1.1, however version 22.1.2 is available.*
  • m1: You should consider upgrading via the ‘pip install --upgrade pip’ command.*
    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.

----------------------------------------

m2: ERROR: Command “/usr/bin/python3 /usr/local/lib/python3.4/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpmcd8zd4g” failed with error code 1 in /tmp/pip-install-l9y3uttq/psutil

  • m2: WARNING: You are using pip version 19.1.1, however version 22.1.2 is available.*
  • m2: You should consider upgrading via the ‘pip install --upgrade pip’ command.*
    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.

----------------------------------------

m3: + wget -q -O mongodb-linux-x86_64-enterprise-ubuntu1404-3.4.2.tgz ‘https://downloads.mongodb.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-3.4.2.tgz?jmp=university
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.

I tried with my home internet connection with same errors.

I think you have to upgrade your python or fake the installer
Check this link.Some fixes given in it
Course M312: Unable to complete vagrant installation

I checked the link you suggested but I get another error that stopped to complete the script for the first VM (m1):

m1: ?: keyserver.ubuntu.com: Host not found

  • m1: gpgkeys: HTTP fetch error 7: couldn’t connect: Connection timed out*
  • m1: gpg: no valid OpenPGP data found.*
  • m1: gpg: Total number processed: 0*
    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.

I modified the following in the provision file following the post of the link you mentioned.

curl -o get-pip.py  https://bootstrap.pypa.io/pip/2.7/get-pip.py
#https://bootstrap.pypa.io/pip/2.6/get-pip.py

I tried to re-run but unsuccessfully, same error.

Have you checked other threads with this error?
Some fixes are given like changing/replacing the key being used or replacing hostname of keyserver with public IP
Show the portion of log where it is trying to access keyserver
Is it using hkp://keyserver?
Something like antivirus,firewall,vpn is blocking your download(fetch error)

I used the internet connection with my mobile, I get another error as the following. I copied the section of the provision file where there is the python installation. Because the script stopped asking for 3.5 release of pything I changed with 3.5.10 release but it didn’t work.

m1: + sudo python3 get-pip.py
m1: File “get-pip.py”, line 1
m1:
m1: ^
m1: SyntaxError: invalid syntax
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.

function install_python3(){
sudo apt-get install -y build-essential checkinstall
sudo apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libffi-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y
sudo apt-get install -y wget
sudo apt-get install -y python3
sudo apt-get build-dep python3 -y
curl -o get-pip.py https://bootstrap.pypa.io/pip/3.5.10/get-pip.py
#https://bootstrap.pypa.io/pip/2.6/get-pip.py
sudo python3 get-pip.py
sudo pip3 install --upgrade pip
}

Have you tried the fix given by Eoin_Brazil ?
Replacing entire vagrant-env file with new one given in the link and reprovision vagrant