Ch3 Lab error while running setup script

Hello TA,

Getting below error while running setup… script as part of ch3 lab.

==========================================
vagrant@m312:/shared$ ./set_up_building_index_in_foreground.sh
mongod: no process found
rm: cannot remove ‘/home/vagrant/data’: No such file or directory
Traceback (most recent call last):
File “/usr/local/bin/mlaunch”, line 9, in
load_entry_point(‘mtools==1.6.1’, ‘console_scripts’, ‘mlaunch’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2363, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2088, in load
entry = import(self.module_name, globals(),globals(), [‘name’])
File “/usr/local/lib/python2.7/dist-packages/mtools/mlaunch/mlaunch.py”, line 1541
result.append(f’"{arg}"’)
^
SyntaxError: invalid syntax
MongoDB shell version v3.4.2
connecting to: mongodb://127.0.0.1:30000/
2020-02-09T00:14:16.254+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:30000, in(checking socket for error after poll), reason: Connection refused
2020-02-09T00:14:16.255+0000 E QUERY [thread1] Error: couldn’t connect to server 127.0.0.1:30000, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
2020-02-09T00:14:39.282+0000 […] m312.employees 0B/395MB (0.0%)
2020-02-09T00:14:39.788+0000 […] m312.employees 0B/395MB (0.0%)
2020-02-09T00:14:39.789+0000 Failed: error connecting to db server: no reachable servers
2020-02-09T00:14:39.789+0000 imported 0 documents
vagrant@m312:/shared$

Thanks in advance,

Samir

seems like the python version required is >= 3.5 while it came installed with Python 2.7.6

Will try to check if there is any way to upgrade 2.7.6 to 3.5

tried upgrading but again i get the same issue. python --version gives back 2.7.6 and python3 --version gives back 3.4.3

tried issueing command ‘mloginfo --help | less’ and it errored with following

raceback (most recent call last):
File “/usr/local/bin/mloginfo”, line 9, in
load_entry_point(‘mtools==1.6.1’, ‘console_scripts’, ‘mloginfo’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2363, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2088, in load
entry = import(self.module_name, globals(),globals(), [‘name’])
File “/usr/local/lib/python2.7/dist-packages/mtools/mloginfo/mloginfo.py”, line 75
timezone = f"UTC {tzdt.strftime(’%z’)}"
^
SyntaxError: invalid syntax

At this point i do not know what i am supposed to do in order to complete lab in ch3.

Would appreciate feedback.

Samir

Below solution from @007_jb worked for me.

  1. Open the provision file and add these version numbers:

  1. Re-provision the machine:
    vagrant provision

Thanks 007_jb for your help even in your absence :slight_smile:

Samir

1 Like

:cowboy_hat_face: :+1: