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:47] – lunetikk | linux:general:troubleshooting [2019/06/06 13:22] – 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 " |
< | < | ||
Line 29: | Line 68: | ||
kernel: [372139] XFS (dm-2): xfs_log_force: | 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 60: | 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. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ |