clong / DetectionLab

Automate the creation of a lab environment complete with security tooling and logging best practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logger has no connection to download missing packages.

bcheevers123 opened this issue · comments

  • Operating System Version: Windows 10
  • Deploying via (VirtualBox/VMWare/AWS/Azure/ESXi): VMWare
  • Vagrant Version (if applicable):

Description of the issue:

While building the logger host, I'm running into the following error message that causes the build to stop:

Console output:
PS D:\DetectionLab\DetectionLab\Vagrant> vagrant up logger
Bringing machine 'logger' up with 'vmware_desktop' provider...
==> logger: Checking if box 'bento/ubuntu-20.04' version '202112.19.0' is up to date...
==> logger: Verifying vmnet devices are healthy...
==> logger: Preparing network adapters...
WARNING: The VMX file for this box contains a setting that is automatically overwritten by Vagrant
WARNING: when started. Vagrant will stop overwriting this setting in an upcoming release which may
WARNING: prevent proper networking setup. Below is the detected VMX setting:
WARNING:
WARNING:   ethernet0.pcislotnumber = "32"
WARNING:
WARNING: If networking fails to properly configure, it may require this VMX setting. It can be manually
WARNING: applied via the Vagrantfile:
WARNING:
WARNING:   Vagrant.configure(2) do |config|
WARNING:     config.vm.provider :vmware_desktop do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "32"
WARNING:     end
WARNING:   end
WARNING:
WARNING: For more information: https://www.vagrantup.com/docs/vmware/boxes.html#vmx-allowlisting
WARNING: The VMX file for this box contains a setting that is automatically overwritten by Vagrant
WARNING: when started. Vagrant will stop overwriting this setting in an upcoming release which may
WARNING: prevent proper networking setup. Below is the detected VMX setting:
WARNING:
WARNING:   ethernet1.pcislotnumber = "33"
WARNING:
WARNING: If networking fails to properly configure, it may require this VMX setting. It can be manually
WARNING: applied via the Vagrantfile:
WARNING:
WARNING:   Vagrant.configure(2) do |config|
WARNING:     config.vm.provider :vmware_desktop do |vmware|
WARNING:       vmware.vmx["ethernet1.pcislotnumber"] = "33"
WARNING:     end
WARNING:   end
WARNING:
WARNING: For more information: https://www.vagrantup.com/docs/vmware/boxes.html#vmx-allowlisting
==> logger: Starting the VMware VM...
==> logger: Waiting for the VM to receive an address...
==> logger: Forwarding ports...
    logger: -- 22 => 2222
==> logger: Waiting for machine to boot. This may take a few minutes...
    logger: SSH address: 127.0.0.1:2222
    logger: SSH username: vagrant
    logger: SSH auth method: private key
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Remote connection disconnect. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Remote connection disconnect. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Remote connection disconnect. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Connection aborted. Retrying...
==> logger: Machine booted and ready!
==> logger: Setting hostname...
==> logger: Configuring network adapters within the VM...
==> logger: Waiting for HGFS to become available...
==> logger: Enabling and configuring shared folders...
    logger: -- D:/DetectionLab/DetectionLab/Vagrant: /vagrant
==> logger: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> logger: flag to force provisioning. Provisioners marked to run always will still run.
PS D:\DetectionLab\DetectionLab\Vagrant>

Since the box has no connection, it cannot download js and other packages.
I tried running these manually and the commands still failed.
I then tried pinging bbc.co.uk and 8.8.8.8 but both failed, indicating an issue with networking.
-->

Tried a fresh install from master and this is the error I get

PS D:\DetectionLab\DetectionLab\DetectionLab\Vagrant> vagrant up --provider vmware_desktop
Bringing machine 'logger' up with 'vmware_desktop' provider...
Bringing machine 'dc' up with 'vmware_desktop' provider...
Bringing machine 'wef' up with 'vmware_desktop' provider...
Bringing machine 'win10' up with 'vmware_desktop' provider...
==> logger: Cloning VMware VM: 'bento/ubuntu-20.04'. This can take some time...
==> logger: Checking if box 'bento/ubuntu-20.04' version '202112.19.0' is up to date...
==> logger: Verifying vmnet devices are healthy...
==> logger: Preparing network adapters...
==> logger: Starting the VMware VM...
==> logger: Waiting for the VM to receive an address...
==> logger: Forwarding ports...
    logger: -- 22 => 2222
==> logger: Waiting for machine to boot. This may take a few minutes...
    logger: SSH address: 127.0.0.1:2222
    logger: SSH username: vagrant
    logger: SSH auth method: private key
    logger: Warning: Connection reset. Retrying...
    logger: Warning: Remote connection disconnect. Retrying...
    logger: Warning: Connection aborted. Retrying...
    logger:
    logger: Vagrant insecure key detected. Vagrant will automatically replace
    logger: this with a newly generated keypair for better security.
    logger:
    logger: Inserting generated public key within guest...
    logger: Removing insecure key from the guest if it's present...
    logger: Key inserted! Disconnecting and reconnecting using new SSH key...
==> logger: Machine booted and ready!
==> logger: Setting hostname...
==> logger: Configuring network adapters within the VM...
==> logger: Waiting for HGFS to become available...
==> logger: Enabling and configuring shared folders...
    logger: -- D:/DetectionLab/DetectionLab/DetectionLab/Vagrant: /vagrant
==> logger: Running provisioner: shell...
    logger: Running: c:/temp/vagrant-shell20220914-8616-1qejouy.sh
    logger: Removed /etc/systemd/system/multi-user.target.wants/systemd-resolved.service.
    logger: Removed /etc/systemd/system/dbus-org.freedesktop.resolve1.service.
    logger: Unable to locate logger_variables.sh
    logger: [10:16:04]: Adding apt repositories...
    logger: Cannot add PPA: 'ppa:~apt-fast/ubuntu/stable'.
    logger: ERROR: '~apt-fast' user or team does not exist.
    logger: Cannot add PPA: 'ppa:~rmescandon/ubuntu/yq'.
    logger: ERROR: '~rmescandon' user or team does not exist.
    logger: Cannot add PPA: 'ppa:~oisf/ubuntu/suricata-stable'.
    logger: ERROR: '~oisf' user or team does not exist.
    logger: [10:18:18]: Running apt-get clean...
    logger: [10:18:18]: Running apt-get update...
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Some index files failed to download. They have been ignored, or old ones used instead.
    logger: [10:21:17]: Installing apt-fast...
    logger: E: Unable to locate package apt-fast
    logger: [10:21:17]: Using apt-fast to install packages...
    logger: /tmp/vagrant-shell: line 51: apt-fast: command not found
    logger: [10:21:17]: Updating the MOTD...
    logger: [10:21:17]: [TEST] Validating that jq is correctly installed...
    logger: dpkg-query: no path found matching pattern *jq*
    logger: [-] jq was not found. Attempting to reinstall.
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: W: Some index files failed to download. They have been ignored, or old ones used instead.
    logger: Reading package lists...
    logger: Building dependency tree...
    logger: Reading state information...
    logger: The following additional packages will be installed:
    logger:   libjq1 libonig5
    logger: The following NEW packages will be installed:
    logger:   jq libjq1 libonig5
    logger: 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
    logger: Need to get 313 kB of archives.
    logger: After this operation, 1,062 kB of additional disk space will be used.
    logger: Err:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libonig5 amd64 6.9.4-1
    logger:   Temporary failure resolving 'us.archive.ubuntu.com'
    logger: Err:2 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libjq1 amd64 1.6-1ubuntu0.20.04.1
    logger:   Temporary failure resolving 'us.archive.ubuntu.com'
    logger: Err:3 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 jq amd64 1.6-1ubuntu0.20.04.1
    logger:   Temporary failure resolving 'us.archive.ubuntu.com'
    logger: E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/libo/libonig/libonig5_6.9.4-1_amd64.deb  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/j/jq/libjq1_1.6-1ubuntu0.20.04.1_amd64.deb  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/universe/j/jq/jq_1.6-1ubuntu0.20.04.1_amd64.deb  Temporary failure resolving 'us.archive.ubuntu.com'
    logger: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    logger: [X] Unable to install jq even after a retry. Exiting.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Screenshots:

Since this seems like a networking issue, here is the network card setup:

image

Is anyone else having this issue? I only have vmware as a provider, so theirs no possibility of confliction with another provider like virtual box

Does anyone know of a solution?

In VMware, if you go to Edit > Virtual Network Editor, this is what my window looks like:

image

Maybe see if something there looks off?

Sorry for late response:

On my end:

image

and the console output:

image

That's really weird. Are any of your VMs able to connect to the internet?

Closing due to inactivity