MongoLDAP lecture - Windows 8 - vagrant up ldap --> time out at SSH auth method: private key

Hi,
After downloading the file m034.zip, but after runnig “vagrant up ldap”, the following message is returned

Bringing machine ‘ldap’ up with ‘virtualbox’ provider…
==> ldap: Importing base box ‘CentoOS 6.4’…
==> ldap: Matching MAC address for NAT networking…
==> ldap: Setting the name of the VM: ldap-server
==> ldap: Clearing any previously set forwarded ports…
==> ldap: Clearing any previously set network interfaces…
==> ldap: Preparing network interfaces based on configuration…
ldap: Adapter 1: nat
ldap: Adapter 2: hostonly
==> ldap: Forwarding ports…
ldap: 22 (guest) => 2222 (host) (adapter 1)
==> ldap: Running ‘pre-boot’ VM customizations…
==> ldap: Booting VM…
==> ldap: Waiting for machine to boot. This may take a few minutes…
ldap: SSH address: 127.0.0.1:2222
ldap: SSH username: vagrant
ldap: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are ‘starting, running’. The machine is in the
‘unknown’ state. Please verify everything is configured
properly and try again.

If the provider you’re using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you’re using VirtualBox, run vagrant up while the
VirtualBox GUI is open.

The primary issue for this error is thet the provider you’re using is not properly configured, This is very rerely a Vagrant issue.


or this message error:

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured (“config.vm.boot_timeout” value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you’re using a custom box, make sure that networking is properly
working and you’re able to connect to the machine. It is a common
problem that networking isn’t setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout (“config.vm.boot_timeout”) value.

I have:
Vagrant 2.2.6
virtualbox 6.0.14 r133895
Virtualization in the BIOS is Enabled

I have successfully started others virtual server like “m103”, “database” etc.
I have the same problem in another pc with Windows 10.
Maybe the file m034.zip is corrupt?
If I can’t use the ldap server, I can’t go on in the m310 course
Can you help me please?
Thank you

Hi @AdamoZaino,

Are you working through a lecture? What is the title of the lecture where this vagrantfile is located?

M310 : MongoDB Security
Chapter 1: Authentication
Lecture: MongoLDAP

file: m034.zip

You can try once more by destroying and re provisioning the box:

  • vagrant destroy
  • enter y to accept and hit Enter
    vagrant up

If this doesn’t work, then I would suggest that you wait until you do the lab “Homework 1.6: Enabling LDAP Authentication on a Replica Set”. This comes with two machines, one provisioned with LDAP.

Hi @AdamoZaino,

So, I had a bit of time and I decided to try provisioning this machine to see if it would be successful and it was… after making a slight change to the provision-ldap file. I should mention that my first run (without making any changes) was a different error from yours, meaning, it went much farther than yours. Your error indicates that it didn’t complete the vagrantfile install and it didn’t even get to the provision-ldap file.

If you’re still keen on getting this up and running, try these steps:

  1. Take a copy of the vagrantfile and provision-ldap files.
  2. Open the original vagrantfile, add the line like in the image below and Save. The gui option opens a separate GUI window that’ll allow you see what’s going on (mainly for the ssh auth error so that you can capture any VirtualBox errors) and the forwarded_port option is an explicit port forwarding instruction:
    image
    Here’s the forwarded_port line you can copy:
    config.vm.network "forwarded_port", guest: 22, host: 2222, host_ip: "127.0.0.1", protocol: "tcp", auto_correct: true, id: "ssh"
  3. Open the original provision-ldap file, add the line like in the image below and Save. This will install v2.5.2 of python-ldap that only works with Python 2.6 (the version that comes with the centos 6.4 box):
  4. Re-try the provisioning:
    a) vagrant destroy -f
    b) vagrant up

If step 4 fails, let’s see the full error messages from the VirutalBox GUI, command line, and the last couple of lines of the log file. Here’s how to get to the log file:
image

