переадресация портов в vagrant (bento / ubuntu-16.04) и localhost тоже не открывается - PullRequest
0 голосов
/ 13 октября 2019

Я пытаюсь сделать веб-сервер на python, используя базу данных с vagrant (bento / ubuntu-16.04).

vagrant работает со всеми переадресациями портов. затем после выполнения `` python webserver.py```, но localhost не открывается.

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-16.04' version '2.3.5' is up to date...
==> 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: 8000 (guest) => 8000 (host) (adapter 1)
   default: 8080 (guest) => 8080 (host) (adapter 1)
   default: 5000 (guest) => 5000 (host) (adapter 1)
   default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
   default: SSH address: 127.0.0.1:2222

затем после $ python webserver.py показывает "веб-сервер, работающий на порте 8080"

, но localhostне открывается. И показывая это

Safari cant open the page "localhost:8080/hello" because the server unexpected dropped the connection.

...