Blog

Troubleshooting

Linux server troubleshooting

Shell errors, missing packages and PATH problems on Linux servers: what causes them and the exact command that fixes each one.

Windows and RDP

4

SSH and file transfer

8

SSH connection refused: the four causes and how to fix each

'Connection refused' on port 22 means the server said no, not the network. How to check sshd, the port, the firewall and the address, in order.

~6 min03 Oct 2026

ssh: connect to host port 22: Connection timed out? Find where the packets stop

A timeout means your SSH packets get no answer: wrong IP, a server still booting, or a firewall dropping port 22. How to tell which, and fix each one.

~10 min14 Oct 2026

Permission denied (publickey): every reason SSH rejects your key

The SSH connected but your key was refused. The four causes: wrong user, wrong key offered, bad file permissions, or the key was never installed.

~6 min21 Oct 2026

SSH: Too many authentication failures? The agent is the culprit

This error is usually not a wrong password: your SSH agent offered too many keys before the right one. Fix it with IdentitiesOnly and a clean agent.

~5 min08 Aug 2026

Host key verification failed, and WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

Why SSH refuses a changed host key, how to check the new fingerprint is genuine, and the one command that removes the stale entry from known_hosts.

~9 min06 Oct 2026

kex_exchange_identification: Connection reset by peer? Why SSH drops you at once

SSH closes before the login prompt with 'Connection reset by peer'? Usually fail2ban, hosts.deny, MaxStartups or a broken sshd. Find which one.

~11 min14 Oct 2026

client_loop: send disconnect: Broken pipe? Keep idle SSH sessions alive

SSH drops with 'client_loop: send disconnect: Broken pipe' when idle? Set ServerAliveInterval, check NAT timeouts and use tmux so work survives a drop.

~10 min14 Oct 2026

No matching host key type found. Their offer: ssh-rsa (how to fix it)

OpenSSH 8.8 and later refuse ssh-rsa (SHA-1) from old servers. Allow it for one host with HostKeyAlgorithms +ssh-rsa, or give the server an Ed25519 key.

~11 min04 Nov 2026

Linux server administration

7

Cron job not running? Check these seven things in order

Your crontab entry never fires or fails silently? Check the cron service, the syntax, PATH, % signs, permissions, file names and the logs, in that order.

~12 min14 Oct 2026

VPS keeps rebooting: find out why and stop the restart loop

Tell a clean reboot from a crash with the previous boot's journal, then fix the usual causes: auto-reboots, kernel panics, OOM, watchdogs and host events.

~7 min19 Sept 2026

VPS high CPU usage: find the process and fix the cause

A VPS pinned at 100% CPU: find the process with top and ps, tell real load from steal time and I/O wait, spot a cryptominer, and cap what you keep.

~7 min03 Oct 2026

Killed: why Linux kills your process when memory runs out, and how to stop it

A bare 'Killed' or exit code 137 usually means the kernel's OOM killer stepped in. Confirm it in the logs, then fix it with swap, limits or more RAM.

~9 min14 Oct 2026

No space left on device, even when df shows free space

ENOSPC has three causes: a genuinely full disk, exhausted inodes, or a deleted file still held open. How to diagnose and reclaim space for each.

~6 min03 Oct 2026

Read-only file system: why Linux stops writing, and how to repair or remount safely

Read-only file system (EROFS) means the kernel blocks writes: a deliberate ro mount, or ext4 errors. Check findmnt and dmesg, then fsck offline before remount.

~10 min14 Oct 2026

Too many open files on Linux: find the process, raise the right limit, catch the leak

A process hit its open-file limit (EMFILE), 1024 by default under systemd. Check /proc/PID/limits, raise LimitNOFILE or worker_rlimit_nofile, rule out leaks.

~9 min14 Oct 2026

Packages and command not found

34

bash: command not found / zsh: command not found? The three causes and the fix for every tool

Why bash and zsh say 'command not found': the program is missing, not on your PATH, or the name is stale. Diagnose it with type -a and fix PATH for good.

~9 min14 Oct 2026

Exit code 127: 'command not found' in scripts, cron, sudo and Docker

127 means the shell could not find the command. Why it happens in cron, sudo, systemd, npm scripts and Docker, how 126 differs, and a PATH checklist.

~10 min14 Oct 2026

bash: Permission denied? Why your script will not run

Permission denied on a script usually means the execute bit is missing, or the file lives on a noexec mount. How to tell which, and fix both safely.

~5 min08 Aug 2026

bad interpreter: No such file or directory, even though the file is right there

Windows line endings, a wrong shebang or a missing ELF loader make Linux say 'No such file or directory' for a file that exists. Find which one and fix it.

~8 min14 Oct 2026

error while loading shared libraries: cannot open shared object file? How to fix it

A program cannot find a .so file it was linked against. Find what is missing with ldd, install the right package on any distro, or fix the library path.

~8 min14 Oct 2026

sudo: command not found? Install it the right way

sudo is not installed. Become root with su -, run apt install sudo, then usermod -aG sudo USERNAME and log in again. Docker, Alpine, macOS and Windows too.

~10 min11 Oct 2026

systemctl: command not found? You are not on systemd

systemd is not PID 1. In Docker run the program directly, on Alpine use rc-service, on WSL set systemd=true in /etc/wsl.conf, on macOS use brew services.

~7 min11 Oct 2026

zsh: command not found: claude? Install Claude Code and fix PATH

zsh/bash: command not found: claude means Claude Code isn't installed, or ~/.local/bin isn't on PATH. Anthropic's install command and the permanent PATH fix.

~8 min14 Oct 2026

Could not get lock /var/lib/dpkg/lock: the safe fix

Another process holds the apt lock, often unattended-upgrades. How to wait it out, end a stuck process, and clear stale locks without corrupting dpkg.

~5 min08 Aug 2026

E: dpkg was interrupted? Repair a half-finished apt install

Run dpkg --configure -a, and if that fails too, find the package whose script breaks, fix the cause and let apt finish, without touching dpkg's database.

~9 min14 Oct 2026

E: Unable to locate package: why apt cannot find it and how to fix it

apt cannot find the package: an empty index, a disabled component, a wrong name or release. Fixes for Debian 12/13, Ubuntu 22.04/24.04 and Docker.

~8 min14 Oct 2026

apt GPG error NO_PUBKEY: add the repository key the modern way

'The following signatures couldn't be verified … NO_PUBKEY': apt lacks the repo's key. Add it to /etc/apt/keyrings with signed-by; apt-key is deprecated.

~9 min14 Oct 2026

add-apt-repository: command not found? Fix it on Ubuntu and Debian

Install the package that provides it: sudo apt install software-properties-common. Debian 13 dropped it, so add repos with a .sources file or extrepo.

~7 min11 Oct 2026

apt-get: command not found? Find your system's package manager (dnf, apk, brew, winget)

apt-get exists only on Debian and Ubuntu. Check /etc/os-release and use your system's manager: dnf on Rocky and Fedora, apk on Alpine, brew on macOS, winget.

~8 min14 Oct 2026

yum: command not found? Use the right package manager for your system

yum only exists on Red Hat-family systems. Find out what you are running and use apt, dnf, microdnf, apk or Homebrew instead, with a translation table.

~7 min14 Oct 2026

brew: command not found? Fix Homebrew's PATH on Mac and Linux

zsh: command not found: brew means Homebrew's bin folder is not on your PATH. On Apple Silicon, add the brew shellenv line for /opt/homebrew to ~/.zprofile.

~8 min14 Oct 2026

curl: command not found? How to fix it on any Linux distribution

curl is simply not installed. Fix: sudo apt install curl on Debian and Ubuntu, apk add curl on Alpine, dnf install curl on RHEL. Plus sudo, Docker and PATH.

~8 min11 Oct 2026

wget: command not found? Install wget on Linux, macOS and Windows

wget is not installed. Fix: sudo apt install wget on Debian and Ubuntu, brew install wget on macOS, apk add wget on Alpine. Plus Windows, Docker and curl.

~7 min11 Oct 2026

unzip: command not found? Install unzip and zip on any server

unzip and zip are separate packages minimal images leave out. Install them on Debian, Ubuntu, Rocky, Alpine and Docker, or extract with python3 or bsdtar.

~7 min14 Oct 2026

ps: command not found? Install procps (and get top, free and pkill back)

Slim Docker images leave out procps, so ps, top, free, pgrep and pkill vanish together. Install it on Debian, Ubuntu, Rocky or Alpine, or read /proc.

~7 min14 Oct 2026

ping: command not found? Install it on any Linux, and fix Operation not permitted

ping: command not found? Install iputils-ping on Ubuntu and Debian or iputils on RHEL, add it to Docker images, and fix socket: Operation not permitted.

~9 min21 Oct 2026

ifconfig: command not found, plus netstat, ping and the ip replacements

ifconfig and netstat live in the old net-tools package, ping in iputils. Install them on any distro, or use ip and ss, which every modern server has.

~7 min14 Oct 2026

dig, nslookup or host: command not found? Install DNS tools on Linux

dig, nslookup and host ship together: bind9-dnsutils on Debian and Ubuntu, bind-utils on Rocky, bind-tools on Alpine. Install them, or query DNS without.

~7 min14 Oct 2026

make: command not found? Install build tools the right way

make is not installed. Fix: sudo apt install build-essential (Debian, Ubuntu), apk add build-base (Alpine), xcode-select --install (macOS), winget (Windows).

~8 min11 Oct 2026

git: command not found? Install Git on any Linux

Git is not installed. Fix: sudo apt install git (Debian, Ubuntu), apk add git (Alpine), xcode-select --install (macOS), winget install Git.Git (Windows).

~6 min11 Oct 2026

python: command not found? Fix it on Linux, macOS and in Docker

Modern distros ship python3 but no python command. Fix 'python: command not found' on Debian, Ubuntu, Rocky, Alpine, macOS and Docker without breaking apt.

~9 min06 Oct 2026

pip: command not found, and the externally-managed-environment error

zsh or bash says pip: command not found? Use pip3 or python3 -m pip, install python3-pip, and fix externally-managed-environment with a venv or pipx.

~9 min14 Oct 2026

npx: command not found? Fix it on Linux, macOS and Windows

npx comes with npm and Node.js: install Node.js LTS and open a new terminal. Exact fixes for zsh on macOS, bash, sudo, Docker, MCP apps and Windows cmd.

~11 min11 Oct 2026

yarn or pnpm: command not found? Enable them with Corepack or npm

yarn and pnpm do not ship with Node.js. Enable them with Corepack or install them with npm, and fix the Ubuntu cmdtest trap, Docker images and CI runners.

~10 min14 Oct 2026

nvm: command not found? Load nvm in zsh, bash, cron and CI

nvm is a shell function, not a program: its loader lines must run in your shell. Add them to ~/.zshrc or ~/.bashrc, open a new terminal, run command -v nvm.

~8 min14 Oct 2026

vite: command not found? Run the local binary the right way

Run npm install, then npm run dev or npx vite: Vite lives in node_modules/.bin, not on PATH. Fixes sh: 1: vite: not found in Docker and CI, and on Windows.

~8 min11 Oct 2026

conda: command not found? Initialise conda in bash and zsh

Run ~/miniconda3/bin/conda init bash (or zsh), then open a new terminal. Fixes conda: command not found after install, on macOS zsh, cron, Docker, Windows.

~8 min11 Oct 2026

zsh: command not found: npm? Fix npm on macOS, Linux, sudo and cron

npm ships with Node.js. Fix zsh: command not found: npm and bash: npm: command not found on macOS, Ubuntu, Debian, with nvm, sudo, cron and CI.

~11 min04 Nov 2026

pnpm: command not found? Fix it with Corepack, npm or the install script

pnpm is not part of Node.js. Install it with Corepack, npm or the script, then put $PNPM_HOME/bin on PATH to fix ERR_PNPM_GLOBAL_BIN_DIR_NOT_IN_PATH.

~10 min04 Nov 2026

Web servers and HTTP errors

24

nginx 502 Bad Gateway: it is your upstream, not nginx

A 502 means nginx could not reach your app. Read the error log, then fix the four causes: upstream down, wrong socket, timeout, or socket permissions.

~6 min08 Aug 2026

nginx 504 Gateway Timeout: find the slow upstream and fix it

A 504 means nginx waited for PHP-FPM, Node or another upstream and gave up. Read the log, raise the right timeout and fix the slow request behind it.

~10 min14 Oct 2026

nginx 403 Forbidden: the five causes and how to fix each

A 403 from nginx means it found the path but will not serve it: missing index, file permissions, deny rules or SELinux. Read the log, then fix the cause.

~7 min14 Oct 2026

404 Not Found on your own server: find the path nginx or Apache really looked for

404 Not Found means the server answered but found nothing at that path. On your own server a wrong root, alias, try_files or proxy_pass is the usual cause.

~10 min14 Oct 2026

413 Request Entity Too Large (413 Content Too Large): find the layer that says no and raise its limit

A 413 means an upload is bigger than a limit on the way in: nginx allows 1 MB by default, Cloudflare caps by plan, PHP and Apache have their own. Fix each one.

~10 min22 Oct 2026

CORS error: fix “blocked by CORS policy” on the server

A CORS error means the browser blocked your page from reading another origin's response. Fix it on the server: send Access-Control-Allow-Origin, answer OPTIONS.

~10 min14 Oct 2026

400 Bad Request: find out what the server rejected, and fix it

400 Bad Request means the server refused a malformed or oversized request. Fix cookies that grew too large, HTTP sent to an HTTPS port and broken API calls.

~8 min14 Oct 2026

401 Unauthorized: what the server wants, and why your credentials don't arrive

A 401 means the server wants valid credentials and got none. Read WWW-Authenticate with curl -v, fix nginx auth_basic and Bearer tokens, tell 401 from 403.

~8 min14 Oct 2026

403 Forbidden error: what it means and how to fix it

A 403 error means the server understood the request and refuses it. What error 403 means, 401 vs 403 vs 404, and fixes for visitors and site owners.

~11 min21 Oct 2026

408 Request Timeout error: what it means and how to fix it

A 408 error means the server stopped waiting for your request to arrive. What RFC 9110 says, visitor fixes, and nginx, Apache and Node.js timeouts.

~10 min21 Oct 2026

415 Unsupported Media Type: what error code 415 means and how to fix it

Error code 415 Unsupported Media Type means the server rejects the request body's format. Fix the Content-Type in curl, fetch, axios or on the server.

~8 min22 Oct 2026

429 Too Many Requests: tune your nginx limit, or back off from someone else's API

A 429 means a rate limit fired. Find out whose limit it is, tune nginx limit_req so real users get through, and make scripts and bots wait for Retry-After.

~10 min14 Oct 2026

500 Internal Server Error on your server: read the log, then fix the cause

A 500 means your app or web server hit an error it could not handle. Read the log, then fix PHP fatals, memory_limit, .htaccess, permissions or a full disk.

~9 min14 Oct 2026

501 Not Implemented: why the server refuses the method, and how to fix it

A 501 error means the server does not support the request's method or feature. Test it with curl, see what nginx and Apache answer, and fix that layer.

~8 min21 Oct 2026

502 Bad Gateway: what it means and how to fix it

A 502 Bad Gateway means a proxy got an invalid response, or none, from the app behind it. Who shows it, what the log says, and how to fix each cause.

~10 min21 Oct 2026

503 Service Unavailable on your server: find who refused and why

A 503 means your server is up but refusing work: backend down, PHP-FPM out of workers, a rate limit or maintenance mode. Find the source and add Retry-After.

~9 min14 Oct 2026

504 Gateway Timeout error: what it means and how to fix it

A 504 error means a proxy waited for the server behind it and gave up. What 504 Gateway Timeout means, which timeout fired, and how to fix the slow part.

~9 min21 Oct 2026

301 Moved Permanently: what it means and how to set up a 301 redirect

301 Moved Permanently means a URL has a new permanent address. 301 vs 302, 307 and 308, caching, SEO, and setting one up in nginx, Apache and PHP.

~9 min21 Oct 2026

ERR_TOO_MANY_REDIRECTS: find the two rules that loop and fix them

ERR_TOO_MANY_REDIRECTS means two redirect rules send the browser in circles. Behind Cloudflare, Flexible SSL is the usual cause: switch to Full (strict).

~10 min14 Oct 2026

304 Not Modified: what the status code means and when it serves stale files

The 304 error code is not an error: the server confirms a cached copy is current. How ETag and Last-Modified work, and how to fix stale files.

~8 min21 Oct 2026

There has been a critical error on this website: find and fix the WordPress error

"There has been a critical error on this website" is WordPress hiding a PHP fatal error. Find it in debug.log, then fix the plugin, theme or PHP cause.

~9 min21 Oct 2026

PHP memory limit: fix "Allowed memory size exhausted" and raise memory_limit

Fix "Allowed memory size of X bytes exhausted": find the php.ini PHP really uses, raise the PHP memory limit for FPM or WordPress and restart PHP-FPM.

~9 min21 Oct 2026

405 Method Not Allowed: what it means and how to fix it on nginx, Apache and in your app

A 405 error means the URL exists but refuses the HTTP method. Check the Allow header with curl, then fix nginx, Apache, a redirect or your app route.

~11 min04 Nov 2026

HTTP error 431 Request Header Fields Too Large: which server sends it, and how to fix it

HTTP error 431 means the request headers, usually cookies, are too large. Fix it in Chrome, raise the 16 KB Node.js limit, and see why nginx sends 400.

~12 min04 Nov 2026

SSL and browser errors

23

Cloudflare error 520 (web server is returning an unknown error): find what your origin sent back

Error 520 means your server sent Cloudflare an empty, reset or malformed response. Find the cause: a crashed worker, nginx 444, oversized cookies or HTTP/2.

~9 min14 Oct 2026

Cloudflare Error 521 (web server is down): find out why your origin refuses Cloudflare

Error 521 means your origin refused Cloudflare's connection: web server stopped, port 80/443 closed, SSL mode mismatch or a firewall banning Cloudflare IPs.

~10 min14 Oct 2026

Cloudflare error 522 (connection timed out): find what drops Cloudflare at your origin

Error 522 means Cloudflare got no answer from your server within 19 seconds. Find the cause at the origin: firewall, wrong DNS IP, fail2ban bans or overload.

~10 min12 Oct 2026

Cloudflare error 523 "Origin is unreachable": find the dead route to your server

Cloudflare error 523 means Cloudflare has no network route to your origin IP: an old or private IP in the A record, a dead AAAA, or a server off the network.

~8 min14 Oct 2026

Cloudflare error 524 (a timeout occurred): when your origin needs more than 125 seconds

Error 524 means your server took longer than Cloudflare's 125-second limit to answer. Find the slow request, then move long jobs to a queue or a DNS-only host.

~9 min14 Oct 2026

Cloudflare error 525: SSL handshake failed, and how to fix it

Error 525 means Cloudflare couldn't complete a TLS handshake with your origin. Check the SSL/TLS mode, confirm port 443 is listening, and test the handshake directly.

~7 min14 Oct 2026

Cloudflare error 526 (invalid SSL certificate): causes and fix

Error 526 means Cloudflare's Full (strict) mode rejected your origin's certificate: expired, self-signed, wrong hostname or an incomplete chain. How to fix it.

~7 min14 Oct 2026

Your connection is not private: what each NET::ERR_CERT code means and how to fix it

Your connection is not private means the site's certificate failed a check: expired, untrusted (self-signed) or for another name. Visitor checks and fixes.

~9 min14 Oct 2026

NET::ERR_CERT_DATE_INVALID: fix the clock or renew the certificate

NET::ERR_CERT_DATE_INVALID means a certificate is expired or not yet valid by your clock. Fix the clock, or find which certificate expired and renew it.

~10 min21 Oct 2026

NET::ERR_CERT_AUTHORITY_INVALID: what it means and how to fix it

NET::ERR_CERT_AUTHORITY_INVALID means the browser cannot chain the certificate to a trusted root. Fixes for visitors and site owners, with openssl checks.

~11 min22 Oct 2026

SSL handshake failed: find the cause with openssl s_client and fix it in nginx

SSL handshake failed means client and server could not agree on encryption or the certificate was rejected: expired, missing chain, wrong name or TLS version.

~11 min14 Oct 2026

ERR_SSL_PROTOCOL_ERROR: why this site can't provide a secure connection, and how to fix it

ERR_SSL_PROTOCOL_ERROR means the reply Chrome got is not valid TLS, most often plain HTTP on port 443. Quick checks for visitors, then the server fixes.

~10 min14 Oct 2026

ERR_SSL_VERSION_OR_CIPHER_MISMATCH: find the cause and fix it

ERR_SSL_VERSION_OR_CIPHER_MISMATCH: browser and server share no TLS version or cipher. Find the cause with openssl and fix nginx, Apache or IIS.

~10 min22 Oct 2026

This site can't be reached: what each Chrome error code means and how to fix it

"This site can't be reached" means Chrome got no connection. The code under it (NXDOMAIN, refused, timed out) says why: fixes for visitors and owners.

~11 min21 Oct 2026

ERR_CONNECTION_REFUSED: why your server says no, and how to fix it

ERR_CONNECTION_REFUSED means the server said no: nothing listens on the port, the app is bound to 127.0.0.1 or a firewall rejects it. How to fix each one.

~9 min14 Oct 2026

ERR_CONNECTION_TIMED_OUT: find where your packets disappear

ERR_CONNECTION_TIMED_OUT means nothing answered: a firewall drops the port, DNS points elsewhere or the server is overloaded. How to find which, and fix it.

~10 min14 Oct 2026

ERR_CONNECTION_RESET: find who sent the reset and fix it

ERR_CONNECTION_RESET means a TCP reset killed the connection after it opened. If every site fails, check VPN, proxy, antivirus; if one, its server or firewall.

~10 min14 Oct 2026

ERR_NETWORK_CHANGED: why Chrome says a network change was detected

Network changes detected mid-load make Chrome show ERR_NETWORK_CHANGED. Causes: VPN, Wi-Fi roaming, IPv6, virtual adapters. The fixes, in order.

~7 min22 Oct 2026

DNS_PROBE_FINISHED_NXDOMAIN: what Chrome is telling you, and the fix on both sides

DNS_PROBE_FINISHED_NXDOMAIN means your DNS works but this one name did not resolve. Fixes for visitors, and dig checks that find a site owner's missing record.

~11 min12 Oct 2026

SSL_ERROR_RX_RECORD_TOO_LONG: plain HTTP answered where TLS was expected

Firefox's SSL_ERROR_RX_RECORD_TOO_LONG means the server answered in plain HTTP where TLS was expected. Confirm with curl and openssl, fix it in nginx or Apache.

~6 min14 Oct 2026

PR_END_OF_FILE_ERROR in Firefox: what cuts the secure connection and how to fix it

PR_END_OF_FILE_ERROR means Firefox's secure connection was closed mid-handshake. Fix the proxy, VPN, antivirus or settings, or the server's TLS setup.

~8 min21 Oct 2026

ERR_CACHE_MISS: why Chrome asks you to confirm form resubmission, and how to fix it

ERR_CACHE_MISS shows when you go Back to a page a form produced. What visitors can safely do, and the Post/Redirect/Get fix for sites, tested in Chrome.

~9 min04 Nov 2026

ERR_QUIC_PROTOCOL_ERROR: fix it in Chrome and on your server

ERR_QUIC_PROTOCOL_ERROR means a QUIC (HTTP/3, UDP 443) connection broke. Fix it in Chrome, or as site owner open UDP 443 and check nginx and Cloudflare.

~10 min04 Nov 2026

Networking and DNS

3

Docker, databases and apps

6