1
resposta

erro ao subir com comando vagrant up

root@BIO-02059:/home/torbite/Documents/1110-aula-inicial# vagrant plugin install vagrant-disksize
Installing the 'vagrant-disksize' plugin. This can take a few minutes...
Fetching: vagrant-disksize-0.1.3.gem (100%)
Installed the plugin 'vagrant-disksize (0.1.3)'!
root@BIO-02059:/home/torbite/Documents/1110-aula-inicial# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/bionic64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/bionic64'
    default: URL: https://vagrantcloud.com/ubuntu/bionic64
==> default: Adding box 'ubuntu/bionic64' (v20200107.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20200107.0.0/providers/virtualbox.box
    default: Download redirected to host: cloud-images.ubuntu.com
==> default: Successfully added box 'ubuntu/bionic64' (v20200107.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20200107.0.0' is up to date...
==> default: Setting the name of the VM: 1110-aula-inicial_default_1578692026220_59407
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 80 is already in use
on the host machine.

To fix this, modify your current project's Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

  config.vm.network :forwarded_port, guest: 80, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding. You could
try 'vagrant reload' (equivalent of running a halt followed by an up)
so vagrant can attempt to auto-correct this upon booting. Be warned
that any unsaved work might be lost.
1 resposta

Olá Melissa, tudo bem? Peço desculpas pela demora em ti responder! Bem o erro indica que a porta 80 do host, no caso da sua máquina física já está sendo utilizada por alguma aplicação que está sendo executada no mesmo instante que você tentou executar o comando vagrant up. Verifica qual o servidor que pode utilizar essa mesma porta, pode ser um servidor web, algo do tipo. Para verificar a aplicação está utilizando a porta 80, você pode executar o comando:

sudo netstat -tlpn | grep 80

Caso precise utilizar no windows você pode utilizar esse outro comando:

netstat –ano | findstr 0.0:80

Espero ter ajudado!