NB: Before running the steps, can you absolutely double-check that you have Virtualization turned on in your BIOS and Hyper-V is turned off.
For the Hyper-V part, run bcdedit /set hypervisorlaunchtype off to turn it off. Restart your machine in both instances.
Plus ensure that firewalls, anti-virus or proxy servers aren’t blockers. And power down all other VMs just in case.

Unfortunately your suggestions don’t work.
I always get the same error.
Attached are the log files

(Attachment ldap-server-2019-12-31-14-10-29.log is missing)

(Attachment ldap-server-2019-12-31-14-10-31.log is missing)

You can’t upload files on here unfortunately.

I was expecting three outputs from you. I will re-iterate:

  1. full error messages from the VirutalBox GUI
  2. full error message from the command line (even if it’s the same error)
  3. last couple of lines of the log file

I was also expecting a response to this :arrow_up:. Confirm each part with some proof.

Hi,

I did everything you said to me:

Hyper-V is turned off

Restart machine

Disable firewalls , proxy and antivirus

In VirutalBox GUI there were no error messages: I could only see a white line, or

BUG: soft lockup - CPU#1 stuck for 67s! [modprobe:3985]

Error message from the command line was always the same

These are the bottom lines of the log files

vbox.log:

00:00:23.346410 AHCI#0: Port 0 reset

00:00:23.348038 VD#0: Cancelling all active requests

00:00:23.699029 PIIX3 ATA: Ctl#1: RESET, DevSel=0 AIOIf=0 CmdIf0=0xa1 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)

00:00:23.699318 PIIX3 ATA: Ctl#1: finished processing RESET

00:00:23.699645 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0xa1 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)

00:00:23.699876 PIIX3 ATA: Ctl#0: finished processing RESET

00:00:28.181024 VMMDev: Guest Additions information report: Version 4.2.10 r84104 ‘4.2.10’

00:00:28.181304 VMMDev: Guest Additions information report: Interface = 0x00010004 osType = 0x00053100 (Linux >= 2.6, 64-bit)

00:00:28.181852 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners

00:00:28.181905 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5

00:00:28.181948 VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no

00:00:28.182440 VMMDev: Guest reported fixed hypervisor window at 00001000000 LB 0x800000 (rc=VINF_SUCCESS)

00:00:28.182658 GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners

00:00:28.182706 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary

00:00:28.182736 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners

00:00:28.182758 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5

00:00:28.183250 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners

00:00:28.183286 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5

00:00:28.185534 VMMDev: Guest Log: vboxguest: major 0, IRQ 20, I/O port d020, MMIO at 00000000f0400000 (size 0x400000)

00:00:31.131108 NAT: Link up

VBoxHardening.log

9c0.1b38: supR3HardNtViCallWinVerifyTrustCatFile: cbHash=20 wszDigest=2C2912B1AF73A6796732D1488D75007F742A3299

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9ed710000 ‘C:\Windows\system32\rsaenh.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9ee380000 ‘C:\Windows\system32\crypt32.dll’

9c0.1b38: supR3HardNtViCallWinVerifyTrustCatFile: WinVerifyTrust => 0x0; cat=‘C:\Windows\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_63_for_KB3013410~31bf3856ad364e35~amd64~~6.3.1.1.cat’; file=’\Device\HarddiskVolume3\Windows\System32\tzres.dll’

9c0.1b38: supR3HardNtViCallWinVerifyTrustCatFile -> 0 (org 22900)

9c0.1b38: supR3HardenedWinVerifyCacheProcessWvtTodos: 0 (was 22900) fWinVerifyTrust=1 for ‘\Device\HarddiskVolume3\Windows\System32\tzres.dll’

9c0.1b38: supR3HardenedScreenImage/LdrLoadDll: cache hit (Unknown Status -22900 (0xffffa68c)) on \Device\HarddiskVolume3\Windows\System32\uxtheme.dll

9c0.1b38: Error (rc=0):

