-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Windows: Network connection issues found. Unable to reach #2707
Comments
Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/ |
I see |
You should also be able to replace all of these: nginx_upstream: php83 With these: php: 8.3 |
Thanks for your reply but the problem is still there. When using vagrant ssh i can do |
hmmm that's possible, I've had that myself but only when using Parallels on Arm, I switched the DNS inside the VM to See #2662 which links to a howto, I also attempted to automate this with #2701 but didn't have much luck. I was hoping to set these servers for DNS:
Using google would cause issues in some countries that block those DNS servers, and there are privacy considerations to account for too. Quad9 has a good reputation on those counts and Cloudflare comes in close too |
I'm still fighting with this nothing has worked or I'm missing something.
Im still getting ' Network connection issues found. Unable to reach https://ppa.launchpadcontent.net' when provisioning and |
You shouldn't need to do anything related to VirtualBox or vagrant here to try and diagnose and fix this, all viable debugging steps are general Ubuntu steps you can perform via Also keep in mind no attempt is made to provision sites until after the main provisioner has completed. If it fails then nothing after it will run, after all why provision a site on a VM with no Nginx/PHP/DB? ( Why install the roof on a house that has no walls yet? ) |
Of note, Ubuntu has tried changing how DNS is handled over several revisions, knowing which version of Ubuntu will help greatly. You also don't need to reprovision to test if your fix worked, it's enough to test it from the command line inside the VM. Reprovisioning is just the most exensive/time consuming way to do it. It's also highly unlikely you can fix this from the vagrant/Windows side, all clues point to a Linux based solution |
If I remember right this is a generated file, by turning off the VM and turning it back on as part of a provision you've probably erased your DNS changes.
This article backsup the temporary part of the above. Take a look at Netplan. My next step with that PR was to figure out a netplan YAML file to drop in to add the DNS servers. Modifying an existing netplan YAML file in the VM and applying it should also work. You definitely don't need to install resolvectl etc, it should all be doable with what's already there. There is a chance your VM has a much older Ubuntu version that doesn't use this system though.
Those are all Windows errors and Windows error logs, totally unrelated to what you're dealing with. If you had the issues that thread is talking about then the provisioners would never have started in the first place and you'd be seeing vagrant errors not provisioner errors.
This rarely fixes problems and usually causes new ones! Unless you're seeing a VirtualBox or Vagrant error don't touch these!
If the host WIndows OS also had this issue then that might have been the cause, you should turn it back on.
The provisioner network checks are there to check if it's safe to continue and help diagnose issues. Some people can provision even when these checks fail and had to disable them manually, we do not know why. These should be treated as informational and not as an error. Most people who encounter this do so because they didn't bother to reboot their machine after updating/installing VirtualBox. The problem you're facing is actually further down in the |
Wow. Thank you'r response and the effort you put in it. It helped me immensely the problem as you'd pointed out is in the distro and "Of note, Ubuntu has tried changing how DNS is handled over several revisions, knowing which version of Ubuntu will help greatly." I have Ubuntu 20.04 LTS I've followed this advice then did The provision has the same problems so i guess it resets the name servers to previous values - how do I make them permament? |
The latter |
Yes this worked inside ssh but after provision it resets the DNS and the error is still there. Where can I add this line in the provision script? |
You don't, that's not how this is supposed to work. If Linux was your main operating system you wouldn't want to re-apply a temporary fix everytime you turned the machine on, or modify a Linux OS installer to do it for you. Test it via |
Look at https://linuxize.com/post/how-to-set-dns-nameservers-on-ubuntu-18-04/#setting-dns-nameservers-on-ubuntu-server it has a Netplan example that might help, my PR tried to modify those nameservers but I assumed they existed and they did not. The PR could be modified to use |
Thanks. OK. Trying those solutions right now with no luck. It seems DNS settings are really messed up right nowin ubuntu. |
what file did you modify in Netplan? Do you have a copy of it? |
I modified each in the directory - don't have the ability to get it now but I've added this to each one nameservers:
addresses: [1.1.1.1, 1.0.0.1] and then this |
the indentation matters, if there is no indentation on the nameservers section then it won't work |
Can you add it to the |
you can also copy into |
Hmm do you know what the contents were? That’s worrying but if it’s full of
site host names it would explain why and suggest a fix
…On Thu, 13 Jun 2024 at 11:38, Adam ***@***.***> wrote:
I've contacted a friend whos a ubuntu expert heres what he did:
- checked /etc/hosts file weight
- it was 90 mb (much too much)
- copied /etc/hosts.old
- pased in a template of /etc/hosts for ubuntu
<https://gist.github.com/ghoneycutt/e531984406b4b86ace687ea8958a6dc3>
- restart
It works.
Thank you @tomjn <https://github.com/tomjn> for all the help.
—
Reply to this email directly, view it on GitHub
<#2707 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZZST4U7O6NPKVLBYBTZHFZBVAVCNFSM6AAAAABJEMXITCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVGI3TINJVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
yes I've a copy of the |
Ah it's as I thought, every provision adds the hosts of VVV to the local file so that local loopback works, but it doesn't cleanup or check if it's already there. |
So there are 2 places that add site host names, one adds them with #vvv-auto on the end, and this function is meant to clear them out: VVV/provision/core/vvv/provision.sh Line 114 in c425018
This one adds them and checks if they're already present: VVV/provision/provision-site.sh Line 234 in c425018
and in the vagrant up trigger it updates the hosts without checking first in |
I've created a PR here: It might help prevent or reduce this from happening, can you take a look? I suspect this code isn't cleaning up the hosts file but might be appending it: Does anything jump out at you as obvious? |
also found in my notes: https://github.com/derekbit/kube-virtdeploy/blob/master/scripts/fix.generic-ubuntu-dns.sh |
Closing this now that #2708 is merged |
Sorry for the delay but you're working with a speed of light and I had family thins to attend to - if this helps you I'll check it today. |
@adamo no rush, the changes made it into the v3.13.1 release so there's no urgency. Confirm when you're free and give me a ping if the host file starts growing or DNS becomes weird again |
I've applied the updated, and will keep you posted if something comes up. |
What was The Command Used To Provision
What Kind of VVV Provision Was This
This was a reprovision of an already working VVV
Logs/What Broke
I've tried to add a new site and provision but got errors connecting to hosts.
Steps to Reproduce (for bugs)
Your Environment
Operating System: Windows
\ V\ V\ V / v3.13 Ruby:3.1.4, Path:"C:/strony/sites"
_/_/_/ git::develop(c425018)
Platform: mingw32 windows missingWinAdminPriv vagrant-hostsupdater vagrant-goodhosts vagrant-vbguest monochrome-terminal shared_db_folder_disabled
Vagrant: v2.4.1, virtualbox: v7.0.18
The text was updated successfully, but these errors were encountered: