PHP Thread compilation not working - php

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

Related

Problem getting php7.4-fpm to start on ubuntu

I am using nginx, and not apache. Just upgraded from 18.04 to 20.04 and thus php7.2 to php7.4.
However php7.4-fpm fails to start. This is my log.
ian#thebeb:/etc/php/7.4/fpm$ sudo /etc/init.d/php7.4-fpm restart
Restarting php7.4-fpm (via systemctl): php7.4-fpm.serviceJob for php7.4-fpm.service failed because the control process exited with error code.
See "systemctl status php7.4-fpm.service" and "journalctl -xe" for details.
failed!
ian#thebeb:/etc/php/7.4/fpm$ 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 Sun 2021-01-17 21:01:20 GMT; 9s ago
Docs: man:php-fpm7.4(8)
Process: 63191 ExecStart=/usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf (code=exited, status=127)
Process: 63205 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)
Main PID: 63191 (code=exited, status=127)
Jan 17 21:01:20 thebeb systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Jan 17 21:01:20 thebeb php-fpm7.4[63191]: /usr/sbin/php-fpm7.4: symbol lookup error: /usr/sbin/php-fpm7.4: undefined symbol: pcre2_set_depth_limit_8
Jan 17 21:01:20 thebeb systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=127/n/a
Jan 17 21:01:20 thebeb systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
Jan 17 21:01:20 thebeb systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.
ian#thebeb:/etc/php/7.4/fpm$ journalctl -xe
-- A start job for unit UNIT has begun execution.
--
-- The job identifier is 431.
Jan 17 21:01:10 thebeb dbus-daemon[3745]: [session uid=1000 pid=3745] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.2' (uid=1000 pid=3742 >
Jan 17 21:01:10 thebeb dbus-daemon[3745]: [session uid=1000 pid=3745] Successfully activated service 'org.freedesktop.Tracker1'
Jan 17 21:01:10 thebeb systemd[3723]: Started Tracker metadata database store and lookup manager.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 431.
Jan 17 21:01:15 thebeb kernel: [UFW BLOCK] IN=enp0s3 OUT= MAC=01:00:5e:00:00:01:bc:14:01:0f:f6:e6:08:00 SRC=192.168.0.1 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2
Jan 17 21:01:20 thebeb sudo[63180]: ian : TTY=pts/1 ; PWD=/etc/php/7.4/fpm ; USER=root ; COMMAND=/etc/init.d/php7.4-fpm restart
Jan 17 21:01:20 thebeb sudo[63180]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 17 21:01:20 thebeb systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
-- Subject: A start job for unit php7.4-fpm.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit php7.4-fpm.service has begun execution.
--
-- The job identifier is 3745.
Jan 17 21:01:20 thebeb php-fpm7.4[63191]: /usr/sbin/php-fpm7.4: symbol lookup error: /usr/sbin/php-fpm7.4: undefined symbol: pcre2_set_depth_limit_8
Jan 17 21:01:20 thebeb systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=127/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit php7.4-fpm.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 127.
Jan 17 21:01:20 thebeb systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit php7.4-fpm.service has entered the 'failed' state with result 'exit-code'.
Jan 17 21:01:20 thebeb systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.
-- Subject: A start job for unit php7.4-fpm.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit php7.4-fpm.service has finished with a failure.
--
-- The job identifier is 3745 and the job result is failed.
Jan 17 21:01:20 thebeb sudo[63180]: pam_unix(sudo:session): session closed for user root
Jan 17 21:01:41 thebeb tracker-store[63047]: OK
Jan 17 21:01:41 thebeb systemd[3723]: tracker-store.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit UNIT has successfully entered the 'dead' state.
ian#thebeb:/etc/php/7.4/fpm$
The symbol lookup error, was symbol lookup error: /usr/sbin/php-fpm7.4: undefined symbol: pcre2_set_depth_limit_8.
I have checked everything I can think of, and can't spot the problem. Now I am out of my depth! Help.
Added after request:
ian#thebeb:/etc/php/7.4/fpm$ ldd $(which php-fpm7.4)
linux-vdso.so.1 (0x00007ffefb4e7000)
libargon2.so.1 => /usr/lib/x86_64-linux-gnu/libargon2.so.1 (0x00007f13e38a6000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f13e388a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f13e373b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f13e3735000)
libapparmor.so.1 => /usr/lib/x86_64-linux-gnu/libapparmor.so.1 (0x00007f13e3720000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f13e3671000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f13e34b5000)
libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 (0x00007f13e3422000)
libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 (0x00007f13e2f57000)
libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x00007f13e2d0c000)
libz.so.1 => /usr/local/lib/libz.so.1 (0x00007f13e2af0000)
libsodium.so.23 => /usr/lib/x86_64-linux-gnu/libsodium.so.23 (0x00007f13e2a98000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f13e28a4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f13e2881000)
/lib64/ld-linux-x86-64.so.2 (0x00007f13e3d6f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f13e2876000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f13e284d000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f13e282c000)
libgcrypt.so.20 => /usr/lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f13e270e000)
libicuuc.so.66 => /usr/lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f13e2526000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f13e2503000)
libicudata.so.66 => /usr/lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f13e0a42000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f13e0861000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f13e0846000)
ian#thebeb:/etc/php/7.4/fpm$
pcre2_set_depth_limit_8 is a library symbol reference (on my system it is in /usr/lib/apache2/modules/libphp8.0.so) that appears, again on my system, to reside in /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.10.0.
So, I suspect that the PCRE package on your system is damaged. Check the status of your libpcre2-8-0 package.
Or just do
ldd /usr/sbin/php-fpm7.4 | grep pcre2
and check where it points, or if it says that the library was not found (in the latter case you just need to apt-get install it, and apparently the dependency check system for that library is broken, since it didn't spot the lack).
If it does point to a .so file, then let's check said file: for example (I have only a Raspberry available)
nm -gD /usr/lib/arm-linux-gnueabihf/libpcre2-8.so.0.7.1
should report all the symbols in the library, and grep'ping for ours does find it:
0000f508 T pcre2_set_depth_limit_8
If it did not, then that would mean that the library does not contain the symbol -- which to me indicates that the library has to be somehow damaged, since on other systems that symbol is there.
Ubuntu 20.04
I remembered I had a 20.04 available somewhere else. The library there is libpcre2-8.so.0.9.0:
-rw-r--r-- 1 root root 584392 Dec 7 2019 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.0
and the symbol is there. The Ubuntu package I have is libpcre2-8-0:amd64.
# nm -gD /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.0 | grep pcre2_set_depth_limit_8
00000000000116f0 T pcre2_set_depth_limit_8

php7.4-fpm fails to start - update PHP 7.3 to PHP 7.4 on VULTR Ubuntu 18.04 with nginx

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

Failed to start The PHP 7.2 FastCGI Process Manager

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.

Cannot start/restart PHP 7.2 FPM service (CentOS 7, Apache)

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

Compute engine | Failed to start LSB: data collector for treasure Data

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

Categories