Trying to set up wordpress on my ubuntu 18.04.5 LTS server but seems to not be able to get past the following error when installing or updating any packages. When I enter sudo apt-get upgrade -y. I get the following error.
NOTICE: To enable PHP 7.2 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.2-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Job for php7.2-fpm.service failed because the control process exited with error code.
See "systemctl status php7.2-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.2-fpm, action "restart" failed.
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-11-18 09:45:24 CST; 7ms ago
Docs: man:php-fpm7.2(8)
Process: 20174 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 20174 (code=exited, status=78)
Nov 18 09:45:24 makemctgreatagain systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Nov 18 09:45:24 makemctgreatagain php-fpm7.2[20174]: [18-Nov-2020 09:45:24] ERROR: failed to open configuration file '/etc/php/7.2/fpm/php-fpm.conf': No such file or directory (2)
Nov 18 09:45:24 makemctgreatagain php-fpm7.2[20174]: [18-Nov-2020 09:45:24] ERROR: failed to load configuration file '/etc/php/7.2/fpm/php-fpm.conf'
Nov 18 09:45:24 makemctgreatagain php-fpm7.2[20174]: [18-Nov-2020 09:45:24] ERROR: FPM initialization failed
Nov 18 09:45:24 makemctgreatagain systemd[1]: php7.2-fpm.service: Main process exited, code=exited, status=78/n/a
Nov 18 09:45:24 makemctgreatagain systemd[1]: php7.2-fpm.service: Failed with result 'exit-code'.
Nov 18 09:45:24 makemctgreatagain systemd[1]: Failed to start The PHP 7.2 FastCGI Process Manager.
dpkg: error processing package php7.2-fpm (--configure):
installed php7.2-fpm package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
php7.2-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm not sure if I need to reinstall php or where to go from here.
Related
I just tried to update the PHP Version of the nginx server and I get this message, when I enter systemctl status php7.4-fpm.service
php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-12-14 20:11:31 UTC; 4min 50s ago
Docs: man:php-fpm7.4(8)
Process: 9196 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Process: 9178 ExecStart=/usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 9178 (code=exited, status=78)
Dec 14 20:11:31 vultr.guest systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Dec 14 20:11:31 vultr.guest php-fpm7.4[9178]: [14-Dec-2020 20:11:31] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
Dec 14 20:11:31 vultr.guest php-fpm7.4[9178]: [14-Dec-2020 20:11:31] ERROR: FPM initialization failed
Dec 14 20:11:31 vultr.guest systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/n/a
Dec 14 20:11:31 vultr.guest systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
Dec 14 20:11:31 vultr.guest systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.
Also if I check for the Version with php -v I get back the Version 7.4.13
However, if upload a test.php File with just <?php phpinfo();?> in it, the Server tells me that I still run on PHP Version 7.3.22-1+ubuntu18.04.1+deb.sury.org+1
Already tried to change the standard PHP version with sudo update-alternatives --set php /usr/bin/php7.4
Thanks for your help
I am trying to start PHP-FPM but I keep failing.
# sudo systemctl status rh-php72-php-fpm
The result is:
[0m rh-php72-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/rh-php72-php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 2020-07-06 09:51:09 KST; 18s ago
Process: 10442 ExecStart=/opt/rh/rh-php72/root/usr/sbin/php-fpm --nodaemonize (code=exited, status=127)
Main PID: 10442 (code=exited, status=127)
706 09:51:09 myserver systemd[1]: Starting The PHP FastCGI Process Manager...
706 09:51:09 myserver php-fpm[10442]: /opt/rh/rh-php72/root/usr/sbin/php-fpm: symbol lookup error: /opt/rh/rh-php72/root/usr/sbin/php-fpm: undefi..._jit_exec
706 09:51:09 myserver systemd[1]: rh-php72-php-fpm.service: main process exited, code=exited, status=127/n/a
706 09:51:09 myserver systemd[1]: Failed to start The PHP FastCGI Process Manager.
706 09:51:09 myserver systemd[1]: Unit rh-php72-php-fpm.service entered failed state.
706 09:51:09 myserver systemd[1]: rh-php72-php-fpm.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
It seems like I have a directory link issue, but have no idea.
Could anyone help me with this?
It was a library issue.
Thanks #Jeemusu
I've set up a new virtual machine with wordpress on google's compute engine.
Now I'm facing the following problem:
Wordpress has released a new update (5.4) and I want update it. To do that, I need to do an upgrade of the vm because the installation of the new wordpress version fails and can't even start.
So now my thoughts on solving this problem were, maybe I need to update the php version or the whole vm.
I tried to do it but now i'm getting the following error: Failed to start LSB: data colector for treasure Data.
This is what i've got when I used the command sudo apt upgrade -y
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up google-fluentd (1.6.33-1) ...
Conffile /etc/google-fluentd/google-fluentd.conf has been modified. Remain untouched.
Job for google-fluentd.service failed because the control process exited with error code.
See "systemctl status google-fluentd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript google-fluentd, action "start" failed.
● google-fluentd.service - LSB: data collector for Treasure Data
Loaded: loaded (/etc/init.d/google-fluentd; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-04-19 20:15:44 UTC; 20ms ago
Docs: man:systemd-sysv-generator(8)
Process: 20187 ExecStart=/etc/init.d/google-fluentd start (code=exited, status=1/FAILURE)
Apr 19 20:15:44 agentur-m-wp-vm systemd[1]: Starting LSB: data collector for Treasure Data...
Apr 19 20:15:44 agentur-m-wp-vm google-fluentd[20187]: Starting google-fluentd 1.6.33: Disabled via metadata …ing).
Apr 19 20:15:44 agentur-m-wp-vm google-fluentd[20187]: google-fluentd ... failed!
Apr 19 20:15:44 agentur-m-wp-vm systemd[1]: google-fluentd.service: Control process exited, code=exited status=1
Apr 19 20:15:44 agentur-m-wp-vm systemd[1]: Failed to start LSB: data collector for Treasure Data.
Apr 19 20:15:44 agentur-m-wp-vm systemd[1]: google-fluentd.service: Unit entered failed state.
Apr 19 20:15:44 agentur-m-wp-vm systemd[1]: google-fluentd.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package google-fluentd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
google-fluentd
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm really not experienced with SSH so I would be the happiest human on earth if you could help me with this issue.
Thank you so much.
Kind regards
Vazanity.
EDIT:
If this helps you I used this command to get a detailed error message:
journalctl -xe
And this is what I got:
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: apt-daily.timer: Adding 13min 21.259584s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: certbot.timer: Adding 10h 18min 6.712498s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: Starting Daily apt download activities...
-- Subject: Unit apt-daily.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit apt-daily.service has begun starting up.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: Reloading.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: certbot.timer: Adding 2h 11min 1.812555s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: certbot.timer: Adding 5h 3min 3.480078s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: apt-daily-upgrade.timer: Adding 55min 49.753301s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: Started Daily apt download activities.
-- Subject: Unit apt-daily.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit apt-daily.service has finished starting up.
--
-- The start-up result is done.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: apt-daily.timer: Adding 3h 27min 38.579330s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: apt-daily.timer: Adding 7h 2min 37.043471s random time.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: Starting LSB: data collector for Treasure Data...
-- Subject: Unit google-fluentd.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit google-fluentd.service has begun starting up.
Apr 19 20:29:23 agentur-m-wp-vm google-fluentd[20542]: Starting google-fluentd 1.6.33: Disabled via metadata ... (w
Apr 19 20:29:23 agentur-m-wp-vm google-fluentd[20542]: google-fluentd ... failed!
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: google-fluentd.service: Control process exited, code=exited status=1
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: Failed to start LSB: data collector for Treasure Data.
-- Subject: Unit google-fluentd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit google-fluentd.service has failed.
--
-- The result is failed.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: google-fluentd.service: Unit entered failed state.
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: google-fluentd.service: Failed with result 'exit-code'.
Apr 19 20:29:23 agentur-m-wp-vm sudo[20460]: pam_unix(sudo:session): session closed for user root
lines 1308-1349/1349 (END)
UPDATE:
Now when I do sudo apt update
I get the following output:
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://repo.mysql.com/apt/debian stretch InRelease
Hit:5 http://deb.debian.org/debian stretch-backports InRelease
Hit:6 http://packages.cloud.google.com/apt google-cloud-logging-wheezy InRelease
Hit:7 http://deb.debian.org/debian stretch Release
Hit:8 http://packages.cloud.google.com/apt google-cloud-monitoring-stretch InRelease
Hit:9 http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease
Hit:10 http://packages.cloud.google.com/apt google-compute-engine-stretch-stable InRelease
Hit:11 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-stretch InRelease
Get:12 https://packages.sury.org/php stretch InRelease [6,760 B]
Fetched 6,760 B in 1s (6,311 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
13 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo apt upgrade went well, all packages have been installed/updated.
Now I tried to update wordpress again via backend and it still says "download failed" , "something went wrong".
Nothing more.
NEW UPDATE
I am running now sudo apt list --upgradable
and get the following output: Listing Done
(It seems like everything has been upgraded)
To be sure I'm running now the next command sudo apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
sgml-base xml-core
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Well. My assumption was right.. but still can't update wordpress in the backend..
What am I doing wrong... :(
You have an issue with the logging agent google-fluentd:
Apr 19 20:29:23 agentur-m-wp-vm systemd[1]: Starting LSB: data collector for Treasure Data
and the reason for it you can see in the logs as well:
Apr 19 20:29:23 agentur-m-wp-vm google-fluentd[20542]: Starting google-fluentd 1.6.33: Disabled via metadata
Have a look at the documentation Troubleshooting the Agent:
If the restart fails, and the log output shows "Disabled via
metadata", you are likely running an image from Google Cloud
Marketplace, where the Logging agent is disabled by default. This is
controlled by the google-logging-enable instance metadata key (with
the value 0).
To solve your issue:
restart the agent:
sudo service google-fluentd status
and check logs if you have the same error Disabled via metadata
re-enable the agent by following instructions:
To re-enable the agent, either remove that key or set
the value to 1 (see Setting instance
metadata).
restart and check status of the agent again:
sudo service google-fluentd restart
sudo service google-fluentd status
if you see no errors you can run sudo apt upgrade -y again.
Do not forget to create a snapshot/backup to protect your data before any changes.
EDIT Have a look at the documentation Updating WordPress and if nothing helps try Manual Update.
I encountered same problem. You should stop and uninstall google-fluentd with this command:
sudo service google-fluentd stop && sudo apt-get remove google-fluentd google-fluentd-catch-all-config
I have upgraded my PHP from version 5.6 to 7.2 and now MySQL does not work. When I enter sudo service mysqsl start, the following text gets displayed:
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
output of journalctl -xe
output of systemctl status mysql.service:
mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since \u0633\u0647\u200c\u0634\u0646\u0628\u0647 2018-07-17 04:22:01 +0430; 27s ago
Docs: man:systemd-sysv-generator(8)
Process: 26938 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 6860 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Main PID: 9974 (code=exited, status=0/SUCCESS)
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine mysql[6860]: [97B blob data]
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine mysql[6860]: Fatal error in defaults handling. Program aborted
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine /etc/init.d/mysql[7565]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine /etc/init.d/mysql[7565]: [61B blob data]
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine /etc/init.d/mysql[7565]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine mysql[6860]: ...fail!
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: mysql.service: Control process exited, code=exited status=1
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: mysql.service: Unit entered failed state.
\u0698\u0648\u0626\u06cc\u0647 17 04:22:01 hutadmin-virtual-machine systemd[1]: mysql.service: Failed with result 'exit-code'.
How can I fix this problem? I need to start MySQL.
I am attempting to use pthreads with Apache FPM.
Step 1.
After installing and recompiling php according to:
https://blog.programster.org/ubuntu16-04-compile-php-7-2-with-pthreads
The server works as expected and I can run pthreads from CLI.
Step 2.
Then I need to run threads from a web server so I followed the instructions from:
https://antrecu.com/blog/run-php7-fpm-apache-mpmevent-ubuntu-1604
After sudo service apache2 restart && sudo service php7.0-fpm restart:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
$ systemctl status apache2.service
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Mon 2018-03-12 17:09:45 PDT; 3min 35s ago
Docs: man:systemd-sysv-generator(8)
Process: 30818 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 32443 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Mar 12 17:09:45 ubuntu apache2[32443]: * The apache2 configtest failed.
Mar 12 17:09:45 ubuntu apache2[32443]: Output of config test was:
Mar 12 17:09:45 ubuntu apache2[32443]: [Mon Mar 12 17:09:45.084452 2018] [:crit] [pid 32454:tid 139629110323072]
Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You n.. (output cut off in SSH client)
Mar 12 17:09:45 ubuntu apache2[32443]: AH00013: Pre-configuration failed
Mar 12 17:09:45 ubuntu apache2[32443]: Action 'configtest' failed.
Mar 12 17:09:45 ubuntu apache2[32443]: The Apache error log may have more information.
Mar 12 17:09:45 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Mar 12 17:09:45 ubuntu systemd[1]: Failed to start LSB: Apache2 web server.
Mar 12 17:09:45 ubuntu systemd[1]: apache2.service: Unit entered failed state.
Needless to say I am a newbie when it comes to compiling Linux packages.
Any suggestions?
I am attempting to use pthreads with Apache FPM.
You can't. Find a way to work without them.
The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only.
-- http://php.net/manual/en/intro.pthreads.php