Skip to content
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

Web Requests not being handled correctly #1815

Closed
ethanbeyer opened this issue Nov 14, 2022 · 3 comments
Closed

Web Requests not being handled correctly #1815

ethanbeyer opened this issue Nov 14, 2022 · 3 comments

Comments

@ethanbeyer
Copy link

Versions

  • Vagrant: Vagrant 2.3.2
  • Provider: Virtualbox 7.0.2 r154219 (Qt5.15.2)
  • Homestead: laravel/homestead@dev-main (for Virtualbox 7 support)

Host operating system

MacOS Ventura 13.0 (22A380)

My Process

I created a script to stand up boxes, called vbmake.

I run vbmake testing, and the script handles a lot of the boilerplate for me. The resulting "box" file structure looks like this:

testing.box/
  box/
    vendor
    after.sh
    aliases
    composer.json
    composer.lock
    homestead.testing.crt
    Homestead.yaml
    Vagrantfile
  databases/
  sites/
    test.local/
      index.html

I've never run into any of the issues I'll describe in this ticket using this method until after upgrading my Mac to Ventura.

The script generates the Homestead.yml file below.

Homestead.yaml

name: testing.box
hostname: testing

ip: 192.168.56.0
memory: 2048
cpus: 2
provider: virtualbox

ssl: true
authorize: ~/.ssh/id_rsa.pub
keys:
    - ~/.ssh/id_rsa

folders:
    - map: ../sites/test.local
      to: /home/vagrant/sites/test.local

sites:
    - map: test.local
      to: /home/vagrant/sites/test.local

# databases:
#     - homestead

features:
    - mysql:        false
    - mariadb:      false
    - postgresql:   false
    - ohmyzsh:      false
    - webdriver:    false

Hostfile

192.168.56.0    test.local

Vagrant destroy & up output

Gist

Expected behavior

I expect browsing test.local to display the contents of index.html: <h1>Hello World!</h1>

Actual behavior

Browser times out. ping test.local times out.

Things I've tried to debug / More Info

vagrant ssh -> flip -- I thought potentially the box was starting in apache mode instead of nginx, but I was wrong. Neither load the test.local site.

Then I thought that maybe something in the nginx configuration was borked, but it looks ok.

The Network tab of the Virtualbox says Adapter 1 is NAT, and Adapter 2 is Internal Network.

Thank you for looking at this!

@svpernova09
Copy link
Contributor

Spent some time on this over the weekend. From what I can tell it's Virtualbox causing the issues and needs an update. There may also be an upcoming Vagrant change (As the Vagrant docs do not mention Virtualbox 7.x support)

Here's a workaround that may work in the meantime: #1807 (comment)

@svpernova09
Copy link
Contributor

So I currently have Homestead w/ Virtualbox Version 7.0.4 r154605 (Qt5.15.2) working on macOS Ventura 13.1 (22C65) Intel CPU.

My Homestead.yaml:

---
ip: "192.168.3.232"
memory: 4096
cpus: 4
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Code/fresh
      to: /home/vagrant/fresh

sites:
    - map: fresh.test
      to: /home/vagrant/fresh/public

databases:
    - homestead
features:
    - mongodb: false
    - dockstead: false
    - mysql: true
    - mariadb: false
    - postgresql: false
    - ohmyzsh: false
    - webdriver: false

services:
    - enabled:
        - "mysql"
#    - disabled:
#        - "postgresql@11-main"

ports:
    - send: 3306
      to: 33060
vagrant@homestead:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:e3:71:38 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
       valid_lft 86329sec preferred_lft 86329sec
    inet6 fe80::a00:27ff:fee3:7138/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:9b:2f:71 brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.232/24 brd 192.168.3.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe9b:2f71/64 scope link
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:06:43:fb:6c brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
vagrant@homestead:~$

Host /etc/hosts:

cat /etc/hosts | grep fresh.test                                                                                                                                                                                  
192.168.3.232 fresh.test

image

image

@ethanbeyer
Copy link
Author

Thank you, @svpernova09 ! I will see if this works for me in the next few days!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants