ABDURROZAK.MY.ID // DEBIAN LINUX SERVER FUNDAMENTAL
TROUBLESHOOTINGDEBIAN SERVER
Volume 17 dari seri Debian Linux Server Fundamental. Panduan komprehensif teknik troubleshooting server. Setiap command dan script dijelaskan detail dengan penjelasan per baris. Dari server tidak bisa diakses, masalah jaringan, masalah DNS, service gagal berjalan, disk penuh, permission denied, CPU dan RAM tinggi, hingga analisis log.
VOLUME17 / 17
SUB-BAB8
BACA90 MENIT
TROUBLESHOOTING100%
ABDUR ROZAK, S.Kom.
Web Developer & Network Educator - abdurrozak.my.id
VOLUME 17 / 17
TEKNIK TROUBLESHOOTING SERVER
Panduan lengkap Troubleshooting Debian Server. 8 sub-bab mencakup server tidak bisa diakses, masalah jaringan, masalah DNS, service gagal berjalan, disk penuh, permission denied, CPU dan RAM tinggi, hingga analisis log. Setiap command dan script disertai penjelasan detail per baris.
SUB-BAB8LEVELTroubleshootingWAKTU90 MENIT
01
SUB-BAB 01 AKSES
SERVER TIDAK BISA DIAKSES
Diagnosa Server Tidak Bisa Diakses
Ketika server tidak bisa diakses, ada beberapa kemungkinan penyebab: server down, jaringan bermasalah, firewall memblokir, atau service tidak berjalan.
Langkah Diagnosa
DIAGNOSA
# 1. Ping server dari clientping server-ip
# Jika timeout, server mungkin down atau firewall memblokir ICMP# 2. Traceroute untuk cek jalurtraceroute server-ip
# Lihat di hop mana koneksi terputus# 3. Cek port yang terbukanmap server-ip
# Lihat port mana yang terbuka# 4. Cek port spesifiknmap -p 22,80,443 server-ip
# Cek port SSH, HTTP, HTTPS# 5. Cek koneksi ke port spesifiktelnet server-ip 22
# Cek koneksi ke SSHnc -zv server-ip 22
# Cek koneksi ke SSH dengan netcat# 6. Cek DNS resolutionnslookup server-domain
dig server-domain
# 7. Cek dari server (jika bisa akses)sudo systemctl status ssh
sudo systemctl status nginx
sudo systemctl status apache2
# 8. Cek log SSHsudo tail -f /var/log/auth.log
# 9. Cek firewallsudo ufw statussudo iptables -L# 10. Cek service yang berjalansudo systemctl list-units --type=service --state=running
# 1. Restart network servicesudo systemctl restart networking
sudo systemctl restart NetworkManager
# 2. Restart interfacesudo ip link set eth0 down
sudo ip link set eth0 up
# 3. Flush IP addresssudo ip addr flush dev eth0
# 4. Renew DHCPsudo dhclient -r eth0
sudo dhclient eth0
# 5. Flush DNS cachesudo systemd-resolve --flush-caches
sudo resolvectl flush-caches# 6. Restart DNS servicesudo systemctl restart systemd-resolved
# 7. Reset firewallsudo ufw disablesudo ufw enable# 8. Flush iptablessudo iptables -Fsudo iptables -Xsudo iptables -t nat -F# 9. Restart firewall servicesudo systemctl restart ufw
sudo systemctl restart firewalld
# 10. Cek network configurationcat /etc/network/interfaces
cat /etc/netplan/*.yaml
KOMPETENSI SUB-BAB 02
Mampu diagnosa masalah jaringan
Mampu gunakan command network troubleshooting
Mampu restart network service
Mampu flush DNS cache
03
SUB-BAB 03 DNS
MASALAH DNS
Diagnosa Masalah DNS
DIAGNOSA DNS
# 1. Cek DNS configurationcat /etc/resolv.conf
# 2. Test DNS resolutionnslookup google.com
dig google.com
host google.com
# 3. Test dengan specific DNS servernslookup google.com 8.8.8.8
dig @8.8.8.8 google.com
# 4. Test DNS resolution verbosedig +trace google.com
# 5. Cek DNS cachesudo resolvectl statistics# 6. Flush DNS cachesudo systemd-resolve --flush-caches
sudo resolvectl flush-caches# 7. Restart DNS servicesudo systemctl restart systemd-resolved
# 8. Cek DNS service statussudo systemctl status systemd-resolved
# 9. Cek DNS logsudo journalctl -u systemd-resolved
# 10. Test reverse DNSdig -x 8.8.8.8
Solusi Masalah DNS
SOLUSI DNS
# 1. Update DNS configurationsudo nano /etc/resolv.conf
nameserver 8.8.8.8nameserver 8.8.4.4# 2. Flush DNS cachesudo systemd-resolve --flush-caches
# 3. Restart DNS servicesudo systemctl restart systemd-resolved
# 4. Test DNS resolutionnslookup google.com
dig google.com
# 5. Test dengan specific DNS servernslookup google.com 8.8.8.8
# 6. Check DNS service statussudo systemctl status systemd-resolved
# 7. Enable DNS servicesudo systemctl enable systemd-resolved
# 8. Check DNS logsudo journalctl -u systemd-resolved -f
# 9. Test reverse DNSdig -x 8.8.8.8
# 10. Test DNS with verbosedig +trace google.com
KOMPETENSI SUB-BAB 03
Mampu diagnosa masalah DNS
Mampu gunakan nslookup, dig, host
Mampu flush DNS cache
Mampu restart DNS service
04
SUB-BAB 04 SERVICE
SERVICE GAGAL BERJALAN
Diagnosa Service Gagal
DIAGNOSA SERVICE
# 1. Cek status servicesudo systemctl status service-name
sudo systemctl status ssh
sudo systemctl status nginx
sudo systemctl status apache2
sudo systemctl status mysql
sudo systemctl status postgresql
# 2. Cek log servicesudo journalctl -u service-name
sudo journalctl -u ssh
sudo journalctl -u nginx
sudo journalctl -u apache2
# 3. Cek log real-timesudo journalctl -u service-name -f
# 4. Cek log sejak bootsudo journalctl -u service-name -b
# 5. Cek log dengan prioritysudo journalctl -u service-name -p err
# 6. Cek service configurationsudo systemctl cat service-name
# 7. Cek service dependenciessudo systemctl list-dependencies service-name
# 8. Cek service status detailsudo systemctl show service-name
# 9. Reload servicesudo systemctl daemon-reload# 10. Restart servicesudo systemctl restart service-name
# 1. Cek CPU dan RAM usagetophtop# 2. Cek CPU usage per corempstat -P ALL
# 3. Cek CPU usage real-timempstat 1
# 4. Cek RAM usagefree -h
free -m
# 5. Cek top processes by CPUps aux --sort=-%cpu | head -n 10
# 6. Cek top processes by RAMps aux --sort=-%mem | head -n 10
# 7. Cek process treepstree# 8. Cek process detailps -p PID -f
# 9. Cek process childrenpstree -p PID
# 10. Kill processkill PID
kill -9 PID
# 11. Kill process by namekillall process-name
# 12. Check system loaduptimew
# 1. Cek log filetail -f /var/log/syslog
tail -f /var/log/auth.log
tail -f /var/log/nginx/error.log
tail -f /var/log/apache2/error.log
# 2. Cek log file with grepgrep "error" /var/log/syslog
grep "failed" /var/log/auth.log
# 3. Cek log file with multiple patternsgrep -E "error|failed|critical" /var/log/syslog
# 4. Cek log file with countgrep -c "error" /var/log/syslog
# 5. Cek log file with line numbergrep -n "error" /var/log/syslog
# 6. Cek log file with contextgrep -C 5 "error" /var/log/syslog
# 7. Cek log file with before contextgrep -B 5 "error" /var/log/syslog
# 8. Cek log file with after contextgrep -A 5 "error" /var/log/syslog
# 9. Cek log file with recursivegrep -r "error" /var/log/
# 10. Cek log file with case-insensitivegrep -i "error" /var/log/syslog
# 11. Cek log file with invertgrep -v "error" /var/log/syslog
# 12. Cek log file with wordgrep -w "error" /var/log/syslog
KOMPETENSI SUB-BAB 08
Mampu analisis log sistem
Mampu gunakan journalctl
Mampu gunakan grep untuk analisis log
Mampu identifikasi error dari log
VOLUME 17 SELESAI
SELAMAT!
Kamu telah menyelesaikan Volume 17 - Troubleshooting Debian Server. Dari server tidak bisa diakses, masalah jaringan, masalah DNS, service gagal berjalan, disk penuh, permission denied, CPU dan RAM tinggi, hingga analisis log. Kamu sekarang menguasai teknik troubleshooting Debian Server. Seri Debian Linux Server Fundamental telah selesai!
Volume 17 dari seri Debian Linux Server Fundamental - 8 sub-bab Troubleshooting Debian Server.
Fitur Utama:
- Sidebar TOC: Klik sub-bab untuk lompat
- Prev/Next: Tombol navigasi di bawah
- Bookmark: Tandai sub-bab favorit
- Progress Bar: Indikator kemajuan baca
- Copy Code: Klik SALIN untuk copy command
8 Sub-Bab:
01: Server Tidak Bisa Diakses | 02: Masalah Jaringan | 03: Masalah DNS | 04: Service Gagal Berjalan | 05: Disk Penuh | 06: Permission Denied | 07: CPU dan RAM Tinggi | 08: Analisis Log
ABDURROZAK CYBERPUNK v1 - TROUBLESHOOTING DEBIAN SERVER