This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linux:general:troubleshooting [2018/07/05 12:44] – lunetikk | linux:general:troubleshooting [2019/10/07 18:06] – lunetikk | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
+ | |||
+ | ==== Removing old kernels leads to broken symlinks ==== | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | apt-get autoremove leads to a broken symlink which requires a reload of grub | ||
+ | |||
+ | < | ||
+ | apt-get autoremove | ||
+ | ... | ||
+ | The link / | ||
+ | Removing symbolic link vmlinuz.old | ||
+ | you may need to re-run your boot loader[grub] | ||
+ | The link / | ||
+ | Removing symbolic link initrd.img.old | ||
+ | you may need to re-run your boot loader[grub] | ||
+ | </ | ||
+ | |||
+ | === Reason === | ||
+ | |||
+ | Broken symlinks | ||
+ | |||
+ | === Fix === | ||
+ | |||
+ | Run " | ||
+ | < | ||
+ | update-grub | ||
+ | | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found memtest86+ image: / | ||
+ | Found memtest86+ image: / | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | \\ | ||
==== Linux starts in emergency mode - faulty logical volume (xfs) ==== | ==== Linux starts in emergency mode - faulty logical volume (xfs) ==== | ||
- | == Description: == | + | === Description |
{{: | {{: | ||
- | After entering your root password and opening " | + | After entering your root password and opening " |
< | < | ||
- | (date) | + | kernel: [299102] XFS (dm-2): First 64 bytes of corrupted metadata buffer: |
- | (date) | + | kernel: [299102] ffff880308ed2000: |
- | (date) | + | kernel: [299103] ffff880308ed2010: |
- | (date) | + | kernel: [299104] ffff880308ed2020: |
- | (date) | + | kernel: [299104] ffff880308ed2030: |
- | (date) | + | kernel: [299114] XFS (dm-2): Metadata corruption detected at xfs_inode_buf_verify+0x66/ |
- | (date) | + | kernel: [299115] XFS (dm-2): Unmount and run xfs_repair |
- | (date) | + | kernel: [299115] XFS (dm-2): First 64 bytes of corrupted metadata buffer: |
- | (date) | + | kernel: [299116] ffff880308ed2000: |
- | (date) | + | kernel: [299116] ffff880308ed2010: |
- | (date) | + | kernel: [299117] ffff880308ed2020: |
- | (date) | + | kernel: [299117] ffff880308ed2030: |
- | (date) | + | kernel: [299189] XFS (dm-2): metadata I/O error: block 0x13bfa0 (" |
- | (date) | + | kernel: [299195] XFS (dm-2): xfs_imap_to_bp: |
- | (date) | + | kernel: [299196] XFS (dm-2): xfs_do_force_shutdown(0x8) called from line 3519 of file ../ |
- | (date) | + | kernel: [299200] XFS (dm-2): Corruption of in-memory data detected. |
- | (date) | + | kernel: [299200] XFS (dm-2): Please umount the filesystem and rectify the problem(s) |
- | (date) | + | kernel: [372139] XFS (dm-2): xfs_log_force: |
</ | </ | ||
- | \\ | ||
- | == Reason: == | + | === Reason |
The server might have KVM installed which messed something up...\\ | The server might have KVM installed which messed something up...\\ | ||
[[https:// | [[https:// | ||
\\ | \\ | ||
- | == Fix: == | + | === Fix === |
Check " | Check " | ||
- | Get the right LV for the " | + | Get the right LV for " |
- | < | + | < |
Try to repair the filesystem | Try to repair the filesystem | ||
Line 53: | Line 91: | ||
ll /data | ll /data | ||
</ | </ | ||
+ | |||
+ | Finally restart your system and pray... | ||
Have a look at this website for more xfs_repair related info\\ | Have a look at this website for more xfs_repair related info\\ | ||
Line 58: | Line 98: | ||
\\ | \\ | ||
\\ | \\ | ||
+ | ==== ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/ | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | You can connect to your MySQL with 127.0.0.1 but not with localhost | ||
+ | |||
+ | < | ||
+ | mysql -h127.0.0.1 -uroot -p | ||
+ | #Welcome to the MySQL monitor... | ||
+ | |||
+ | mysql -hlocalhost -uroot -p | ||
+ | #ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/ | ||
+ | </ | ||
+ | |||
+ | === Reason === | ||
+ | |||
+ | MySQL will try to connect to the unix socket if you tell it to connect to localhost. If you tell it to connect to 127.0.0.1 you are forcing it to connect to the network socket. | ||
+ | |||
+ | === Fix === | ||
+ | |||
+ | Verify if the socket is really your problem. | ||
+ | |||
+ | < | ||
+ | mysql --print-defaults | ||
+ | |||
+ | mysql would have been started with the following arguments: | ||
+ | --port=3306 --socket=/ | ||
+ | </ | ||
+ | < | ||
+ | mysqld --print-defaults | ||
+ | |||
+ | mysqld would have been started with the following arguments: | ||
+ | --user=mysql --pid-file=/ | ||
+ | </ | ||
+ | |||
+ | Compare the defaults for " | ||
+ | < | ||
+ | |||
+ | If that worked, check if you have specified a socket for both, the client and the daemon in your my.cnf | ||
+ | < | ||
+ | ... | ||
+ | [client] | ||
+ | port = 3306 | ||
+ | socket | ||
+ | ... | ||
+ | [mysqld] | ||
+ | port = 3306 | ||
+ | socket | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | If this is the case, check if your my.cnf is in one of the following folders. The default options are read from these files in the given order: | ||
+ | < | ||
+ | / | ||
+ | / | ||
+ | ~/ | ||
+ | </ | ||
+ | |||
+ | If you dont have your my.cnf in one of the folders, create a symlink at one of these locations referencing your config file | ||
+ | < | ||
+ | example: | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | The connection should work now. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== Bug: soft lockup in messages ==== | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | You can find multiple "Bug: soft lockup" | ||
+ | |||
+ | < | ||
+ | May 25 07:23:59 XXXXXXX kernel: [13445315.881356] BUG: soft lockup - CPU#16 stuck for 23s! [yyyyyyy: | ||
+ | </ | ||
+ | |||
+ | === Reason === | ||
+ | |||
+ | >A 'soft lockup' | ||
+ | -SUSE KB [[https:// | ||
+ | |||
+ | === Fix === | ||
+ | |||
+ | __Solution 1:__ | ||
+ | |||
+ | Restart your system and/ or decrease your CPU load. | ||
+ | |||
+ | __Solution 2:__ | ||
+ | |||
+ | Increase the time (default 10) before soft lockups are fired. | ||
+ | |||
+ | <code bash >echo 20 > / | ||
+ | or | ||
+ | <code bash> | ||
+ | echo " | ||
+ | |||
+ | sysctl -p / | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ |