DevOps Kit Lessons Free · Error decoder

Error Decoder — Find Your Error, Fix It

Free

What this is and why it matters

The error decoder is your first aid page: find your error message here and it tells you the fix.

When a lab stops, it prints an error message. That message tells you exactly what broke. Guessing wastes hours. Reading the message tells you the fix.

Think of a car dashboard light. The light does not mean "the car is broken, give up". It means "check the oil" or "a door is open". The light names the problem. An error message is the same: it names the problem, and this page tells you the fix.

Every entry on this page has three parts: what the error means, the one fix to run, and how to check the fix worked.

Reference tool
This page supports every topic — use it whenever you are stuck. It has no ladder of its own.

How to use this page

  1. Look at your terminal. The error is the last few lines on the screen, after the command you ran. The most useful line is usually the LAST line, or the line with the word "error" in it. Lines above it are history — read the last lines first.
  2. Copy the exact error line. Do not retype it from memory — copy it, so you do not change a word by accident.
  3. Press Ctrl+F on Windows or Linux, or Cmd+F on a Mac. A small search box appears. Type part of the error message — two or three words that look unusual, for example permission denied or port is already allocated. The page jumps to the entry that matches.
  4. Read what the error means, run the one fix, then run the check. If the check passes, move on. If the check fails, read the NEW error and find it on this page again.
  5. If nothing here matches your error, go to the last section, "Nothing here matches your error". Do not guess.

Where errors appear: errors appear in your terminal, on the screen, right after the command you ran. They are plain text lines, sometimes starting with "Error" or "error". Some are long and wrap over two or three lines. Copy the whole line, including the parts that look like file paths and numbers — those parts name the exact place that broke.

One error can cause many errors. If Docker itself is not running, every Docker command fails with a different-looking error. Fix the FIRST error first — the one at the top of the chain. In practice that usually means: is Docker running? Then: are the boxes up? Then: is the name spelled right? Work down that order before trying exotic fixes.

Words you need here

Read this list first. The error messages use these words, and none of them is explained inside the error itself.

  • Docker — a tool that runs small sealed boxes on your machine. Each box holds one program and everything that program needs.
  • Container — one sealed box run by Docker. For example web2 is one container. A container has a name and a state: running ("Up") or stopped ("Exited").
  • Image — the recipe Docker uses to build a box. A box is a running image. nginx is an image name. nginx:99.0 is an image name plus a tag.
  • Tag — the version label after the : in an image name. nginx:1.27-alpine means the NGINX image, version 1.27, small edition. nginx:latest means "the newest version". A tag that does not exist gives a "manifest not found" error.
  • Manifest — the list Docker downloads to find an image. "Manifest not found" means "there is no image with that name and tag". The image does not exist, or the tag is wrong.
  • Daemon — a background program. The Docker daemon is the Docker program itself, running behind the scenes on your machine. When the daemon is not running, Docker commands cannot talk to it.
  • Socket — a door a program listens on, for other programs on the same machine to talk to it. Docker's socket is a file at /var/run/docker.sock. "Cannot connect to the Docker daemon socket" means "Docker is not running, so there is nobody behind that door".
  • Service — one named job in the file docker-compose.yml. Each service becomes one container. For example web2 is a service in the load-balancer lab, and also the name of its container.
  • docker-compose.yml — a recipe file. It lists the services, what image each one uses, and how they talk to each other. It lives inside each lab folder, for example phase1/load-balancer-lab/docker-compose.yml.
  • YAML — the plain-text format docker-compose.yml is written in. Its rules are strict: spaces matter, tabs are not allowed, and every : needs a space after it. Most compose errors are YAML spacing mistakes.
  • Port — a door number on a machine. Two programs cannot use the same door at the same time. "Port is already allocated" means "another program already holds this door".
  • localhost — a name that means "this machine". localhost:8080 means "my own machine, door 8080".
  • Bind — to claim a door. "Bind failed: port is already allocated" means "I tried to claim door 8080, but something else already claimed it".
  • Network — a private set of wires between containers. Compose makes one network per lab, so the boxes in one lab can talk to each other by name. "Network not found" means the lab's network is missing.
  • Volume — a named storage area Docker keeps on your machine, so data survives a restart. Deleting volumes deletes the data.
  • Health check / healthy — a test Docker runs inside a box to ask "are you really working?" A box can be running but not healthy — running means the program started, healthy means it also answers correctly. "Timeout waiting for container to become healthy" means the box never passed its test.
  • PATH — the list of folders your terminal searches when you type a command name. "Executable file not found in $PATH" means "I looked in every folder on that list and did not find a program with that name". The program is not inside that box — it lives in a different box.
  • Terminal / shell — the black window where you type commands. bash is the name of the command language the terminal speaks. A .sh file is a script written in that language.
  • sudo — a command that means "run the next command as the machine's boss". The boss is called "root". Some commands need boss rights, for example starting Docker or adding a user to a group. Your machine may ask for your password when you use sudo.
  • Replica / standby — a live copy of a database. It takes reads only. You cannot write to it. Trying to write to it gives a "read-only" error, and that error is CORRECT — it means the copy is working as designed. Write to the main database instead.
  • Main / primary database — the database that takes writes. In this kit's end-to-end lab it is called postgres-primary.
  • Broker — Kafka's word for one of its servers. A broker holds topics and hands messages to readers.
  • Topic — one named channel inside Kafka. Messages on the same topic are about the same thing. This kit uses a topic called orders.
  • Leader — the one broker in charge of one topic right now. A topic with no leader yet is still starting up. Wait a minute.
  • Metadata — information about the cluster: which topics exist, which broker leads each one. "Topic not present in metadata" means "this cluster does not know any topic with that name".
  • Upstream — NGINX's word for the list of backends. The load balancer sends visitors to the backends in its upstream list.
  • 502 Bad Gateway — an answer code. It means "the guard is up, but no backend answered it". The guard works; a backend is down.
  • Module — one package of Python code. ModuleNotFoundError: No module named 'kafka' means "Python looked for the Kafka package and did not find it installed".
  • pip — the tool that installs Python packages. pip install <name> downloads and installs a package by name.
  • Permission denied — the machine saying "you are not allowed to do that to this file". Usually the file is not marked as runnable, or your user may not talk to Docker.
  • Exit / Exited — a box that ran and then stopped. Check its diary (log) for the error line.

A warning about names in this page — read before you copy any command

Some entries below use container names that are right in one lab and wrong in another. Each lab names its own boxes. Do not copy a name blindly — always check the real name first with the command below, and use the name it shows:

Try it Yourself »Open the practice terminal and run it yourself — nothing installs. Free. Simulation — practice version. The real thing is finding your error and running the fix.
Command
docker compose ps
  • docker compose — the tool, reading the recipe file.
  • ps — show the boxes from this recipe and their state.

Run it from inside the lab folder you are working in. Use one of the names in its table. That name is the truth for your lab.

The names, lab by lab — checked against each lab's own recipe file:

| Lab | Real names in that lab | |---|---| | PostgreSQL lab, Part 1 (phase1/postgresql-lab/) | pg-primary (main database), pg-replica (standby) | | Kafka lab (phase1/kafka-lab/) | kafka-a, kafka-b, mm2 | | Redis lab (phase1/redis-lab/) | redis-a (main store), redis-b (copy) | | Object-store lab (phase1/object-store-lab/) | moto-a, moto-b, awscli, mirror | | Load-balancer lab (phase1/load-balancer-lab/) | lb, web1, web2, web3 | | End-to-end lab (phase1/end-to-end/) | postgres-primary, postgres-replica, kafka, redis, moto, lb, web1, web2, web3, ingest, worker |

So pg-primary, kafka-a and redis-a are REAL names — but only in their own single-topic labs. In the end-to-end lab the same jobs are called postgres-primary, kafka and redis. Every entry below says which lab its name belongs to, and gives the end-to-end name next to it where the two differ.

There are also TWO different ways to run a command inside a box, and the entries below mix them:

  • docker compose exec <service> <command> — run a command inside a box from THIS recipe. <service> is the service name from docker-compose.yml, for example postgres-primary. Use this form inside a lab folder. It is the form the labs themselves use.
  • docker exec <container> <command> — run a command inside a box by its container name, for example pg-primary. This form works from any folder, but you must know the exact container name.

If a command below fails with "No such container", you used the wrong form or the wrong name. Run docker compose ps and try again with the name it shows.

Docker

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Where you see it: in your terminal, after any docker command.

What it means, in plain words: Docker itself is not running on your machine. The command tried to talk to Docker through its socket — the door at /var/run/docker.sock — and nobody answered, because Docker is off. "Daemon" is the Docker program running behind the scenes. "unix:///var/run/docker.sock" is the address of its door. Nothing is broken in your lab — Docker just is not on.

The fix: start Docker. On Docker Desktop, open the Docker app and wait until it says it is running. On Linux, run the command below.

Command
sudo systemctl start docker

Word by word:

  • sudo — run the next command as the machine's boss. Starting Docker needs boss rights.
  • systemctl — the tool that starts and stops background programs on Linux.
  • start docker — start the Docker program.

Check it worked: run docker ps. docker is the tool. ps means "show the boxes that are running". It should print a list — even an empty list — with no error. An empty list with no error means Docker is running and no boxes are up yet. That is a pass.

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

Where you see it: in your terminal, after any docker command.

What it means, in plain words: Docker is running, but your user is not allowed to talk to it. You are knocking on the right door, but your name is not on the allowed list. "Permission denied" is the machine saying "you may not do that".

The fix: add your user to the docker group. A group is a list of users allowed to do something. The command below adds your user to the group called docker. Then log out and log back in — logging out makes the machine re-read the group list — or run newgrp docker instead, which switches your terminal into the group at once without logging out.

Command
sudo usermod -aG docker $USER

Word by word:

  • sudo — run as the machine's boss. Changing groups needs boss rights.
  • usermod — change a user. Short for "user modify".
  • -aG docker — add to a group. -a means "append" — add to the list, do not replace it. -G docker means "the group called docker". Together: add this user to the docker group, and keep all the groups they already have.
  • $USER — your own user name. $USER is a shortcut the terminal fills in with your name by itself. You do not type your name — type $USER exactly.

Then log out and log back in, or run:

Command
newgrp docker
  • newgrp — switch this terminal into a new group. Short for "new group".
  • docker — the group to switch into.

Check it worked: run docker ps with no sudo in front of it. It should print a list with no error. If it still says "permission denied", you did not log out and back in yet — the group change only takes effect after a fresh login, or after newgrp docker.

docker: command not found

Where you see it: in your terminal, after any docker command.

What it means, in plain words: Docker is not installed, or your terminal cannot find it. "Command not found" means the terminal searched every folder on its PATH list and found no program called docker.

The fix: install Docker Desktop (or Docker Engine on Linux), then open a NEW terminal window. A new terminal is needed because the old one does not know about the new program yet.

Check it worked: run docker --version. docker is the tool. --version means "print your version number". It should print a version number, for example Docker version 24.0.0. Any version number is a pass.

docker: 'compose' is not a docker command.

Where you see it: in your terminal, after a docker compose command.

What it means, in plain words: your Docker is too old to have the Compose plugin. Compose is the part of Docker that reads docker-compose.yml and runs a whole lab at once. Old Docker does not have it built in.

The fix: update Docker Desktop to the newest version. On an old setup, try docker-compose (with a hyphen) instead of docker compose (with a space). The hyphen version is the old separate Compose program. The space version is the new built-in one. They do the same job — the name is the only difference.

Check it worked: run docker compose version. It should print a version number. Any version number is a pass.

Error response from daemon: No such container: web2

