Running anaconda on Vagrant environment

Hi,

I am running Anaconda3 on Vagrant environment because I am somewhat reluctant to install anaconda in my pc. I am not able to get the validation code for Ticket: Connection. It would be great if anyone could give me any suggestion. This seems Vagrant issue, not Mongodb, though.

Thank you!
Hide Senta

I have set up port forwarding as follows:

==> 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: 5000 (guest) => 5001 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> 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!

After successfully running pytest for connection and run.py, I tried to connect to 127.0.0.1:5001/status from the host, but got the following error from Firefox:

The connection was reset

The connection to the server was reset while the page was loading.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Following is the log from executing pytest and run.py which seems fine.


(mflix) vagrant@vagrant-ubuntu-trusty-64:/vagrant$ pytest -m connection
=========================== test session starts ===========================
platform linux – Python 3.7.3, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: /vagrant, inifile:
plugins: remotedata-0.3.1, openfiles-0.3.2, flask-0.10.0, doctestplus-0.3.0, arraydiff-0.3
collected 43 items

tests/test_db_connection.py … [100%]

=========================== 39 tests deselected ===========================
================ 4 passed, 39 deselected in 13.90 seconds =================
(mflix) vagrant@vagrant-ubuntu-trusty-64:/vagrant$ python run.py

  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 179-142-994

I am using Ubuntu/trusty64 box for Vagrant.

Hide

Open this url from browser and then click on STATUS tab.

Please share the screenshot.

Kanika

Thank you,

Here is what I get:


Unable to connect

Firefox can’t establish a connection to the server at 127.0.0.1:5000.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

This is different from the error I get when I connect to port 5001:


The connection was reset
The connection to the server was reset while the page was loading.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Ubuntu firewall is inactive on Vagrant environment.

Thanks,
Hide

Hi @Hide_11916,

For this change to work you need to port forwarding configured to the same ports.
Our implementation of mflix-python is sticking to port 5000 so you will have to map port forwarding from localhost:5000 -> virtualmachine:5000:

This is needed because the react front-end, that runs on your browser, is reaching http://localhost:5000/api … for backend api requests.

Mapping localhost:5001 -> virtualmachine:5000 won’t work in this case.

We will be making a code change so we can allow this in the future by just changing the configuration.

N.

1 Like

Hi Noberto,

Thank you for getting back.
I have changed the port forwarding to guest 5000 -> host 5000, but got the same error when I tried to connect to http://127.0.0.1:5000.

Thank you,
Hide