Stuck on Vagrant up

Hi!
When I run vagrant up command it gets stuck on SSH auth method: private key

After a few minutes, i get this:
image

But when the command is running the vm seems it’s booting properly, at least thats what I get if i run Vagrant status
image

Therefore i execute vagrant ssh but it’s not working (the connection is closed)

I tried increasing the timeout, still not working

Once you have booted the Vagrant VM, try running:

netstat -an

If everything went well, this will show a “LISTEN” process on port 2222. This should be the port forward to the VM’s SSH daemon. If there isn’t, Vagrant failed to bring up the VM properly. Try:

vagrant halt
vagrant up

What kind of hardware are you running on? We’ve seen that many parts of M103 start acting unpredictably if your CPU or RAM are a bit underpowered.

1 Like

Might be, the computer has 4GB ram and Intel Core i3 2.4 GHz. If i run the vm from Virtual Box it is supposed to open (at least) a terminal or something?

I ran netstat after running the vm and apparently the ports are listening, if I shut it down and execute the command once again the ports are not listed
.
When I run vagrant halt it shutdown the vm (as it must) but also get this message:

mongod-m103: Attempting graceful shutdown of VM…
mongod-m103: Guest communication could not be established! This is usually because
mongod-m103: SSH is not running, the authentication information was changed,
mongod-m103: or some other networking issue. Vagrant will force halt, if
mongod-m103: capable.
mongod-m103: Forcing shutdown of VM…

Also, i ran the command vagrant ssh-config this is what i get:
image

1 Like

If you open the VirtualBox GUI, select the VM from the list and start it up, then yes, you should see a new window with the Linux boot process. In the end you should get a login prompt for the console.

Hmmm. Unless no. No. I believe it’s running in “headless” mode. So no, it would NOT open a console. I’m glad you asked this!

I ran netstat after running the vm and apparently the ports are listening, if I shut it down and execute the command once again the ports are not listed

Good, that’s expected behavior. So at least the VM is actually starting up.

The output for ssh-config looks okay.

So, to summarize:

  • You can boot the VM
  • The VM starts up
  • After a while you can see a listener on your own computer’s port 2222.

All of that is okay.

Can you try the following?
ping 192.168.103.100

That is the hard-coded IP MongoU have given to the VM. If that works, can you try:

ssh vagrant@192.168.103.100

The password is “vagrant”. If that works, at least you can get in.

1 Like

When I start the VM from the VB GUI pops up a black window (can’t type on it).

Yeah that’s correct the VM starts up and so is the port

The ping failed (4 send, 1 recieved, 3 lost)

I think the problem is with ssh, missconfiguration or something.

1 Like

Well, if the ping also fails that is not down to SSH. That’s a more fundamental problem…