Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

6.0.0 and PHP 7.3.x #2076

Closed
charlieartist opened this issue Aug 15, 2020 · 13 comments
Closed

6.0.0 and PHP 7.3.x #2076

charlieartist opened this issue Aug 15, 2020 · 13 comments
Labels

Comments

@charlieartist
Copy link

I updated to 6.0.0, but have run into some lingering issues regarding running PHP 7.3, where Ansible errors are popping up at the end of the build process. The CLI output is as follows:

TASK [geerlingguy.php-mysql : Install PHP MySQL dependencies (Debian).] ********
fatal: [project_name_here]: FAILED! => {"cache_update_time": 1597452087, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"      install 'php7.3-mysql'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages were automatically installed and are no longer required:\n  python-asn1crypto python-cffi-backend python-crypto python-cryptography\n  python-enum34 python-httplib2 python-idna python-ipaddress python-jinja2\n  python-markupsafe python-paramiko python-pkg-resources python-pyasn1\n  python-setuptools python-six python-yaml sshpass\nUse 'sudo apt autoremove' to remove them.\nThe following NEW packages will be installed:\n  php7.3-mysql\n0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.\nNeed to get 116 kB of archives.\nAfter this operation, 441 kB of additional disk space will be used.\nGet:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-mysql amd64 7.3.21-1+ubuntu18.04.1+deb.sury.org+1 [116 kB]\nFetched 116 kB in 0s (245 kB/s)\nSelecting previously unselected package php7.3-mysql.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 72783 files and directories currently installed.)\r\nPreparing to unpack .../php7.3-mysql_7.3.21-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...\r\nUnpacking php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\nSetting up php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\n\r\nCreating config file /etc/php/7.3/mods-available/mysqlnd.ini with new version\r\n\r\nCreating config file /etc/php/7.3/mods-available/mysqli.ini with new version\r\n\r\nCreating config file /etc/php/7.3/mods-available/pdo_mysql.ini with new version\r\nProcessing triggers for php7.3-fpm (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\nJob for php7.3-fpm.service failed because the control process exited with error code.\r\nSee \"systemctl status php7.3-fpm.service\" and \"journalctl -xe\" for details.\r\ninvoke-rc.d: initscript php7.3-fpm, action \"restart\" failed.\r\n\u001b[0;1;31m*\u001b[0m php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager\r\n   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)\r\n   Active: \u001b[0;1;31mfailed\u001b[0m (Result: exit-code) since Sat 2020-08-15 00:44:20 UTC; 14ms ago\r\n     Docs: man:php-fpm7.3(8)\r\n  Process: 17430 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)\r\n  Process: 17417 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf \u001b[0;1;31m(code=exited, status=78)\u001b[0m\r\n Main PID: 17417 (code=exited, status=78)\r\n\r\nAug 15 00:44:20 local systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...\r\nAug 15 00:44:20 local php-fpm7.3[17417]: [15-Aug-2020 00:44:20] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)\r\nAug 15 00:44:20 local php-fpm7.3[17417]: [15-Aug-2020 00:44:20] ERROR: FPM initialization failed\r\nAug 15 00:44:20 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Main process exited, code=exited, status=78/n/a\u001b[0m\r\nAug 15 00:44:20 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Failed with result 'exit-code'.\u001b[0m\r\nAug 15 00:44:20 local systemd[1]: \u001b[0;1;31m\u001b[0;1;39m\u001b[0;1;31mFailed to start The PHP 7.3 FastCGI Process Manager.\u001b[0m\r\ndpkg: error processing package php7.3-fpm (--configure):\r\n installed php7.3-fpm package post-installation script subprocess returned error exit status 1\r\nProcessing triggers for php7.3-cli (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\nErrors were encountered while processing:\r\n php7.3-fpm\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages were automatically installed and are no longer required:", "  python-asn1crypto python-cffi-backend python-crypto python-cryptography", "  python-enum34 python-httplib2 python-idna python-ipaddress python-jinja2", "  python-markupsafe python-paramiko python-pkg-resources python-pyasn1", "  python-setuptools python-six python-yaml sshpass", "Use 'sudo apt autoremove' to remove them.", "The following NEW packages will be installed:", "  php7.3-mysql", "0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.", "Need to get 116 kB of archives.", "After this operation, 441 kB of additional disk space will be used.", "Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-mysql amd64 7.3.21-1+ubuntu18.04.1+deb.sury.org+1 [116 kB]", "Fetched 116 kB in 0s (245 kB/s)", "Selecting previously unselected package php7.3-mysql.", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 72783 files and directories currently installed.)", "Preparing to unpack .../php7.3-mysql_7.3.21-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...", "Unpacking php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "Setting up php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "", "Creating config file /etc/php/7.3/mods-available/mysqlnd.ini with new version", "", "Creating config file /etc/php/7.3/mods-available/mysqli.ini with new version", "", "Creating config file /etc/php/7.3/mods-available/pdo_mysql.ini with new version", "Processing triggers for php7.3-fpm (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "Job for php7.3-fpm.service failed because the control process exited with error code.", "See \"systemctl status php7.3-fpm.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript php7.3-fpm, action \"restart\" failed.", "\u001b[0;1;31m*\u001b[0m php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager", "   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)", "   Active: \u001b[0;1;31mfailed\u001b[0m (Result: exit-code) since Sat 2020-08-15 00:44:20 UTC; 14ms ago", "     Docs: man:php-fpm7.3(8)", "  Process: 17430 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)", "  Process: 17417 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf \u001b[0;1;31m(code=exited, status=78)\u001b[0m", " Main PID: 17417 (code=exited, status=78)", "", "Aug 15 00:44:20 local systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...", "Aug 15 00:44:20 local php-fpm7.3[17417]: [15-Aug-2020 00:44:20] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)", "Aug 15 00:44:20 local php-fpm7.3[17417]: [15-Aug-2020 00:44:20] ERROR: FPM initialization failed", "Aug 15 00:44:20 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Main process exited, code=exited, status=78/n/a\u001b[0m", "Aug 15 00:44:20 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Failed with result 'exit-code'.\u001b[0m", "Aug 15 00:44:20 local systemd[1]: \u001b[0;1;31m\u001b[0;1;39m\u001b[0;1;31mFailed to start The PHP 7.3 FastCGI Process Manager.\u001b[0m", "dpkg: error processing package php7.3-fpm (--configure):", " installed php7.3-fpm package post-installation script subprocess returned error exit status 1", "Processing triggers for php7.3-cli (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "Errors were encountered while processing:", " php7.3-fpm"]}

RUNNING HANDLER [geerlingguy.apache : restart apache] **************************

RUNNING HANDLER [geerlingguy.php : restart webserver] **************************

RUNNING HANDLER [geerlingguy.php : restart php-fpm] ****************************

PLAY RECAP *********************************************************************
kkonline                   : ok=145  changed=14   unreachable=0    failed=1    skipped=128  rescued=0    ignored=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I can get the build stood up by running vagrant reload --provision, but it stands up running PHP 7.4.9. This is true as well when I run vagrant halt followed by vagrant up, even though the config.yml file lists this:

php_version: "7.3"

To be sure I hadn't overlooked anything, I did the following:

  • Updated the config.yml file with the new additions to 6.0.0, double-checked all settings.
  • Updated Vagrant Box (2.0.10)
  • Updated Python (3.8.5)
  • Updated Ansible (2.9.11)
  • Updated Composer (1.10.10)
  • Updated VirtualBox (6.1.12)
  • Checked for updates to macOS(10.15.6)
  • Ran vagrant destroy followed by vagrant up

Ironically, the main reason I was updating Drupal VM to the latest was because of the PHP 7.4/7.3 issue I was experiencing in the older version.

@charlieartist
Copy link
Author

charlieartist commented Aug 15, 2020

Did find a workaround—in config.yml, changed the value in php_fpm_listen: "127.0.0.1:9000", to php_fpm_listen: "127.0.0.1:8000".

What's odd is that this only affects PHP 7.3 builds, not 7.4. The error message indicated that the socket is already in use, even though I was careful to run vagrant destroy then vagrant up, and had no other VMs running at the same time.

@geerlingguy
Copy link
Owner

Can you run "systemctl status php7.3-fpm.service and see what errors it's saying are happening? Maybe there are two instances of php-fpm running or something strange like that. It could be a packaging issue with Ondrej's repos, or it could be a configuration issue caused by a change in config.yml.

@geerlingguy
Copy link
Owner

Can you also check if you've overridden the php_mysql_package version in your configuration?

@geerlingguy
Copy link
Owner

The default is set here: https://github.com/geerlingguy/ansible-role-php-mysql/blob/master/vars/Debian.yml#L2

And it looks like maybe you're installing two versions of the library (which installs two versions of PHP on the system). Also make sure you do a full vagrant destroy and rebuild, in case maybe you have an old Drupal VM installation that is getting extra PHP versions installed.

@charlieartist
Copy link
Author

charlieartist commented Aug 23, 2020

Thanks—
I ran systemctl status php7.3-fpm.service, which returned:

* php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor prese
   Active: active (running) since Thu 2020-08-20 02:53:43 UTC; 3 days ago
     Docs: man:php-fpm7.3(8)
  Process: 803 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php
 Main PID: 556 (php-fpm7.3)
   Status: "Processes active: 0, idle: 5, Requests: 325, slow: 0, Traffic: 0req/
    Tasks: 6 (limit: 2320)
   CGroup: /system.slice/php7.3-fpm.service
           |-  556 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
           |-19583 php-fpm: pool www
           |-19584 php-fpm: pool www
           |-19585 php-fpm: pool www
           |-19586 php-fpm: pool www
           `-19588 php-fpm: pool www

I went ahead and reset to defaults in the config.yml file, and ran vagrant destroy and vagrant up

The build process got to this point and failed:

TASK [geerlingguy.php-mysql : Install PHP MySQL dependencies (Debian).] ********
fatal: [kkonline]: FAILED! => {"cache_update_time": 1598223897, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"      install 'php7.3-mysql'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages were automatically installed and are no longer required:\n  python-asn1crypto python-cffi-backend python-crypto python-cryptography\n  python-enum34 python-httplib2 python-idna python-ipaddress python-jinja2\n  python-markupsafe python-paramiko python-pkg-resources python-pyasn1\n  python-setuptools python-six python-yaml sshpass\nUse 'sudo apt autoremove' to remove them.\nThe following NEW packages will be installed:\n  php7.3-mysql\n0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded.\nNeed to get 116 kB of archives.\nAfter this operation, 441 kB of additional disk space will be used.\nGet:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-mysql amd64 7.3.21-1+ubuntu18.04.1+deb.sury.org+1 [116 kB]\nFetched 116 kB in 0s (239 kB/s)\nSelecting previously unselected package php7.3-mysql.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 72783 files and directories currently installed.)\r\nPreparing to unpack .../php7.3-mysql_7.3.21-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...\r\nUnpacking php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\nSetting up php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\n\r\nCreating config file /etc/php/7.3/mods-available/mysqlnd.ini with new version\r\n\r\nCreating config file /etc/php/7.3/mods-available/mysqli.ini with new version\r\n\r\nCreating config file /etc/php/7.3/mods-available/pdo_mysql.ini with new version\r\nProcessing triggers for php7.3-fpm (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\nJob for php7.3-fpm.service failed because the control process exited with error code.\r\nSee \"systemctl status php7.3-fpm.service\" and \"journalctl -xe\" for details.\r\ninvoke-rc.d: initscript php7.3-fpm, action \"restart\" failed.\r\n\u001b[0;1;31m*\u001b[0m php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager\r\n   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)\r\n   Active: \u001b[0;1;31mfailed\u001b[0m (Result: exit-code) since Sun 2020-08-23 23:08:52 UTC; 10ms ago\r\n     Docs: man:php-fpm7.3(8)\r\n  Process: 17523 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)\r\n  Process: 17522 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf \u001b[0;1;31m(code=exited, status=78)\u001b[0m\r\n Main PID: 17522 (code=exited, status=78)\r\n\r\nAug 23 23:08:52 local systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...\r\nAug 23 23:08:52 local php-fpm7.3[17522]: [23-Aug-2020 23:08:52] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)\r\nAug 23 23:08:52 local php-fpm7.3[17522]: [23-Aug-2020 23:08:52] ERROR: FPM initialization failed\r\nAug 23 23:08:52 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Main process exited, code=exited, status=78/n/a\u001b[0m\r\nAug 23 23:08:52 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Failed with result 'exit-code'.\u001b[0m\r\nAug 23 23:08:52 local systemd[1]: \u001b[0;1;31m\u001b[0;1;39m\u001b[0;1;31mFailed to start The PHP 7.3 FastCGI Process Manager.\u001b[0m\r\ndpkg: error processing package php7.3-fpm (--configure):\r\n installed php7.3-fpm package post-installation script subprocess returned error exit status 1\r\nProcessing triggers for php7.3-cli (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...\r\nErrors were encountered while processing:\r\n php7.3-fpm\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages were automatically installed and are no longer required:", "  python-asn1crypto python-cffi-backend python-crypto python-cryptography", "  python-enum34 python-httplib2 python-idna python-ipaddress python-jinja2", "  python-markupsafe python-paramiko python-pkg-resources python-pyasn1", "  python-setuptools python-six python-yaml sshpass", "Use 'sudo apt autoremove' to remove them.", "The following NEW packages will be installed:", "  php7.3-mysql", "0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded.", "Need to get 116 kB of archives.", "After this operation, 441 kB of additional disk space will be used.", "Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.3-mysql amd64 7.3.21-1+ubuntu18.04.1+deb.sury.org+1 [116 kB]", "Fetched 116 kB in 0s (239 kB/s)", "Selecting previously unselected package php7.3-mysql.", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 72783 files and directories currently installed.)", "Preparing to unpack .../php7.3-mysql_7.3.21-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...", "Unpacking php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "Setting up php7.3-mysql (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "", "Creating config file /etc/php/7.3/mods-available/mysqlnd.ini with new version", "", "Creating config file /etc/php/7.3/mods-available/mysqli.ini with new version", "", "Creating config file /etc/php/7.3/mods-available/pdo_mysql.ini with new version", "Processing triggers for php7.3-fpm (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "Job for php7.3-fpm.service failed because the control process exited with error code.", "See \"systemctl status php7.3-fpm.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript php7.3-fpm, action \"restart\" failed.", "\u001b[0;1;31m*\u001b[0m php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager", "   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)", "   Active: \u001b[0;1;31mfailed\u001b[0m (Result: exit-code) since Sun 2020-08-23 23:08:52 UTC; 10ms ago", "     Docs: man:php-fpm7.3(8)", "  Process: 17523 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)", "  Process: 17522 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf \u001b[0;1;31m(code=exited, status=78)\u001b[0m", " Main PID: 17522 (code=exited, status=78)", "", "Aug 23 23:08:52 local systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...", "Aug 23 23:08:52 local php-fpm7.3[17522]: [23-Aug-2020 23:08:52] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)", "Aug 23 23:08:52 local php-fpm7.3[17522]: [23-Aug-2020 23:08:52] ERROR: FPM initialization failed", "Aug 23 23:08:52 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Main process exited, code=exited, status=78/n/a\u001b[0m", "Aug 23 23:08:52 local systemd[1]: \u001b[0;1;39m\u001b[0;1;31m\u001b[0;1;39mphp7.3-fpm.service: Failed with result 'exit-code'.\u001b[0m", "Aug 23 23:08:52 local systemd[1]: \u001b[0;1;31m\u001b[0;1;39m\u001b[0;1;31mFailed to start The PHP 7.3 FastCGI Process Manager.\u001b[0m", "dpkg: error processing package php7.3-fpm (--configure):", " installed php7.3-fpm package post-installation script subprocess returned error exit status 1", "Processing triggers for php7.3-cli (7.3.21-1+ubuntu18.04.1+deb.sury.org+1) ...", "Errors were encountered while processing:", " php7.3-fpm"]}

RUNNING HANDLER [geerlingguy.apache : restart apache] **************************

RUNNING HANDLER [geerlingguy.php : restart webserver] **************************

RUNNING HANDLER [geerlingguy.php : restart php-fpm] ****************************

PLAY RECAP *********************************************************************
kkonline                   : ok=145  changed=14   unreachable=0    failed=1    skipped=128  rescued=0    ignored=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I then, as a check, ran this again: vagrant@local:~$ systemctl status php7.3-fpm.service, which returned:

* php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor prese
   Active: failed (Result: exit-code) since Sun 2020-08-23 23:08:52 UTC; 28min a
     Docs: man:php-fpm7.3(8)
  Process: 17523 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php
  Process: 17522 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/
 Main PID: 17522 (code=exited, status=78)
lines 1-7/7 (END)

So, I reset the php_fpm_listen: "127.0.0.1:8000", and ran vagrant destroy and vagrant up, and the build is running OK, back on 7.3.

Per the Ansible settings, where would this be modified? I have made no changes to DrupalVM code besides the config.yml, and cross-checked this against the new default.config.yml.

To check, I ran this again with 7.3 up, and the response looks the same as before:

systemctl status php7.3-fpm.service
* php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor prese
   Active: active (running) since Sun 2020-08-23 23:45:42 UTC; 30min ago
     Docs: man:php-fpm7.3(8)
  Process: 18208 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php
  Process: 18216 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/p
 Main PID: 18210 (php-fpm7.3)
   Status: "Processes active: 0, idle: 5, Requests: 32, slow: 0, Traffic: 0req/s
    Tasks: 6 (limit: 2320)
   CGroup: /system.slice/php7.3-fpm.service
           |-18210 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
           |-19809 php-fpm: pool www
           |-19810 php-fpm: pool www
           |-19890 php-fpm: pool www
           |-19891 php-fpm: pool www
           `-19898 php-fpm: pool www

@kruczi
Copy link

kruczi commented Sep 7, 2020

Hi All :)
I had a similar issue, for my Drupal 7 local environment I specified PHP 7.3, but provisioned was PHP 7.4.
I managed to fix the issue when I specified the box_version to 2.0.9.

config.vm.box_version = "2.0.9"

The version 2.0.10 has a problem with provisioned PHP 7.3.

Regards.

@oxyc
Copy link
Collaborator

oxyc commented Sep 8, 2020

geerlingguy/ansible-role-php-versions#51 should fix it.

@oxyc
Copy link
Collaborator

oxyc commented Sep 9, 2020

If someone wants to patch it manually (or with composer-patches package) until there's a new release, here's a patch https://github.com/oxyc/drupal-vm/commit/cec3dd6487a7ab5f2b1d315044e512b3695070d1.patch

@pranitjha
Copy link

pranitjha commented Sep 22, 2020

I did a workaround on my vagrant box to update the php version from 7.4 to 7.3. I manually changed the mapping like this:

cd /etc/alternatives/
ls -la | grep php (Check which version is mapped with php)
sudo rm php
sudo ln -s /usr/bin/php7.3 php (Add sym link for new version you need)
sudo service apache2 restart

This fixed the php version for me to 7.3

@charlieartist
Copy link
Author

@pranitjha Good that you found a solution. If you have to rebuild your VM though, will you have to repeat this process?

@pranitjha
Copy link

@charlieartist I did vagrant reload --provision and the changes didn't got reverted, so, It looks fine and I don't have to repeat the process.

@charlieartist
Copy link
Author

@pranitjha Good. My real issues have come with major updates, when vagrant destroy followed by vagrant up is required. That can, at times, cause hours of aggravation.

@geerlingguy
Copy link
Owner

Sorry about all this; I'm going to merge @oxyc's fix and that will be in the 6.0.1 version of Drupal VM. Leaving this open until I get the role tested, tagged, and merged.

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

No branches or pull requests

5 participants