Worpress (really) self-hosted : mysql issue - php

I have made a Wordpress website first hosted locally with local by Flywheel.
I am trying to fully self-host it with a personal server (running ubuntu 18.04), not using some online ftp. I have found no documentation online about the way to do it, only people trying to sell theirs ftp services with a ready-to-use Wordpress environment... I managed to install some things, and when I enter the static IP address of the website, it works!
The problem:
After some time, a message like this appears : Error while trying to connect to the database and the website is down.
If I run /etc/init.d/mysql start again, the website works again! 30 min later, it breaks again, displaying the message above...
This is what I have done:
I used Duplicator to made an image of the website, and transferred it to the server.
I have installed:
nginx (for reverse proxy)
php 7.2
mysql-server
mysql-client
php7.2-mysql and some other extensions
My logins in wp-config.php are correct
Can you help me please ?
Things that failed:
restarting the server and reinstall everything
sudo systemctl reload mysql
Failed to reload mysql.service: Job type reload is not applicable for unit mysql.service.
See system logs and 'systemctl status mysql.service' for details.
sudo systemctl force-reload mysql
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
systemctl status mysql.service
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-22 10:07:23 UTC; 24min ago
Process: 10681 ExecStart=/usr/sbin/mysqld —daemonize —pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Process: 10659 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 10433 (code=exited, status=0/SUCCESS)
Apr 22 10:07:23 ewenvm systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 22 10:07:23 ewenvm systemd[1]: Failed to start MySQL Community Server.
Apr 22 10:07:23 ewenvm systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Apr 22 10:07:23 ewenvm systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Apr 22 10:07:23 ewenvm systemd[1]: Stopped MySQL Community Server.
Apr 22 10:07:23 ewenvm systemd[1]: mysql.service: Start request repeated too quickly.
Apr 22 10:07:23 ewenvm systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 22 10:07:23 ewenvm systemd[1]: Failed to start MySQL Community Server.
journalctl -xe
— Support: http://www.ubuntu.com/support
—
— Unit mysql.service has failed.
—
— The result is RESULT.
Apr 22 10:07:23 name-of-my-server systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Apr 22 10:07:23 name-of-my-server systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
— Subject: Automatic restarting of a unit has been scheduled
— Defined-By: systemd
— Support: http://www.ubuntu.com/support
—
— Automatic restarting of the unit mysql.service has been scheduled, as the result for
— the configured Restart= setting for the unit.
Apr 22 10:07:23 name-of-my-server systemd[1]: Stopped MySQL Community Server.
— Subject: Unit mysql.service has finished shutting down
— Defined-By: systemd
— Support: http://www.ubuntu.com/support
—
— Unit mysql.service has finished shutting down.
Apr 22 10:07:23 name-of-my-server systemd[1]: mysql.service: Start request repeated too quickly.
Apr 22 10:07:23 name-of-my-server systemd[1]: mysql.service: Failed with result 'exit-code'.
Apr 22 10:07:23 name-of-my-server systemd[1]: Failed to start MySQL Community Server.
— Subject: Unit mysql.service has failed
— Defined-By: systemd
— Support: http://www.ubuntu.com/support
—
— Unit mysql.service has failed.
—
— The result is RESULT.
Apr 22 10:09:01 name-of-my-server CRON[10701]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 22 10:09:01 name-of-my-server CRON[10702]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 22 10:09:01 name-of-my-server CRON[10701]: pam_unix(cron:session): session closed for user root
Apr 22 10:09:03 name-of-my-server systemd[1]: Starting Clean php session files...
— Subject: Unit phpsessionclean.service has begun start-up
— Defined-By: systemd
— Support: http://www.ubuntu.com/support
—
— Unit phpsessionclean.service has begun starting up.
Apr 22 10:09:04 name-of-my-server systemd[1]: Started Clean php session files.
— Subject: Unit phpsessionclean.service has finished start-up
— Defined-By: systemd
— Support: http://www.ubuntu.com/support
—
— Unit phpsessionclean.service has finished starting up.
—
— The start-up result is RESULT.
Apr 22 10:13:11 name-of-my-server sshd[10770]: Did not receive identification string from 182.182.22.159 port 52155
Apr 22 10:15:31 name-of-my-server systemd-timesyncd[2721]: Timed out waiting for reply from 91.189.89.199:123 (ntp.ubuntu.com).
Apr 22 10:15:41 name-of-my-server systemd-timesyncd[2721]: Timed out waiting for reply from 91.189.89.198:123 (ntp.ubuntu.com).
Apr 22 10:15:51 name-of-my-server systemd-timesyncd[2721]: Timed out waiting for reply from 91.189.91.157:123 (ntp.ubuntu.com).
Apr 22 10:16:01 name-of-my-server systemd-timesyncd[2721]: Timed out waiting for reply from 91.189.94.4:123 (ntp.ubuntu.com).
Apr 22 10:17:01 name-of-my-server CRON[10779]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 22 10:17:01 name-of-my-server CRON[10780]: (root) CMD ( cd / && run-parts —report /etc/cron.hourly)
Apr 22 10:17:01 name-of-my-server CRON[10779]: pam_unix(cron:session): session closed for user root
Here are the logs in /var/log/mysql/error/log :
2020-04-22T09:46:51.409203Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use —explicit_defaults_for_timestamp server option (see documentation for more details).
2020-04-22T09:46:51.413886Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.29-0ubuntu0.18.04.1) starting as process 10312 ...
2020-04-22T09:46:51.480012Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-04-22T09:46:51.480056Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-04-22T09:46:51.480062Z 0 [Note] InnoDB: Uses event mutexes
2020-04-22T09:46:51.480079Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-04-22T09:46:51.480086Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-04-22T09:46:51.480091Z 0 [Note] InnoDB: Using Linux native AIO
2020-04-22T09:46:51.480890Z 0 [Note] InnoDB: Number of pools: 1
2020-04-22T09:46:51.481899Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-04-22T09:46:51.487169Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-04-22T09:46:51.490733Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2020-04-22T09:46:51.490760Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2020-04-22T09:46:51.490768Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-04-22T09:46:51.490778Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-04-22T09:46:51.492322Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-04-22T09:46:51.492337Z 0 [ERROR] Failed to initialize builtin plugins.
2020-04-22T09:46:51.492342Z 0 [ERROR] Aborting
2020-04-22T09:46:51.494236Z 0 [Note] Binlog end
2020-04-22T09:46:51.495643Z 0 [Note] Shutting down plugin 'CSV'
2020-04-22T09:46:51.508165Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