Where you see it: in your terminal, after a command that names a container, for example docker compose stop web2. This example comes from the load-balancer lab, where web2 is one of the three backends — your error shows your real container name.

What it means, in plain words: no container with that name exists. You typed the name wrong, or the container was removed — for example by a docker compose down, which removes boxes.

The fix: run docker compose ps and use one of the names it shows. ps shows the boxes from this recipe and their state. Copy the name exactly as shown — names are case-sensitive, so Web2 is not web2.

Check it worked: the name you want appears in docker compose ps.

Error response from daemon: Container <container id> is not running

Where you see it: in your terminal, after a command that needs a running container, for example docker compose exec.

What it means, in plain words: the container exists, but it is stopped. <container id> is a long code that names one box — your error shows the real code, not the words "container id". The box is there, it is just off.

The fix: start it again, for example:

Command
docker compose start web2
  • docker compose start — start a box that was stopped earlier.
  • web2 — the box to start. Replace with the real name from your error or from docker compose ps.

Check it worked: run docker compose ps. The container shows with STATUS "Up". "Up" means running.

Error response from daemon: pull access denied for my-image, repository does not exist or may require 'docker login'

Where you see it: in your terminal, when Docker tries to download an image.

What it means, in plain words: the image name is wrong, the image is private, or you are not logged in. "Pull" means download. "Access denied" means Docker was not allowed to fetch it. "Repository" is the shelf the image lives on. my-image in the error is an example name — your error shows the real image name.

The fix: check the spelling of the image name, letter by letter, against docker-compose.yml or the lesson. If the image is private, run docker login first, then try again. docker login means "log into Docker's image shelf with my account". It asks for your user name and password.

Check it worked: run docker pull <image-name> — replace <image-name> with the real image name — and it finishes with no error. "Finishes with no error" means the last lines say the image was downloaded or is already there, with no "denied" line.

Docker Compose

yaml: line 4: mapping values are not allowed in this context

Where you see it: in your terminal, after a docker compose command. The number 4 is the line number in YOUR file — your error shows your real line number.

What it means, in plain words: a spacing or colon mistake in docker-compose.yml. The usual cause is a missing space after a colon — image:nginx instead of image: nginx — or a tab character. YAML, the format the file is written in, does not allow tabs. "Mapping values" is YAML's word for the key: value pairs in the file. The error says: "on this line, the pairs do not make sense".

The fix: open the file at the line number in the error, fix the spacing, and use spaces only. The file is docker-compose.yml in the lab folder you are working in — for example phase1/load-balancer-lab/docker-compose.yml. Open it with any plain-text editor. Check the line the error names, and the lines just above it. Then run docker compose config to check the file. config means "read the recipe file and print it back". It prints the file with no error if the file is correct.

Check it worked: run docker compose config. It prints the file back with no error.

service "web" has neither an image nor a build context specified

Where you see it: in your terminal, after a docker compose command. "web" is the service name in YOUR file — your error shows your real service name.

What it means, in plain words: a service in docker-compose.yml has no image: and no build: — Compose does not know what to run for it. Every service needs one of the two: either an image to download (image:), or a recipe to build one (build:). This service has neither, so Compose has nothing to start.

The fix: add an image: line (for example image: nginx:1.27-alpine) or a build: block to that service in the file. Open docker-compose.yml in the lab folder, find the service the error names, and add the missing line under it. image: nginx:1.27-alpine means "download and run the NGINX image, version 1.27, small edition" — pinned to a version, as this kit's rule requires, never bare nginx with no tag.

Check it worked: run docker compose config. It prints no error.

Error response from daemon: network <name> not found

Where you see it: in your terminal, after a docker compose up command. <name> is the network name in YOUR file.

What it means, in plain words: the compose file asks for a network that does not exist on your machine. A network is the private set of wires between the boxes in one lab. If the file names a network by hand and that network was deleted, the boxes have nothing to connect to.

The fix: run docker compose down and then docker compose up -d again, so Compose makes its own network. down stops and removes the boxes. up -d starts them again in the background, and Compose creates a fresh network for them. If the file names a network by hand, remove that networks: line from docker-compose.yml — then Compose makes its own network and you do not have to manage one.

Check it worked: run docker compose ps. The containers show with STATUS "Up".

Ports

Bind for 0.0.0.0:8080 failed: port is already allocated

Where you see it: in your terminal, after a docker compose up command. 8080 is the door in YOUR lab — your error shows your real door number.

What it means, in plain words: another container (or another program) already uses port 8080. "Bind" means "claim this door". 0.0.0.0:8080 means "door 8080 on every address of this machine". "Port is already allocated" means "this door is already taken". Two programs cannot use the same door at the same time.

The fix: run docker compose ps to find the container using it, and stop that one first — for example, another copy of the same lab still running. Or change the port number in docker-compose.yml (for example, change 8080 to 8081) and try again. If you change the number, remember the new number: you will visit http://localhost:8081/ instead of http://localhost:8080/.

Check it worked: run docker compose up -d. It starts with no error.

listen tcp 0.0.0.0:8080: bind: address already in use

Where you see it: in your terminal, after a docker compose up command, or in a box's diary lines.

What it means, in plain words: something on your machine already holds port 8080, so nothing else can use it. This is the same problem as the entry above, seen from the other side: the first entry is Docker reporting it, this one is a program inside a box reporting it. "Listen" means "wait for visitors on this door". "Address already in use" means the door is taken.

