Vagrant up --provision failed with error

I am running vagrant up --provision command but it failed with below errors.

mongod-m103: Downloading/unpacking pymongo
mongod-m103: Cleaning up…
mongod-m103: Exception:
mongod-m103: Traceback (most recent call last):
mongod-m103: File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 562, in urlopen
mongod-m103: body=body, headers=headers)
mongod-m103: File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 387, in _make_request
mongod-m103: conn.request(method, url, **httplib_request_kw)
mongod-m103: File “/usr/lib/python3.4/http/client.py”, line 1125, in request
mongod-m103: self._send_request(method, url, body, headers)
mongod-m103: File “/usr/lib/python3.4/http/client.py”, line 1163, in _send_request
mongod-m103: self.endheaders(body)
mongod-m103: File “/usr/lib/python3.4/http/client.py”, line 1121, in endheaders
mongod-m103: self._send_output(message_body)
mongod-m103: File “/usr/lib/python3.4/http/client.py”, line 951, in _send_output
mongod-m103: self.send(msg)
mongod-m103: File “/usr/lib/python3.4/http/client.py”, line 886, in send
mongod-m103: self.connect()
mongod-m103: File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 138, in connect
mongod-m103: ssl_version=resolved_ssl_version)
mongod-m103: File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/util.py”, line 619, in ssl_wrap_socket
mongod-m103: return context.wrap_socket(sock, server_hostname=server_hostname)
mongod-m103: File “/usr/lib/python3.4/ssl.py”, line 365, in wrap_socket
mongod-m103: _context=self)
mongod-m103: File “/usr/lib/python3.4/ssl.py”, line 601, in init
mongod-m103: self.do_handshake()
mongod-m103: File “/usr/lib/python3.4/ssl.py”, line 828, in do_handshake
mongod-m103: self._sslobj.do_handshake()
mongod-m103: ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
mongod-m103:
mongod-m103: During handling of the above exception, another exception occurred:
mongod-m103:
mongod-m103: Traceback (most recent call last):
mongod-m103: File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/adapters.py”, line 330, in send
mongod-m103: timeout=timeout
mongod-m103: File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 595, in urlopen
mongod-m103: raise SSLError(e)
mongod-m103: urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
mongod-m103:
mongod-m103: During handling of the above exception, another exception occurred:
mongod-m103:
mongod-m103: Traceback (most recent call last):
mongod-m103: File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 122, in main
mongod-m103: status = self.run(options, args)
mongod-m103: File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 278, in run
mongod-m103: requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
mongod-m103: File “/usr/lib/python3/dist-packages/pip/req.py”, line 1198, in prepare_files
mongod-m103: do_download,
mongod-m103: File “/usr/lib/python3/dist-packages/pip/req.py”, line 1376, in unpack_url
mongod-m103: self.session,
mongod-m103: File “/usr/lib/python3/dist-packages/pip/download.py”, line 546, in unpack_http_url
mongod-m103: resp = session.get(target_url, stream=True)
mongod-m103: File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py”, line 479, in get
mongod-m103: return self.request(‘GET’, url, **kwargs)
mongod-m103: File “/usr/lib/python3/dist-packages/pip/download.py”, line 237, in request
mongod-m103: return super(PipSession, self).request(method, url, *args, **kwargs)
mongod-m103: File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py”, line 467, in request
mongod-m103: resp = self.send(prep, **send_kwargs)
mongod-m103: File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py”, line 570, in send
mongod-m103: r = adapter.send(request, **kwargs)
mongod-m103: File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/adapters.py”, line 385, in send
mongod-m103: raise SSLError(e)
mongod-m103: requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
mongod-m103: Storing debug log for failure in /root/.pip/pip.log
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.

Welcome! @Pradeep_36690

Did you try searching the forum for solutions to similar problems?
Have you gone through the troubleshooting guides on this forum?

Hi @007_jb,
Yes, I believed I searched for possible issues reported but did not match neither the error nor the solution.

Troubleshooting steps mentioned does not match with the one that I am having issues.

Regards,
Pradeep

I’m guessing you’ve gone through the troubleshooting steps also mentioned in the Chapter 1?

What OS and version are you using?

Thats correctly understood!

Host machine is windows 10. Version is 1809. Image is attached for more detail
window_version

There was another guy who add issues provisioning a vagrant machine using Win 10 Enterprise, but the error was different. And my thoughts were restrictions set by their Sys Admins.

Try and see if you can vagrant ssh into the box.

Yes, I saw that error which was reported by another person but since its not relevant to me, I started new thread. vagrant ssh works as expected.

This is my output of vagrant ssh just in case:

vagrant ssh
Welcome to Ubuntu 14.04.6 LTS (GNU/Linux 3.13.0-170-generic x86_64)

System information as of Thu Oct 31 18:43:00 UTC 2019

System load: 0.0 Processes: 83
Usage of /: 3.6% of 39.34GB Users logged in: 0
Memory usage: 6% IP address for eth0: 10.0.2.15
Swap usage: 0% IP address for eth1: 192.168.103.100

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

0 updates can be installed immediately.
0 of these updates are security updates.

New release ‘16.04.6 LTS’ available.
Run ‘do-release-upgrade’ to upgrade to it.

Welcome to Ubuntu 14.04.6 LTS (GNU/Linux 3.13.0-170-generic x86_64)

System information as of Thu Oct 31 18:43:00 UTC 2019

System load: 0.0 Processes: 83
Usage of /: 3.6% of 39.34GB Users logged in: 0
Memory usage: 6% IP address for eth0: 10.0.2.15
Swap usage: 0% IP address for eth1: 192.168.103.100

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

0 updates can be installed immediately.
0 of these updates are security updates.

New release ‘16.04.6 LTS’ available.
Run ‘do-release-upgrade’ to upgrade to it.

vagrant@m103:~$

I was just having small talk @Pradeep_36690 :wink:

There appears to be a pymongo install error which is the 7th step in the provisioning process, and it’s also missed a few steps further down.

Within your VM, check the log (below) and also let’s the output of the following commands:

sudo cat /root/.pip/pip.log
python --version
openssl version
mongo --version
mongod --version

1 Like

Interesting thing is I can use the mongoshell and mongod which seems it is installed there and can connect to the database, just that I could not use some scripts specially the validate*.

"Output of the each commands are listed below"
vagrant@m103:/tmp$ python --version
Python 2.7.6

vagrant@m103:/tmp$ openssl version
OpenSSL 1.0.1f 6 Jan 2014
vagrant@m103:/tmp$
vagrant@m103:/tmp$ mongo --version
MongoDB shell version v3.6.14
git version: cbef87692475857c7ee6e764c8f5104b39c342a1
OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
allocator: tcmalloc
modules: enterprise
build environment:
distmod: ubuntu1404
distarch: x86_64
target_arch: x86_64
vagrant@m103:/tmp$ mongod --version
db version v3.6.14
git version: cbef87692475857c7ee6e764c8f5104b39c342a1
OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
allocator: tcmalloc
modules: enterprise
build environment:
distmod: ubuntu1404
distarch: x86_64
target_arch: x86_64
vagrant@m103:/tmp$

"pip log is"

Log lines are larger than allowable limit to paste here. I dont see attachment option either. Is there a way to upload log file? There are 2455 lines of log that was not allowed to paste within the post.

Yes, installation of MongoDB is one of the first steps in the provisioning process so things like mongo and mongod will work. pymongo on the other hand is a Python library for MongoDB. Plus there are a other steps that haven’t run which are crucial for this course.

Only the Curriculum Engineers would know but in the meantime you can upload it online somewhere and share the link.
Can you see anything in the log that catches your eye?

Hi @Pradeep_36690,

This error is probably due to security realted mechanisms setup on your server. Please check if you have all firewall/anti-virus disabled.

Can you please share what is the exact error you are facing while running validation scripts?

If the error is as following : validate_box: command not found, run below command from your vagrant box like:

vagrant@m103:~$ download_validators

It will download the required validation scripts. If by any bad luck, that too doesn’t work, re-provision vagrant.

Also, please keep in mind that the validation scripts need to be run from outside the mongo shell but in the vagrant box, it won’t work from your local machine.

To upload the log file, you may save the contents of the file in a .txt file on your system and upload it using the button (highlighted) as shown in the screenshot below:

12%20PM

Let me know if this helps!

Thanks,
Muskan
Curriculum Support Engineer

Thank you for the answer.

I see two items to mention:

  1. The beginning of download started with
Downloading/unpacking pymongo Getting page https://pypi.python.org/simple/pymongo/ URLs to search for versions for pymongo: * https://pypi.python.org/simple/pymongo/ Analyzing links from page https://pypi.org/simple/pymongo/
  1. And the the end of log file with errors. Between these two items there are messages with
    “Skipping link https://files.XXXXXXXXXXXXXXXXXXXXXXXXXX
    and
    “Found link https://files.XXXXXXXXXXXXXXXXXXX

Last piece of error was related to certificate verification which you already have noticed.

Using version 3.9.0 (newest of versions: 3.9.0, 3.8.0, 3.7.2, 3.7.1, 3.7.0, 3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.0, 3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2, 3.1.1, 3.1, 3.0.3, 3.0.2, 3.0.1, 3.0, 2.9.5, 2.9.4, 2.9.3, 2.9.2, 2.9.1, 2.9, 2.8.1, 2.8, 2.7.2, 2.7.1, 2.7, 2.6.3, 2.6.2, 2.6.1, 2.6, 2.5.2, 2.5.1, 2.5, 2.4.2, 2.4.1, 2.4, 2.3, 2.2.1, 2.2, 2.1.1, 2.1, 2.0.1, 2.0, 1.11, 1.10.1, 1.10, 1.9, 1.8.1, 1.8, 1.7, 1.6, 1.5.2, 1.5.1, 1.5, 1.4, 1.3, 1.2.1, 1.2, 1.1.2, 1.1.1, 1.1, 1.0, 0.16, 0.15.2, 0.15.1, 0.15, 0.14.2, 0.14.1, 0.14, 0.13, 0.12, 0.11.3, 0.11.2, 0.11.1, 0.11, 0.10.3, 0.10.2, 0.10.1, 0.10, 0.9.7, 0.9.6, 0.9.5, 0.9.4, 0.9.3, 0.9.2, 0.9.1, 0.9, 0.8.1, 0.8, 0.7.2, 0.7.1, 0.7, 0.6)
Cleaning up…
Removing temporary dir /tmp/pip_build_root…
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1198, in prepare_files
do_download,
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1376, in unpack_url
self.session,
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 546, in unpack_http_url
resp = session.get(target_url, stream=True)
File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py”, line 479, in get
return self.request(‘GET’, url, **kwargs)
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py”, line 467, in request
resp = self.send(prep, **send_kwargs)
File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/sessions.py”, line 570, in send
r = adapter.send(request, **kwargs)
File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/adapters.py”, line 385, in send
raise SSLError(e)
SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

To upload the log file, you may save the contents of the file in a .txt file on your system and upload it using the button (highlighted) as shown in the screenshot below:

“Interesting is I dont see the upload button as you can see above. This is how it looks my view”

Output of validate_box says command not found

vagrant@m103:/tmp$ validate_box
validate_box: command not found
vagrant@m103:/tmp$

I did a bit of digging and I believe that there’s some TLS/SSL incompatibility with some of the dependent libraries that setup.py uses. Trying to replicate on my end.

And that button is reserved for the MongdoDB gods like @Muskan_47318 :wink:

1 Like

Forgot to say, still need to see the full log file. So upload it to a reputable file sharing site and send me the download URL.

And what’s the outcome of @Muskan_47318’s other suggestions? I.e. disabling firewall and antivirus etc?

I have uploaded the log here. Can you pls try downloading?

If any application is blocked by firewall, I should get notification but did not receive such notification.

Yes I was able to download the file.

“Should” but not always.
So, I tried blocking outgoing connections on my firewall and I didn’t get the same failure message as you. It failed way before trying to install pymongo.

1 Like

Sorry, I forgot to tell you that the installation was failed way before and I changed the line# 57 in “provision-mongod” and rerun the command ‘vagrant up --provision’ then then I got the SSL error

"sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6"

The way I see it, you’re under strict corporate firewall rules and group policy, and unless you have the right permissions on your machine, you won’t be able to do much in the way of progressing with this course.

Suggest using a personal machine or getting your Sys Admins to lax the rules on your machine… very much doubt that.

OK, Thank you for the update and support. Let me see if I can make progress with other computer out of the domain.