This is strange. MySQL installed on Ubuntu with sudo apt install mysql-server is usually bulletproof.
As I read your error logs, this is the root-cause of your failures.
2020-04-22T09:46:51.490733Z 0 [ERROR] InnoDB: mmap(137 428 992 bytes) failed; errno 12
When MySQL, specifically the InnoDB "access method", was starting, it could not map 137 some-odd megabytes of memory to a file in the file system.
Do you have enough RAM on your Ubuntu instance? Is the disk or SSD almost full? If you have a separate disk partition for your /tmp directory is it big enough? (Avoid RAMDISK for /tmp when you're running MySQL.) Does it have other heavy applications running on it?
If this were my project and I was working with a VM, I would erase it and start over at this point.
I'm a big fan of Digital Ocean's step by step tutorials. I know they're a server-rental company, but their tutorials work for local installs too. https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04

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

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

MySQL service doesn't start on Ubuntu 14.04 after upgrading PHP from version 5.6 to 7.2

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.

PHP Thread compilation not working

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

MariaDB is not staring

I using Plesk 17 onyx on CentOS 7. I have updated my server via plesk update manager and suddenly my database server stop working. I was using MariaDB as database server. Plesk is also not working.
When I tried to start, restart MariaDB, I found the following error as output.
Redirecting to /bin/systemctl status -l mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-12-13 13:41:00 PKT; 10min ago
Process: 8193 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 8192 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 8164 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 8192 (code=exited, status=0/SUCCESS)
Dec 13 13:40:57 ns*.ip-19***** systemd[1]: Starting MariaDB database server...
Dec 13 13:40:57 ns*.ip-19***** mysqld_safe[8192]: 161213 13:40:57 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Dec 13 13:40:57 ns*.ip-19***** mysqld_safe[8192]: 161213 13:40:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Dec 13 13:41:00 ns*.ip-19***** mysqld_safe[8192]: 161213 13:41:00 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Dec 13 13:41:00 ns*.ip-19***** systemd[1]: mariadb.service: control process exited, code=exited status=1
Dec 13 13:41:00 ns*.ip-19***** systemd[1]: Failed to start MariaDB database server.
Dec 13 13:41:00 ns*.ip-19***** systemd[1]: Unit mariadb.service entered failed state.
Dec 13 13:41:00 ns*.ip-19***** systemd[1]: mariadb.service failed.
I also have tried to repair mysql via following command of plesk
plesk help repair mysql
Logs in /var/log/mariadb/mariadb.log
161213 14:01:15 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 155782156
161213 14:01:15 [Note] Plugin 'FEEDBACK' is disabled.
161213 14:01:15 [ERROR] /usr/libexec/mysqld: unknown option '--safe-show-database'
161213 14:01:15 [ERROR] Aborting
161213 14:01:15 InnoDB: Starting shutdown...
161213 14:01:16 InnoDB: Shutdown completed; log sequence number 155782156
161213 14:01:16 [Note] /usr/libexec/mysqld: Shutdown complete
161213 14:01:16 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
There was safe-show-database in my.cnf. I removed safe-show-database and start MariaDB service again and it works.
Cause
This option is deprecated and does not do anything because there is a
SHOW DATABASES privilege that can be used to control access to
database names on a per-account basis. See Section 6.2.1, “Privileges
Provided by MySQL”. --safe-show-database was removed in MySQL 5.5.3.

Categories