The fix: stop the program that holds the port, or use a different port (for example, open http://localhost:8081 instead). To find the program holding the port, stop the other lab that uses it — usually another copy of the same lab still running. Check with docker compose ps in each lab folder you have open.

Check it worked: run curl http://localhost:8080/ and it answers — curl fetches the page and prints it — or the new port answers if you changed the number.

PostgreSQL

psql: error: connection to server at "localhost" (::1), port 5432 failed: Connection refused

Where you see it: in your terminal, after a psql command (the PostgreSQL command tool).

What it means, in plain words: no database is listening on that port. The database is not up. "Connection refused" means "I knocked on door 5432 and nobody answered". localhost means your own machine. 5432 is the database's door number. (::1) is the machine's address in the newer address format — you can ignore it.

The fix: run docker compose ps from inside the lab folder. If the database is not "Up", run docker compose up -d and wait a minute. up -d starts the boxes in the background. A database takes a minute to be ready even after its box says "Up".

Check it worked: run the command below. It asks the database a trivial question — "what is 1?" — and the database answers with a row.

In the PostgreSQL lab (Part 1), the main database box is called pg-primary:

Command
docker exec pg-primary psql -U learner -d practice -c "SELECT 1;"

In the end-to-end lab, the same box is called postgres-primary, so the command is:

Command
docker compose exec postgres-primary psql -U learner -d practice -c "SELECT 1;"

Word by word:

  • docker exec — run a command inside a box by its container name. docker compose exec is the same idea, but it reads the recipe in this folder and uses the service name.
  • pg-primary — the database box in the PostgreSQL lab. In the end-to-end lab use postgres-primary instead. Use the name docker compose ps shows in YOUR lab.
  • psql — the database command tool.
  • -U learner — connect as the user called learner. -U means "user".
  • -d practice — use the database called practice. -d means "database".
  • -c "SELECT 1;" — run this one question, then stop. SELECT 1; means "show me the number 1". It is a test question with a known answer.

It should answer with a row showing 1. Any row with 1 is a pass.

psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "learner"

Where you see it: in your terminal, after a psql command.

What it means, in plain words: the password (or the user name) is wrong. "FATAL" means the database refused the connection completely — this is not a warning, it is a no. "Authentication" means proving who you are with a user name and password. The database checked yours and said no.

The fix: open docker-compose.yml in the lab folder and check the password there. Look for the line that says POSTGRES_PASSWORD — that is the password the database was started with. Use exactly that password and user name in your command. Passwords are case-sensitive: Learn1234 is not learn1234. Copy it, do not retype it from memory.

Check it worked: the same psql command connects and answers. No "FATAL" line, just the answer to your question.

ERROR: cannot execute INSERT in a read-only transaction

Where you see it: in your terminal, after an INSERT command (an instruction to add a row). This happens in the PostgreSQL lab when you write to the standby, or in the end-to-end lab after failover if you write to the old stopped main database's copy.

What it means, in plain words: you tried to write on the standby (replica). A standby takes reads only. This is correct — do not try to fix it. A standby is a copy. It is supposed to refuse writes, so the copy never drifts away from the main database. "Read-only transaction" means "this connection may only read". INSERT means "add a row" — a write. The standby refused a write, which is its job.

The fix: run the INSERT on the main database instead. In the PostgreSQL lab the main database box is called pg-primary:

Command
docker exec pg-primary psql -U learner -d practice -c "INSERT INTO orders VALUES (104, 'pen stand', 120);"

In the end-to-end lab the main database box is called postgres-primary:

Command
docker compose exec postgres-primary psql -U learner -d practice -c "INSERT INTO orders VALUES (104, 'pen stand', 120);"

Word by word: run psql inside the MAIN database box, as user learner, in database practice, and run the command INSERT INTO orders VALUES (104, 'pen stand', 120);. INSERT INTO orders means "add a row to the table called orders". VALUES (104, 'pen stand', 120) means "the row holds 104, pen stand, 120". The numbers and words are the example order from the end-to-end lab — use your own order's values.

Check it worked: the INSERT on the main database prints INSERT 0 1. That line means "one row added". INSERT 0 1 is the database's way of saying "done, 1 row".

ERROR: relation "orders" already exists

Where you see it: in your terminal, after a CREATE TABLE step.

What it means, in plain words: the table orders is already made. You ran the CREATE step twice. "Relation" is the database's word for a table. "Already exists" means it is already there — nothing is broken, you just repeated a step.

The fix: skip the CREATE part and run only the INSERT. Or drop the table first with DROP TABLE orders; and start the step again. DROP TABLE orders; means "delete the table called orders". Only do this if you are sure the data in it is fake practice data — dropping a table deletes its rows.

Check it worked: run the command below and it shows the rows. In the PostgreSQL lab:

Command
docker exec pg-primary psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;"

Use postgres-primary instead of pg-primary in the end-to-end lab: docker compose exec postgres-primary psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;". SELECT * FROM orders ORDER BY id; means "show me everything from the table called orders, sorted by id". It should show the rows, with no error.

FATAL: database "practice" does not exist

Where you see it: in your terminal, after a psql command.

What it means, in plain words: the database name in your command is wrong. The database you asked for was never created. "FATAL" means the connection was refused completely.

The fix: use the name from the lab. In Part 1 of the PostgreSQL lab the name is practice. In the Patroni part the name is postgres. Patroni is the tool for automatic failover, shown in the Patroni part of the PostgreSQL lab. Check which part you are in, and use its name. The name goes after -d in your command, for example -d practice.

Check it worked: psql connects, and SELECT * FROM orders; shows rows — or "no rows" for an empty table, which is not an error. "No rows" means the table exists but is empty. That is a pass. An error line is a fail.

Redis

(error) NOAUTH Authentication required.

Where you see it: in your terminal, after a redis-cli command (the Redis command tool).

What it means, in plain words: this Redis store needs a password, and you gave none. "NOAUTH" means "no authentication was given". "Authentication required" means "you must prove who you are first". Redis is refusing to talk to a stranger.

A warning before you fix it: this kit's Redis stores have NO password set. The Redis lab's recipe file (phase1/redis-lab/docker-compose.yml) and the end-to-end lab's recipe file set no password anywhere — there is no password line to look up. So if you see NOAUTH while doing a kit lab, you are not talking to this kit's Redis at all: check you are in the right lab folder, and that the store you are talking to is the kit's one (redis-a in the Redis lab, redis in the end-to-end lab). Do not invent a password — there is none to find in this kit. The fix below is for a Redis outside this kit that really does have a password.

The fix (for a password-protected Redis): add the password to the command with -a, for example:

Command
docker exec redis-a redis-cli -a <your-password> ping

Word by word:

  • docker exec redis-a — run a command inside the box called redis-a. That name is real in the Redis lab. In the end-to-end lab the counter store is called redis — use the name docker compose ps shows in YOUR lab.
  • redis-cli — the Redis command tool.
  • -a <your-password> — use this password. -a means "authenticate with". Replace <your-password> with the real password — and type the password itself, not the words "your-password". Use the password from your compose file: look for the password line in docker-compose.yml in the lab folder.
  • ping — a test word. It means "are you there?" Redis answers PONG if it hears you.

Check it worked: the command answers PONG. PONG is Redis's way of saying "yes, I am here". Any PONG is a pass.

(error) READONLY You can't write against a read only replica.

Where you see it: in your terminal, after a Redis write command such as SET. This happens in the Redis lab when you write to the copy.

What it means, in plain words: you tried to write on the copy (redis-b). A one-way copy takes reads only. This is correct — do not try to fix it. The copy is supposed to refuse writes, so it never drifts away from the main store. SET means "store this value" — a write. READONLY means "this store only reads".

The fix: write on the main store instead. In the Redis lab the main store is called redis-a:

Command
docker exec redis-a redis-cli SET user:102 Ravi

In the end-to-end lab there is no copy at all — there is only one store, called redis — so the same write there is:

Command
docker compose exec redis redis-cli SET user:102 Ravi

Word by word: run redis-cli inside the MAIN store's box, and run SET user:102 Ravi. SET means "store". user:102 is the key — the name the value is stored under. Ravi is the value. Together: store the value Ravi under the name user:102.

Check it worked: the SET on the main store prints OK. OK means the value was stored.

Kafka

Topic 'orders' already exists.

Where you see it: in your terminal, after a Kafka command that creates a topic. This happens in the Kafka lab.

What it means, in plain words: the topic orders is already made. You ran the create step twice. A topic is one named channel inside Kafka. "Already exists" means it is already there — nothing is broken, you just repeated a step.

The fix: skip the create step and move on.

Check it worked: run the command below. It lists the topics on the cluster. orders should be in the list. In the Kafka lab the message queue box is called kafka-a:

Command
docker exec kafka-a /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list

In the end-to-end lab the message queue box is called kafka:

Command
docker compose exec kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list

Word by word:

  • docker exec kafka-a — run a command inside the box called kafka-a. That name is real in the Kafka lab. In the end-to-end lab use kafka instead — check with docker compose ps.
  • /opt/kafka/bin/kafka-topics.sh — the Kafka topics tool, at its full path inside the box. A .sh file is a script. This one manages topics: create, list, delete.
  • --bootstrap-server localhost:9092 — talk to the Kafka server at localhost, door 9092. "Bootstrap server" means "the first server to ask, which then tells you about the rest". localhost means this machine. 9092 is Kafka's door number.
  • --list — list the topics. Print their names.

The command should show orders in the list.

LEADER_NOT_AVAILABLE

Where you see it: in your terminal, after a Kafka producer or consumer command. A producer is the program that sends messages into Kafka. A consumer is the program that reads messages out of Kafka.

What it means, in plain words: the topic has no leader yet. The broker is still starting, or the topic was just made. A leader is the one broker in charge of one topic right now. A topic with no leader cannot take messages yet — it is not broken, it is not ready.

The fix: wait one minute and try the same command again. Do not delete the topic. Deleting it would destroy the channel and you would have to make it again.

Check it worked: the consumer command prints your messages. When it prints your messages, the topic has a leader and works.

org.apache.kafka.common.errors.TimeoutException: Topic orders not present in metadata after 60000 ms

Where you see it: in your terminal, after a Kafka producer command.

What it means, in plain words: the producer cannot find the topic orders on this cluster. The topic does not exist here. "TimeoutException" means "I waited and gave up". 60000 ms means 60,000 milliseconds — 60 seconds. The producer waited 60 seconds for the topic to appear in the cluster's metadata — the cluster's information about which topics exist — and it never appeared. Either the topic was never made, or the producer is talking to a different cluster than the one where the topic was made.

The fix: make the topic on the SAME cluster. In the Kafka lab:

Command
docker exec kafka-a /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic orders --partitions 1 --replication-factor 1

In the end-to-end lab, use kafka instead of kafka-a — check with docker compose ps.

Word by word:

  • docker exec kafka-a /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 — run the Kafka topics tool inside the kafka-a box, talking to the server at localhost, door 9092. See the entry above for the full breakdown.
  • --create — make a new topic.
  • --topic orders — the topic's name is orders.
  • --partitions 1 — make it with 1 partition. A partition is a slice of a topic. One slice is enough for practice.
  • --replication-factor 1 — keep 1 copy of each message. "Replication" means copying. A factor of 1 means one copy — no spare. Enough for practice on one machine.

Check it worked: the --list command shows orders (see the first Kafka entry for that command), and the producer starts without the error.

Object store

An error occurred (NoSuchBucket) when calling the ListObjectsV2 operation: The specified bucket does not exist

Where you see it: in your terminal, after an aws s3 command that lists or reads a bucket. This happens in the object-store lab, where the store names are moto-a and moto-b.

What it means, in plain words: the bucket name is wrong, or the bucket was never made. "NoSuchBucket" means "there is no bucket with that name". ListObjectsV2 is the name of the list operation — the tool asked the store to list the files in a bucket, and the store answered "that bucket does not exist". Either you typed the name wrong, or you skipped the step that makes the bucket.

The fix: make the bucket in the first store:

Command
docker compose exec awscli aws --endpoint-url http://moto-a:5000 s3 mb s3://incoming

Word by word:

  • docker compose exec awscli — run a command inside the awscli box. That box holds the aws file tool. The awscli box exists in the object-store lab only — the end-to-end lab has no awscli box, and its store is called moto, not moto-a.
  • aws — the file-command tool for S3 stores.
  • --endpoint-url http://moto-a:5000 — talk to the FIRST store, moto-a, on its door 5000. That is the door inside the boxes; on your machine the same store answers on door 9000.
  • s3 — use the S3 file commands.
  • mb — make bucket. Short for "make bucket".
  • s3://incoming — the bucket to make. s3:// means "a bucket in an S3 store". incoming is the bucket's name.

Run this from inside the folder phase1/object-store-lab. If you are in a different lab, the store names are different — check your lab's lesson for its store names.

Check it worked: run the list command below. It lists the files in the bucket with no error.

Command
docker compose exec awscli aws --endpoint-url http://moto-a:5000 s3 ls s3://incoming/
  • s3 ls s3://incoming/ — list the files inside the bucket called incoming. An empty list with no error is a pass — it means the bucket exists and is empty. An error is a fail.

An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: The specified bucket already exists

Where you see it: in your terminal, after an aws s3 mb command in the object-store lab.

What it means, in plain words: the bucket is already made. You ran the make-bucket step twice. "BucketAlreadyExists" means exactly that. Nothing is broken.

The fix: skip the make-bucket step and move on.

Check it worked: run the command below. It lists all buckets in the first store, with no error.

Command
docker compose exec awscli aws --endpoint-url http://moto-a:5000 s3 ls
  • s3 ls with no bucket name after it lists all buckets. The bucket name incoming should be in the list. Seeing it there is a pass.

Load balancer

curl: (7) Failed to connect to localhost port 8080: Connection refused

Where you see it: in your terminal, after a curl command. This happens in the load-balancer lab, and in the end-to-end lab where the guard also answers on door 8080.

What it means, in plain words: nothing answers on port 8080. The load balancer is not up yet. curl is the tool that fetches a web page. (7) is curl's error number for "failed to connect". localhost means your own machine. "Connection refused" means "I knocked on door 8080 and nobody answered".

The fix: wait a few seconds, check docker compose ps from inside the folder phase1/load-balancer-lab, and if lb is not "Up", run docker compose up -d again. up -d starts the boxes in the background. The guard can take a few seconds to be ready even after its box says "Up".

Check it worked: run curl http://localhost:8080/. It prints a line starting with Hostname: web1 (or web2, or web3). Hostname names the backend that answered. Any of the three is a pass.

nginx: [emerg] host not found in upstream "web2"

Where you see it: in the guard's diary lines, after running docker compose logs lb, or in your terminal when the guard fails to start. This happens in the load-balancer lab.

What it means, in plain words: nginx.conf names a backend that does not exist. The name is spelled wrong, or that backend never started. nginx is the guard program. [emerg] means emergency — the worst level of error, the program cannot start. "Host not found in upstream" means "I looked in the backend list for a backend called web2 and there is no such backend". "Upstream" is NGINX's word for the backend list. "web2" is the name in YOUR file — your error shows your real backend name.

The fix: open nginx.conf in the folder phase1/load-balancer-lab, fix the backend name so it matches the service name in docker-compose.yml, then run docker compose up -d again. Open both files side by side: the names under upstream backends in nginx.conf must match the service names in docker-compose.yml letter for letter — web1, web2, web3.

Check it worked: run docker compose logs lb. It shows no emerg line. And docker compose ps shows lb with STATUS "Up".

502 Bad Gateway

Where you see it: in your terminal or browser, after asking the guard for a page.

What it means, in plain words: the load balancer is up, but no backend answered it. A backend is down. 502 is the answer code for "bad gateway". A gateway is a door between two sides — here, the guard is the gateway between you and the backends. "Bad gateway" means the gateway is up but the other side did not answer. The guard works; a backend does not.

The fix: run docker compose ps from inside the folder phase1/load-balancer-lab to find the dead backend — look for the one that does not say "Up". Then start it with docker compose start web2 (use the real name — web1, web2, or web3, whichever one is down). If it stops again, read its diary with docker compose logs web2 (same real name) and find the error line there.

Check it worked: run curl http://localhost:8080/. It prints a line starting with Hostname:. Any backend name after Hostname: is a pass.

General

bash: ./reset.sh: Permission denied

Where you see it: in your terminal, after trying to run ./reset.sh or bash reset.sh without the right setup.

What it means, in plain words: the file is not marked as runnable. "Permission denied" is the machine saying "you are not allowed to run this file". bash is the terminal's command language. reset.sh is a script file that stops a lab and deletes its data so the lab starts fresh. It lives in the folder phase1 — the file is phase1/reset.sh. A script file needs the "may run this" permission before the machine lets you run it.

The fix: mark the file as runnable, then run it again:

Command
chmod +x reset.sh

Word by word:

  • chmod — change a file's permissions. Permissions are the rules for who may read, write, or run a file.
  • +x — add the "may run this" permission. x stands for "execute", which means "run".
  • reset.sh — the file to fix.

Run it from the folder phase1, where the file lives. Then run the reset command again, for example bash reset.sh load-balancer-lab.

Check it worked: the script runs with no permission error. It prints its progress lines instead.

chmod: cannot access '01-replicator.sql': No such file or directory

Where you see it: in your terminal, after a chmod command. This file is the database setup file in the end-to-end lab.

What it means, in plain words: you are in the wrong folder, or the file name is spelled wrong. "Cannot access" means "I looked for this file and it is not here". 01-replicator.sql is the database setup file in the end-to-end lab. It lives in the folder phase1/end-to-end/postgres/. If your terminal is sitting in a different folder, the file is not there to find.

The fix: run ls to see where you are — ls means "list the files here" — then cd into the right lab folder and try again. cd means "change folder". For this file, the right folder is phase1/end-to-end/postgres. Move there with cd, then run ls again and check the file name is in the list.

Check it worked: run ls. It shows the file name you want.

ModuleNotFoundError: No module named 'kafka'

Where you see it: in your terminal, after running a Python program that uses Kafka.

What it means, in plain words: Python cannot find the Kafka library. It is not installed where the program runs. A "module" is one package of Python code. No module named 'kafka' means "I looked for a package called kafka and it is not installed here". The program needs it and cannot start without it.

The fix: install the package the lab uses:

Command
pip install kafka-python-ng

Word by word:

  • pip — the tool that installs Python packages.
  • install — download and install.
  • kafka-python-ng — the package's name. It is the maintained version of the Kafka package for Python. Copy the name exactly — kafka-python-ng, with hyphens.

Where to run it: run it where the program runs. In the end-to-end lab, the programs run inside their boxes, and the box image already installs this package from requirements.txt — you should not need this fix there. If you are running a Python program on your own machine (not in a box), run it in your terminal on your own machine.

Check it worked: run the command below. It asks Python to load the Kafka package and print nothing if it loads fine.

Command
python -c "import kafka"
  • python — the Python program.
  • -c — run this one piece of code, then stop. Short for "command".
  • "import kafka" — load the Kafka package. import means "load this package so the program can use it".

It should print no error. Silence is a pass here — Python loaded the package and had nothing to complain about.

ERROR: Could not find a version that satisfies the requirement kafka-python-ng

Where you see it: in your terminal, after a pip install command.

What it means, in plain words: pip cannot find that package. The name is spelled wrong, or pip cannot reach the internet. "Could not find a version that satisfies the requirement" means "I searched for a package with that name and found nothing that fits". Pip searches the internet for packages, so no internet also gives this error.

The fix: check the spelling against requirements.txt — the file in the folder phase1/end-to-end that lists the Python packages the lab uses. Copy the name from that file letter for letter. Check your internet connection, and try again.

Check it worked: run pip install kafka-python-ng again. It finishes with Successfully installed. That line means the package is installed.

no space left on device

Where you see it: in your terminal, after a docker compose up or docker pull command.

What it means, in plain words: your disk is full. Docker has nowhere to write. "Device" here means your disk. Docker downloads images and stores box data on your disk, and when the disk is full, nothing can be written.

The fix: free space. On your practice machine only, run the command below to remove unused images and containers:

Command
docker system prune

Word by word:

  • docker system — Docker's own housekeeping tools.
  • prune — cut away the unused parts. It removes images and boxes you are not using.

It asks first — it prints what it will remove and asks you to say yes. Read what it will remove before you say yes. "Unused" means images and boxes not attached to any running lab. Do not run this on a machine that holds work you care about — only on your practice machine. If you are unsure what it will remove, say no and free space another way: delete files you downloaded and no longer need.

Check it worked: run docker compose up -d. It starts with no error. And your disk shows free space again — check in your machine's storage settings.

manifest for nginx:99.0 not found: manifest unknown: manifest unknown

Where you see it: in your terminal, after a docker pull or docker compose up command.

What it means, in plain words: that image tag does not exist. There is no nginx:99.0. A manifest is the list Docker downloads to find an image. "Manifest not found" means "there is no image with that name and tag". nginx is the image name. 99.0 is the tag — the version label. Version 99.0 of NGINX does not exist, so Docker cannot find it. Your error shows your real image name and tag — nginx:99.0 is the example.

The fix: use a tag that exists, for example nginx:1.27-alpine, and run:

Command
docker pull nginx:1.27-alpine

Word by word:

  • docker pull — download an image.
  • nginx:1.27-alpine — the NGINX image, version 1.27, small edition. 1.27-alpine is a real tag — it is the tag this kit uses for NGINX everywhere else. Do not use latest here: this kit's rule is to pin every image to a version, and latest moves under you.

If the wrong tag is written in your docker-compose.yml, open the file and change the tag there to one that exists, then run docker compose up -d again.

Check it worked: run docker pull nginx:1.27-alpine. It finishes with no error.

exec: "psql": executable file not found in $PATH: unknown

Where you see it: in your terminal, after a docker exec or docker compose exec command.

What it means, in plain words: the program you asked for is not inside that container. psql lives in the database container, not in every container. "Executable file" means a program you can run. $PATH is the list of folders a box searches when you type a program name. "Not found in $PATH" means "I searched every folder on that list and found no program called psql in this box". You ran the command in the wrong box.

The fix: run the command in the right container. In the PostgreSQL lab the database box is called pg-primary:

Command
docker exec pg-primary psql -U learner -d practice -c "SELECT 1;"

In the end-to-end lab the database box is called postgres-primary:

Command
docker compose exec postgres-primary psql -U learner -d practice -c "SELECT 1;"

Word by word: run psql inside the database box. psql is the database tool, so it only exists where the database lives. -U learner means connect as user learner. -d practice means use the database called practice. -c "SELECT 1;" means run the test question "show me the number 1". The rule is: each tool lives in its own box. Database tools live in the database box. Redis tools live in the Redis box. Kafka tools live in the Kafka box.

Check it worked: the command in the right container answers. For the example above, it answers with a row showing 1.

timeout waiting for container <name> to become healthy

Where you see it: in your terminal, after a docker compose up command. <name> is the box name in YOUR setup — your error shows the real name.

What it means, in plain words: a container with a health check never turned healthy. Something inside it is failing. A health check is a test Docker runs inside a box to ask "are you really working?" A box can be running but not healthy — running means the program started, healthy means it also answers correctly. "Timeout" means "I waited as long as I was told to wait, and it never became healthy".

The fix: read its diary — the log — fix the error the log shows, then restart the box:

Command
docker compose logs <name>
  • docker compose logs — show the diary lines for one box.
  • <name> — replace with the real box name, for example worker. The diary lines show what went wrong inside the box. Fix that error first — the health failure is only the symptom, the diary line is the cause.

Then restart the box:

Command
docker compose restart <name>
  • docker compose restart — stop one box and start it again.
  • <name> — the same real box name.

Check it worked: run docker compose ps. The container shows with STATUS "Up" — and "healthy", if a health check is set. "Up (healthy)" in the table means the box is running AND passing its test.

Nothing here matches your error

Do not guess. Copy the exact error line, then email it to support@promptstudioai.in with the step you were on. We reply within 24 hours.

What to include in the email, so the reply can actually help you:

  1. The exact error line, copied — not retyped.
  2. The lab you were doing, and the step number — for example "load-balancer lab, Step 2".
  3. The command you ran, copied exactly.
  4. What you already tried from this page, if anything.

Do not change three things at once and hope. One fix at a time, then check. If the check fails, the new error is the next clue.

Sources

Studied to check how the ideas are explained elsewhere, then rewritten here in plain words. No text was pasted from these pages.

  1. Docker's official getting-started guide — the people who make Docker explain the daemon, containers, images, ports and Compose: https://docs.docker.com/get-started
  2. freeCodeCamp — free written guides on Docker, databases and reading error messages: https://www.freecodecamp.org
  3. roadmap.sh/devops — the whole DevOps path in one picture, so you can see where each tool in an error sits: https://roadmap.sh/devops

Advanced — Severity triage and the incident process

This page already earns an advanced reader's time as a runbook reference: find the error, fix the first one first. This section adds the two things a runbook needs when the error is in production, not in a lab: how bad is it, and what to write down while you fix it.

Advanced 1 — Severity triage: how bad is it, in one minute

What this is: severity is a grade for how bad an incident is, decided in the first minutes by who is hurt and how badly — not by who shouted loudest. Triage is the act of deciding the grade fast, with incomplete information. Why it matters: the grade decides who gets woken up, how fast you move, and whether you roll back first or investigate first. Without grades, every incident feels like the end of the world, or none of them does.

The four grades, in plain words:

  • S1 — everything is down, or money or data is being lost. No user can do the main job. Examples: the site answers nothing, the database is gone, orders are being charged twice. Response: drop everything, all hands, roll back first and investigate second.
  • S2 — a big part is broken. Many users are hurt, but the main job still works for most. Examples: one region is down, logins fail for half the users, the pipeline is stuck. Response: urgent, but one person can own it while others keep working.
  • S3 — a small part is broken, and a workaround exists. Examples: one report page fails, one background job is slow, a dashboard is stale. Response: fix it in working hours, tell the users the workaround.
  • S4 — cosmetic. A typo, a wrong colour, a slow page that still works. Response: write it down, fix it with the next change.

Three questions that set the grade: (1) Who is hurt — everyone, many, or a few? (2) Can they do the main job another way? (3) Is money or data being lost right now? If the answer to (3) is yes, it is S1, whatever the other answers are. Write the grade down first — it stops the argument about how bad it is, and it is the first line of the timeline, next.

Advanced 2 — The incident process: what to write down, in what order

What this is: an incident timeline is a written record of a production breakage, made while it is happening. Why it matters: memory lies. A week later nobody remembers what was checked, in what order, or which change fixed it. The timeline is also what the review after the incident is built from — without it, the review is guesswork.

Write these down, in this order, while you work — not after:

  1. When it started, and how you noticed. The time of the first alert, or the first user report. "The alert fired at 14:03" beats "it broke in the afternoon".
  2. What users see, in one line. "Checkout answers with a 500 error." Not "the system is down" — say what exactly fails.
  3. Severity. S1 to S4, from Advanced 1. Write it early, and change it if the facts change.
  4. Every check you ran, and what it showed. "14:07 — kubectl get pods: 2 of 3 pods Running, 1 CrashLoopBackOff. kubectl logs --previous: out of memory." One line per check. This is also where this page's rule applies: fix the FIRST error first — the one at the top of the chain.
  5. Every change you made, and the time. "14:11 — rolled back to the previous image." If you do not write a change down, the next person cannot tell whether it helped or hurt.
  6. When it recovered, and how you know. "14:19 — checkout answers 200 again, error rate back to zero." "It looks fine" is not recovery. A number is.
  7. What is still unknown. "We do not know why memory spiked." Write it down instead of hiding it — it is the first item of the review.

After it is over, hold a blameless review: what broke, why the check did not catch it, and one fix to the system — not to a person. "We will add a memory limit and a memory alert" is a fix. "We will be more careful" is not. The timeline from this section is the input to that review; the error entries on this page are the checks you ran in step 4.

Advanced 3 — Which decoder entries to reach for first, by symptom

When production breaks, do not read this page top to bottom. Start from the symptom:

  • Nothing answers at all — start with the Ports section (address already in use, connection refused) and the Docker section (daemon not running, container not running).
  • The app answers with 500 errors — start with the app's own logs (docker logs, kubectl logs --previous), then the PostgreSQL and Redis sections for the database errors underneath.
  • One part is slow, not dead — check the Kafka lag (consumer groups describe), the load balancer (502 Bad Gateway), and disk space (no space left on device).
  • A deploy just went out and everything broke — roll back first (see the break-and-fix labs' Advanced section), then read the error. The newest change is the most likely cause.

What you can now say, truthfully — advanced

  • "I triage an incident by severity — S1 to S4 — using who is hurt, whether there is a workaround, and whether money or data is being lost." (Only if you did Advanced 1.)
  • "I write an incident timeline while I work: start time, what users see, severity, checks, changes, recovery time, and what is still unknown." (Only if you did Advanced 2.)
  • "I start from the symptom, not from the top of the page, and I fix the first error in the chain first." (Only if you did Advanced 3 and the rest of this page.)

Quick check — try it yourself

Question: When a lab stops on an error line, what three parts of an error guide help you solve it?

Open the practice terminal to test this →

Show answer

An error guide gives you what the error means, the one fix to run, and how to check that the fix worked.