Anonymous
×
Create a new article
Write your page title here:
We currently have 27 articles on PhenixOps. Type your article name above or click on one of the titles below and start writing!



PhenixOps
27Articles

Tipsandtricks: Difference between revisions

No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Template structure ===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 7: Line 9:
| How to fix it
| How to fix it
|}
|}
 
=== Template Example ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Cannot connect to database
! Cannot connect to database
|-
|-
| Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from.  
| Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from. See if the service is running and if you can connect locally. This should usually provide some info to start troubleshooting from.
|-
|-
| Check load on database server using '''''top'''''
! Actions
|-
|Log the start of the incident and indicators
|-
|Check monitoring
|-
|Check the logging '''''less /var/log/mysql.log'''''
|-
|Check mysqld service '''''service mysqld status'''''
|-
|Check load on database server using '''''top'''''
|-
|-
|Check the ports using '''''nmap -Pn localhost'''''
|Check the ports using '''''nmap -Pn localhost'''''
Line 20: Line 32:
|Check the ports from remote using '''''nmap -Pn databasehost'''''
|Check the ports from remote using '''''nmap -Pn databasehost'''''
|-
|-
|Check the logging '''''less /var/log/mysql.log'''''
|Try to login locally on the database server '''''mysql -u root -p'''''
|-
|Try to login from the remote host '''''mysql -h databasehost -u dbusername -p'''''
|-
! Fixing (you might kill the webserver/monitoring first)
|-
|Restart mysql service '''''service mysqld restart'''''
|-
|Follow the logging '''''tail -f /var/log/mysql.log'''''
|-
|Check mysql service '''''service mysqld status'''''
|-
|Last resort '''''reboot''''' perhaps check most recent backup first
|-
|Restore most recent backup, dump the database first
|-
! Post actions
|-
|-
| Try to login locally on the database server '''''mysql -u root -p'''''
|Reactivate monitoring
|-  
|Log actions and problem resolution
|-
|-
! Fixing (you might kill your webserver/application first)
|Keep an eye on monitoring and logfiles
|-
|-
| Restart mysql service '''''service mysqld restart'''''
|Log rootcause, lessons learned and pending actions
|}
|}

Latest revision as of 20:49, 16 April 2020

Template structure

Issue description
How to troubleshoot it
How to fix it

Template Example

Cannot connect to database
Check if mysqld is running and if the ports are available on the localhost and from the host you try to connect from. See if the service is running and if you can connect locally. This should usually provide some info to start troubleshooting from.
Actions
Log the start of the incident and indicators
Check monitoring
Check the logging less /var/log/mysql.log
Check mysqld service service mysqld status
Check load on database server using top
Check the ports using nmap -Pn localhost
Check the ports from remote using nmap -Pn databasehost
Try to login locally on the database server mysql -u root -p
Try to login from the remote host mysql -h databasehost -u dbusername -p
Fixing (you might kill the webserver/monitoring first)
Restart mysql service service mysqld restart
Follow the logging tail -f /var/log/mysql.log
Check mysql service service mysqld status
Last resort reboot perhaps check most recent backup first
Restore most recent backup, dump the database first
Post actions
Reactivate monitoring
Log actions and problem resolution
Keep an eye on monitoring and logfiles
Log rootcause, lessons learned and pending actions