M310 - ldap installation errors

vagrant up ldap

Note: After the above command, I get the below error. Please help me.

ldap: libcurl.x86_64 0:7.19.7-53.el6_9
ldap: openssl.x86_64 0:1.0.1e-58.el6_10
ldap: openssl-devel.x86_64 0:1.0.1e-58.el6_10
ldap: python.x86_64 0:2.6.6-68.el6_10
ldap: python-libs.x86_64 0:2.6.6-68.el6_10
ldap: Complete!
ldap: + pip install python-ldap
ldap: /usr/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
ldap: InsecurePlatformWarning
ldap: /usr/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
ldap: InsecurePlatformWarning
ldap: You are using pip version 7.1.0, however version 19.3 is available.
ldap: You should consider upgrading via the ‘pip install --upgrade pip’ command.
ldap: Collecting python-ldap
ldap: /usr/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
ldap: InsecurePlatformWarning
ldap: /usr/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
ldap: InsecurePlatformWarning
ldap: /usr/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
ldap: InsecurePlatformWarning
ldap: Downloading https://files.pythonhosted.org/packages/ea/93/596f875e003c770447f4b99267820a0c769dd2dc3ae3ed19afe460fcbad0/python-ldap-3.2.0.tar.gz (367kB)
ldap: Complete output from command python setup.py egg_info:
ldap: Traceback (most recent call last):
ldap: File “”, line 20, in
ldap: File “/tmp/pip-build-uJhZSF/python-ldap/setup.py”, line 11, in
ldap: raise RuntimeError(‘This software requires Python 2.7 or 3.x.’)
ldap: RuntimeError: This software requires Python 2.7 or 3.x.
ldap:
ldap: ----------------------------------------
ldap: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-uJhZSF/python-ldap
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.

@Rajesh_Chinni_09970 I’m curious to know which course is M034?

Could this be the problem?

Security -> chapter 1 (Authentication) --> MongoLDAP.
It was handout in that topic

Alright, I see now! If you link your post to the M310 Security course, you’ll get better responses.

And there’s a possible that you’re using an older version of python which is causing it to fail.

Let me know if the issue is still not resolved. :slight_smile:

Kanika

@kanikasingla the error still seems to occur.

Why is CentOS 6.4 used for the base box? That uses Python 2.6 and you would need to jump through some hoops to get Python 2.7 active. This doesn’t seem to be a new error in terms of posts as I found some others, so why hasn’t someone fixed the handout?

Hi @Ceri_18853,

Thanks for sharing this information.

We are already getting this course updated and that is why we are not making any changes in the current version.

If you are getting any error specifically, please share the screenshot of the same.

Please let me know, if you have any questions.

Thanks,
Sonali

Hi @Sonali_Mamgain.

I had the same error as the OP. The module uses video showing the m034 virtual instance in use (e.g. Chapter 1: Authentication - LDAP Authorization Setup) and has the handout containing the Vagrantfile, etc.

If you use the m310 handout then you can indeed create a working LDAP instance, although there is no population of it (unlike m034). However, the MongoDB instance is configured to be 3.2, which does not provide mongoldap and that is used in the lecture, plus you have to hack the provisioner to work past the apt issues. After it is up you can then upgrade to 3.4 to get mongoldap by updating the APT source entry and performing:

curl https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -

Hi @Ceri_18853,

Thanks for sharing this information!!!
It will be useful for other users if they face similar issues. I have updated the concerned teams regarding this feedback and we will soon resolve this.

Regards,
Sonali