laravel / homestead

MIT License
3.85k stars 1.45k forks source link

PHP 8.2 FPM not starting at boot in Homestead v15 #1950

Closed nie7321 closed 4 months ago

nie7321 commented 5 months ago

Please note that the Homestead issue tracker is reserved for bug reports and enhancements. We are not always able to debug Vagrant, Provider or Operating System issues, but will do our best to help. Thank you!

Versions

Host operating system

Windows 10

Homestead.yaml

# Copy-paste your Homestead.yaml here

Vagrant destroy & up output

Provide a link to a GitHub Gist containing the complete output of vagrant destroy && vagrant up.

I think the relevant portion is this -- FPM for 8.2 doesn't reflect it being enable'd in systemd, unlike the other versions:

Fragment of the `up` output ``` ==> homestead: Running provisioner: Installing php8.0 (shell)... homestead: Running: script: Installing php8.0 homestead: Synchronizing state of php8.0-fpm.service with SysV service script with /lib/systemd/systemd-sysv-install. homestead: Executing: /lib/systemd/systemd-sysv-install enable php8.0-fpm homestead: Created symlink /etc/systemd/system/multi-user.target.wants/php8.0-fpm.service → /lib/systemd/system/php8.0-fpm.service. homestead: PHP 8.0 already installed. ==> homestead: Running provisioner: Installing php8.2 (shell)... homestead: Running: script: Installing php8.2 homestead: PHP 8.2 already installed. ==> homestead: Running provisioner: Installing php8.1 (shell)... homestead: Running: script: Installing php8.1 homestead: Synchronizing state of php8.1-fpm.service with SysV service script with /lib/systemd/systemd-sysv-install. homestead: Executing: /lib/systemd/systemd-sysv-install enable php8.1-fpm homestead: Created symlink /etc/systemd/system/multi-user.target.wants/php8.1-fpm.service → /lib/systemd/system/php8.1-fpm.service. ```

Expected behavior

php8.2-fpm should be running on boot.

Actual behavior

It is not running:

vagrant@homestead:~$ sudo systemctl status php8.2-fpm
○ php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php8.2-fpm.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:php-fpm8.2(8)

This can be rectified for the lifetime of this instance of the box by running:

sudo /lib/systemd/systemd-sysv-install enable php8.2-fpm
sudo systemctl status php8.2-fpm

This wasn't a fluke; somebody else I work with experienced the same after updating to the latest Homestead tag & box.

Steps to reproduce

  1. Destroy the box
  2. Up the box
  3. Observe FPM 8.2 isn't running.

References

n/a

xuanxiaoyu69 commented 5 months ago

me too!

image
MichaelBelgium commented 5 months ago

@nie7321 I assume it's because systemctl enable php8.2-fpmisn't there in the script for php 8.2 feature

I noticed this too when i was doing my PR for WSL (#1949), it's present in that branch tho

@xuanxiaoyu69 That looks like a different issue, turn on php 8.2 feature in homestead.yaml, its not even installed?