9c0.1b38: supR3HardenedScreenImage/LdrLoadDll: cached rc=Unknown Status -22900 (0xffffa68c) fImage=1 fProtect=0x0 fAccess=0x0 cHits=1024 \Device\HarddiskVolume3\Windows\System32\uxtheme.dll

9c0.1b38: Error (rc=0):

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: rejecting ‘C:\Windows\system32\uxtheme.dll’ (C:\Windows\system32\uxtheme.dll): rcNt=0xc0000190

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0xc0000190 ‘C:\Windows\system32\uxtheme.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9eec80000 ‘C:\Windows\system32\shell32.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9eec80000 ‘C:\Windows\system32\shell32.dll’

9c0.1b38: supR3HardenedScreenImage/LdrLoadDll: cache hit (VINF_SUCCESS) on \Device\HarddiskVolume3\Windows\System32\msctf.dll [redoing WinVerifyTrust]

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9ed710000 ‘C:\Windows\system32\rsaenh.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9ee560000 ‘C:\Windows\System32\WINTRUST.DLL’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9ee380000 ‘C:\Windows\system32\CRYPT32.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9ee380000 ‘C:\Windows\system32\crypt32.dll’

9c0.1b38: supR3HardenedScreenImage/LdrLoadDll: 0 (was 0) fWinVerifyTrust=1 for ‘\Device\HarddiskVolume3\Windows\System32\msctf.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: pName=C:\Windows\system32\MSCTF.dll (rcNtResolve=0xc0150008) *pfFlags=0x0 pwszSearchPath=0000000000000009: [calling]

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9f0350000 ‘C:\Windows\system32\MSCTF.dll’

9c0.1b38: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=00007ff9f07a0000 ‘C:\Windows\system32\ole32.dll’

Please share the full screenshot of this GUI window. Quite crucial.

I’ve edited my post #5, specifically steps 2 and 4, so lets re-do the steps.

Also share the screenshot of this command:
netstat -an | findstr /R "[:]22"

Lastly, I tested this on a Windows 10 Pro machine that’s using the same vagrant and VirtualBox versions as you and as you can see from my screenshot it works. Therefore your error has got to be a network or machine specific problem.

PS: I edited the title of your post to include “MongoLDAP lecture” so that it’s easy to find.

This is the screenshot of the GUI of virtualbox

This is the screenshot of command netstat:
Cattura4

Full screenshot of the VirtualBox GUI window please, including the title bar… the full window.

That’s much better. It looks like your VM is running (I had to translate from Italian to English), and like I suspected earlier it’s specific to your machine.

Can you confirm if you’re using a 32 or 64 bit machine? And the Windows 8 edition (i.e. Pro, Home etc)?

Also try the following and share all the outputs on a screenshot:
vagrant destroy -f
vagrant up --provision
vagrant ssh

This is my server:

After vagrant up --provision the same error is returned:
Cattura7

vagrant ssh
ssh_exchange_identification: Connection closed by remote host

@AdamoZaino there’s another person having the same problem as you. You can try the steps in that post or wait for him to try and feedback.

PS: It’s a different vagrantfile but your problem and his are centos distributions. You should be able to adapt it to your file.

I always get the same error on windows 8,
but, with many difficulties, I successfully installed the VMs ldap-server and m034 on another machine with windows 10.

I think that m034.zip is a too old file

Good to hear! :+1:

The file is fine because it works with Win 10. The problem seems to be some incompatibility between Windows 8 and the Centos guest machines on VirtualBox. Other guest machines like Ubuntu are fine.

Hey @AdamoZaino, just solved a similar problem for the other poster, so If you still have the patience, try it out.

Follow the same steps like before and in addition to step 2, change this line:

v.customize ["modifyvm", :id, "--cpus", "2"]

to this

v.customize ["modifyvm", :id, "--cpus", "2", "--paravirtprovider", "kvm", "--spec-ctrl", "on"]

Let me know the outcome.