start mariadb server problem on external HD - linux

I'm trying to start a local mariadb server on my raspberry pi. I've changed the datadir to point to an external harddrive, and i've gotten that working previously (with other pi's).
however, now when i use this particular pi and type in
sudo service mariadb start
I get
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
When i check journalctl -xe i get
-- The unit mariadb.service has entered the 'failed' state with result 'exit-cod
Oct 07 09:08:25 BLUE systemd[1]: Failed to start MariaDB 10.3.15 database server
-- Subject: A start job for unit mariadb.service has failed
Pokiing around further I find that my ib_buffer_pool in the directory I've specified for this server seems maybe corrupted?
Typing in ls-l for this particlar datadir I get
ls: cannot access 'ib_buffer_pool': Bad message
total 110628
-rwxrwxrwx 1 pi pi 16384 Oct 7 08:34 aria_log.00000001
-rwxrwxrwx 1 pi pi 52 Oct 7 08:34 aria_log_control
-rwxrwxrwx 1 pi pi 0 Jul 1 06:34 debian-10.3.flag
-????????? ? ? ? ? ? ib_buffer_pool
-rwxrwxrwx 1 pi pi 12582912 Jul 9 13:38 ibdata1
-rwxrwxrwx 1 pi pi 50331648 Jul 9 13:38 ib_logfile0
-rwxrwxrwx 1 pi pi 50331648 Jul 1 06:34 ib_logfile1
-rwxrwxrwx 1 pi pi 0 Jul 1 06:34 multi-master.info
drwxrwxrwx 2 pi pi 4096 Jul 2 10:13 mysql
-rwxrwxrwx 1 pi pi 16 Jul 1 06:34 mysql_upgrade_info
drwxrwxrwx 2 pi pi 4096 Jul 2 10:13 performance_schema
drwxrwxrwx 2 pi pi 4096 Jul 2 12:49 test_db
THose question marks freak me out...tried deleting the ib_buffer_pool and just get this "Bad Message" thing over and over.
To get this setup working on my other pi's I had to change permissions with sudo chmod -R a+rwX directory/ and i did that for THIS pi also, thought maybe this was a permissions issue but I checked and the containing folders are all rwxrwxrwx also...
does anyone know what might be going on and how to resolve this so I can start a local mariadb server on this pi?
N.B. I do have a mariadb server successfully running on ANOTHER pi which THIS f-ed up pi is connected to via ethernet and I can connect to that OTHER pi's mariadb server with THIS f-ed up pi to manipulate data and so on, no problems. BUT I wanted to run a local mariadb server on THIS f-ed up pi ALSO (so it could manage a database which would be located on ITS respective harddrive)...is this kind of goal not possible and/or the cause of why my ib_buffer_pool has ??? ???? ???? and I'm getting exit-code when i try to start this local mariadb server? FYI
Much appreciated

okay just in case anyone else stumbles across this...
didn't fix it properly, BUT
it was the ib_buffer_pool file being corrupted that was the problem.
To make it work (but i don't think it's a good long term fix)
I just renamed the directory the ib_buffer_pool file was in to "directorynameCORRUPTED"
then created a new directory called "directoryname"
and copied all of the files from "directorynameCORRUPTED" other than ib_buffer_pool into this "directoryname" directory
And it worked. So it's a workaround...but still wanna know what to do about those ????? corrupted files why did it show up? troubling....

Related

dpkg error trying to install packages- "unable to open files list file for package linux-headers-generic: No such device or address"

Trying to run routine updates using Mint-update (19.3 Tricia) and I'm running into an issue I haven't seen before.
When I try to install, I get the following:
dpkg: unrecoverable fatal error, aborting:
unable to open files list file for package 'linux-headers-generic': No such device or address
E: Sub-process /usr/bin/dpkg returned an error code (2)
After some Googling, I tried to manually repair by running
sudo apt-get install --reinstall linux-headers-$(uname -r)
But got the same error.
I suspect the problem is a broken link or reference, as I was dropped into initramfs on boot yesterday, which required some repairs to proceed. I have no idea what links or problems to look for since I've never poked around in that sort of thing for the OS, but I did see the following:
linux-headers-generic.list looks ok in /var/lib/dpkg/info:
b-w-rwx-wx 1 20033 root 243, 10 Jul 21 08:15 linux-headers-generic.list
-rw-r--r-- 1 root root 163 Jul 9 16:21 linux-headers-generic.md5sums
I also saw the following files for my current kernel if this helps:
-rw-r--r-- 1 root root 803877 Jul 21 08:15 linux-headers-4.15.0-151-generic.list
-rw-r--r-- 1 root root 820163 Jul 9 16:19 linux-headers-4.15.0-151-generic.md5sums
-rwxr-xr-x 1 root root 259 Jul 9 16:19 linux-headers-4.15.0-151-generic.postinst
-rw-r--r-- 1 root root 1179614 Jul 21 08:15 linux-headers-4.15.0-151.list
-rw-r--r-- 1 root root 1482865 Jul 9 16:19 linux-headers-4.15.0-151.md5sums
No idea if this problem is connected, but these are the first install errors I've seen in a LONG time.

Linux Images wont show up on main root folder but will on a subfolder

I have playing with some docker containers with LAMP.
The issue I am facing is that if I put my webpage to the www folder the page is showing up but the images from the folder www/icons/test.png wont show up. (http://192.168.123.123:8082/icons/test.png)
I get
Not Found
The requested URL was not found on this server.
Apache/2.4.38 (Debian) Server at 192.168.123.123 Port 8082
I made a copy of the icons folder to a subfolder www/test/icons/test.png and its working fine!
If I change path on the webpage all good.(http://192.168.123.123:8082/test/icons/test.png)
I checked the permissions for both folders and subfiles and they are the same!
drwxr-xr-x 11 userwh2 userwh2 4096 Aug 2 08:53 www
drwxr-xr-x 2 userwh2 userwh2 4096 Aug 1 10:19 www/icons
-rw-r--r-x 1 userwh2 userwh2 12145 Jul 24 2020 www/icons/test.png
drwxr-xr-x 3 userwh2 userwh2 4096 Aug 2 08:52 www/test
drwxr-xr-x 2 userwh2 userwh2 4096 Aug 1 10:19 www/test/icons
-rw-r--r-x 1 userwh2 userwh2 12145 Jul 24 2020 www/test/icons/test.png
I cant figure it out....
Any ideas anyone?
Edit:
Found this in the log:
Cannot serve directory /usr/share/apache2/icons/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
Actually I was able to find an answer
https://forum.getkirby.com/t/subpage-not-working-after-digital-ocean-deployment/16083/41
Seems like the /icons folder name its used by apache2 when doing a lookup and that is why its getting confused. Its like a common name probably in apache (ex, root, etc)

Can't write data to applesmc error, after upgrade to Arch linux kernel 5.8.1

I'm using the current version of mbpfan (mbpfan-git-2.2.1.r4.g52d8973-1-x86_64) from Arch User Repository, running Arch linux on a MacBookPro 6,1 mid-2010 (on external usb, actually). Mbpfan is a small daemon designed to control mac fan speed and solve heat problems.
After a recent upgrade to 5.8.1 kernal, from 5.7.12, mbpfan does not work,
with error
Aug 20 17:19:56 ehost kernel: applesmc: send_byte(0x03, 0x0300) fail:
0x00 Aug 20 17:19:56 ehost kernel: applesmc: FS! : write data fail
and
ehost mbpfan[380]: Could not set fan speed: Input/output error Aug 20
17:21:56 ehost kernel: applesmc: send_byte(0x40, 0x0300) fail: 0x00
Aug 20 17:21:56 ehost kernel: applesmc: F0Tg: write data fail
FS! fail is saying, can't change fan to "manual," and F0Tg is the first fan where it
tries to write a new speed.
From looking in /sys/devices/platform/applesmc.768 one can see that even root can only write to fan1_manual, fan1_min, and
fan1_output, for example.
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_input
-r--r--r-- 1 root root 4096 Aug 18 21:01 fan1_label
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_manual
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_max
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_min
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_output
The above permissions have not changed from earlier kernels when mbpfan worked.
They are exactly the same on the installations where mbpfan works (different usb stick, same machine).
Permissions should not be an issue, as I understand that one writes to "fan1_output," which is rw, to set the desired fan speed (counterintuitively).
As a test, I upgraded another installation with a working mbpfan (kernel 5.7.9) to 5.8.1, and the same no write problem appears.
--It seems that something in the kernel that affects mbpfan has changed between
5.7.12 and 5.8.1.
Naturally, I have reported this at the developer's git hub area. I've been digging around in the code a bit, but it's tough going so far as I really know nothing about drivers. --I'd really appreciate any suggestions on what I might try to get this working...

Not able to access _admin in WireMock

I am using the standalone jar of WireMock on CentOS.
Starting the server is fine but when I am trying to access the mapping files using the url:
http://localhost:8090/_admin
I am getting the error:
HTTP ERROR 404
Problem accessing /__files/_admin. Reason:
NOT_FOUND
I am starting WireMock as below:
java -jar wiremock-1.57-standalone.jar --port 8090
Below are the permissions of the files in the directory:
drwxrwxrwx 2 anurag.upadhaya domain users 4096 Mar 17 12:16 __files
drwxrwxrwx 2 anurag.upadhaya domain users 4096 Mar 17 12:16 mappings
-rwxrwxrwx 1 anurag.upadhaya domain users 6935826 Mar 18 09:57 wiremock-1.57-standalone.jar
It's __admin (with two underscores)

CentOS and fontconfig: Cannot load default config file

I'm getting following error when using imagick:
Fontconfig error: Cannot load default config file
My script is working but i would like to fix this (is filling up log file).
OS is:
# cat /etc/redhat-release
CentOS release 5.10 (Final)
I was looking trough internet little bit and this is causing problem:
access("/etc/fonts/fonts.conf", R_OK) = -1 ENOENT (No such file or directory)
Folder exists:
# ls /etc/fonts/ -all
total 64
drwxr-xr-x 4 root root 4096 Jul 9 2010 ./
drwxr-xr-x 86 root root 12288 Jan 13 00:48 ../
drwxr-xr-x 2 root root 4096 Jan 3 2012 conf.avail/
drwxr-xr-x 2 root root 4096 Apr 14 2013 conf.d/
-rw-r--r-- 1 root root 5239 Jan 12 2008 fonts.conf
-rw-r--r-- 1 root root 6907 Jan 12 2008 fonts.dtd
But i see only this folder via root account, other account under with script is run doesn't see this folder. Permissions looks fine for me, but not so experienced with linux.
Account under with script is run is created with WHM.
Please help :)
I manage to solve my problem. chroot was making trouble.
I need to:
log with root account
find jailed environment of account on with i run script (in my case /home/virtfs/[username])
to create folder where i will mount real stuff mkdir /home/virtfs/[username]/etc/fonts
to mount /etc/fonts to this folder: mount --bind /etc/fonts /home/virtfs/[username]/etc/fonts
Posting an answer for CentOS 7 in 2021:
yum install fontconfig
More info here:
https://centos.pkgs.org/7/centos-x86_64/fontconfig-2.13.0-4.3.el7.x86_64.rpm.html

Resources