Error Decoder — Find Your Error, Fix It
FreeWhat 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.
In real work, a broken lab usually stops on one error line. Guessing wastes hours — reading it tells you exactly what broke.
Every entry has three parts: what the error means, the one fix to run, and how to check the fix worked.
Press Ctrl+F (or Cmd+F on Mac) and type part of the error message.
Read the error first. The error tells you what broke. Do not guess. Find your error below, read what it means, run the one fix, then run the check. If the check passes, move on.
Docker
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
What it means: Docker itself is not running on your machine. The fix: start Docker. On Docker Desktop, open the Docker app and wait until it says it is running. On Linux, run sudo systemctl start docker. Check it worked: docker ps prints a list (even an empty list) with no error.
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
What it means: Docker is running, but your user is not allowed to talk to it. The fix: sudo usermod -aG docker $USER — then log out and log back in (or run newgrp docker). Check it worked: docker ps works without sudo in front of it.
docker: command not found
What it means: Docker is not installed, or your terminal cannot find it. The fix: install Docker Desktop (or Docker Engine on Linux), then open a new terminal window. Check it worked: docker --version prints a version number.
docker: 'compose' is not a docker command.
What it means: your Docker is too old to have the Compose plugin. The fix: update Docker Desktop to the newest version. On an old setup, try docker-compose (with a hyphen) instead of docker compose. Check it worked: docker compose version prints a version number.
Error response from daemon: No such container: web2
What it means: no container with that name exists. You typed the name wrong, or the container was removed. The fix: run docker compose ps and use one of the names it shows. Check it worked: the name you want appears in docker compose ps.
Error response from daemon: Container <container id> is not running
What it means: the container exists, but it is stopped. The fix: start it again, for example docker compose start web2. Check it worked: docker compose ps shows the container with STATUS "Up".
Error response from daemon: pull access denied for my-image, repository does not exist or may require 'docker login'
What it means: the image name is wrong, the image is private, or you are not logged in. The fix: check the spelling of the image name. If the image is private, run docker login first, then try again. Check it worked: docker pull <image-name> finishes with no error.
Docker Compose
yaml: line 4: mapping values are not allowed in this context
What it means: a spacing or colon mistake in docker-compose.yml. The usual cause is a missing space after a colon, or a tab character. YAML does not allow tabs. The fix: open the file at the line number in the error, fix the spacing, and use spaces only. Then run docker compose config to check the file. Check it worked: docker compose config prints the file back with no error.
service "web" has neither an image nor a build context specified
What it means: a service in docker-compose.yml has no image: and no build: — Compose does not know what to run for it. The fix: add an image: line (for example image: nginx) or a build: block to that service in the file. Check it worked: docker compose config prints no error.
Error response from daemon: network <name> not found
What it means: the compose file asks for a network that does not exist on your machine. The fix: run docker compose down and then docker compose up -d again, so Compose makes its own network. If the file names a network by hand, remove that networks: line. Check it worked: docker compose ps shows the containers with STATUS "Up".
Ports
Bind for 0.0.0.0:8080 failed: port is already allocated
What it means: another container (or another program) already uses port 8080. The fix: run docker compose ps to find the container using it, and stop that one first. Or change the port number in docker-compose.yml (for example, 8081) and try again. Check it worked: docker compose up -d starts with no error.
listen tcp 0.0.0.0:8080: bind: address already in use
What it means: something on your machine already holds port 8080, so nothing else can use it. The fix: stop the program that holds the port, or use a different port (for example, open http://localhost:8081 instead). Check it worked: curl http://localhost:8080/ answers, or the new port answers.
PostgreSQL
psql: error: connection to server at "localhost" (::1), port 5432 failed: Connection refused
What it means: no database is listening on that port. The database is not up. The fix: run docker compose ps. If the database is not "Up", run docker compose up -d and wait a minute. Check it worked: docker exec pg-primary psql -U learner -d practice -c "SELECT 1;" answers with a row.
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "learner"
What it means: the password (or the user name) is wrong. The fix: open docker-compose.yml and check the password there. Use exactly that password and user name in your command. Check it worked: the same psql command connects and answers.
ERROR: cannot execute INSERT in a read-only transaction
What it means: you tried to write on the standby (replica). A standby takes reads only. This is correct — do not try to fix it. The fix: run the INSERT on the main database instead, for example docker exec pg-primary psql -U learner -d practice -c "INSERT INTO orders VALUES (104, 'pen stand', 120);". Check it worked: the INSERT on the main database prints INSERT 0 1.
ERROR: relation "orders" already exists
What it means: the table orders is already made. You ran the CREATE step twice. 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. Check it worked: docker exec pg-primary psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;" shows the rows.
FATAL: database "practice" does not exist
What it means: the database name in your command is wrong. 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. Check it worked: psql connects, and SELECT * FROM orders; shows rows (or "no rows" for an empty table, not an error).
Redis
(error) NOAUTH Authentication required.
What it means: this Redis store needs a password, and you gave none. The fix: add the password to the command with -a, for example docker exec redis-a redis-cli -a <your-password> ping. Use the password from your compose file. Check it worked: the command answers PONG.
(error) READONLY You can't write against a read only replica.
What it means: 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 fix: write on the main store instead: docker exec redis-a redis-cli SET user:102 Ravi. Check it worked: the SET on redis-a prints OK.
Kafka
Topic 'orders' already exists.
What it means: the topic orders is already made. You ran the create step twice. The fix: skip the create step and move on. Check it worked: docker exec kafka-a /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list shows orders in the list.
LEADER_NOT_AVAILABLE
What it means: the topic has no leader yet. The broker is still starting, or the topic was just made. The fix: wait one minute and try the same command again. Do not delete the topic. Check it worked: the consumer command prints your messages.
org.apache.kafka.common.errors.TimeoutException: Topic orders not present in metadata after 60000 ms
What it means: the producer cannot find the topic orders on this cluster. The topic does not exist here. The fix: make the topic on the same cluster: docker exec kafka-a /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic orders --partitions 1 --replication-factor 1. Check it worked: the --list command shows orders, and the producer starts without the error.
Object store
An error occurred (NoSuchBucket) when calling the ListObjectsV2 operation: The specified bucket does not exist
What it means: the bucket name is wrong, or the bucket was never made. The fix: make the bucket in the first store: docker compose exec awscli aws --endpoint-url http://moto-a:5000 s3 mb s3://incoming. Check it worked: docker compose exec awscli aws --endpoint-url http://moto-a:5000 s3 ls s3://incoming/ lists the files with no error.
An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: The specified bucket already exists
What it means: the bucket is already made. You ran the make-bucket step twice. The fix: skip the make-bucket step and move on. Check it worked: docker compose exec awscli aws --endpoint-url http://moto-a:5000 s3 ls shows the bucket name with no error.
Load balancer
curl: (7) Failed to connect to localhost port 8080: Connection refused
What it means: nothing answers on port 8080. The load balancer is not up yet. The fix: wait a few seconds, check docker compose ps, and if lb is not "Up", run docker compose up -d again. Check it worked: curl http://localhost:8080/ prints a line starting with Hostname: web1 (or web2, or web3).
nginx: [emerg] host not found in upstream "web2"
What it means: nginx.conf names a backend that does not exist. The name is spelled wrong, or that backend never started. The fix: open nginx.conf, fix the backend name so it matches the service name in docker-compose.yml, then run docker compose up -d again. Check it worked: docker compose logs lb shows no emerg line, and docker compose ps shows lb with STATUS "Up".
502 Bad Gateway
What it means: the load balancer is up, but no backend answered it. A backend is down. The fix: run docker compose ps to find the dead backend, then start it with docker compose start web2 (use the real name). If it stops again, read its log with docker compose logs web2. Check it worked: curl http://localhost:8080/ prints a line starting with Hostname:.
General
bash: ./reset.sh: Permission denied
What it means: the file is not marked as runnable. The fix: chmod +x reset.sh, then run it again. Check it worked: the script runs with no permission error.
chmod: cannot access '01-replicator.sql': No such file or directory
What it means: you are in the wrong folder, or the file name is spelled wrong. The fix: run ls to see where you are, then cd into the right lab folder and try again. Check it worked: ls shows the file name you want.
ModuleNotFoundError: No module named 'kafka'
What it means: Python cannot find the Kafka library. It is not installed where the program runs. The fix: install the package the lab uses: pip install kafka-python-ng. Check it worked: python -c "import kafka" prints no error.
ERROR: Could not find a version that satisfies the requirement kafka-python-ng
What it means: pip cannot find that package. The name is spelled wrong, or pip cannot reach the internet. The fix: check the spelling against requirements.txt, check your internet connection, and try again. Check it worked: pip install kafka-python-ng finishes with Successfully installed.
no space left on device
What it means: your disk is full. Docker has nowhere to write. The fix: free space. On your practice machine only, run docker system prune to remove unused images and containers. It asks first — read what it will remove before you say yes. Check it worked: docker compose up -d starts with no error, and your disk shows free space again.
manifest for nginx:99.0 not found: manifest unknown: manifest unknown
What it means: that image tag does not exist. There is no nginx:99.0. The fix: use a tag that exists, for example nginx:latest, and run docker pull nginx:latest. Check it worked: docker pull nginx:latest finishes with no error.
exec: "psql": executable file not found in $PATH: unknown
What it means: the program you asked for is not inside that container. psql lives in the database container, not in every container. The fix: run the command in the right container, for example docker exec pg-primary psql -U learner -d practice -c "SELECT 1;". Check it worked: the command in the right container answers.
timeout waiting for container <name> to become healthy
What it means: a container with a health check never turned healthy. Something inside it is failing. The fix: read its log — docker compose logs <name> — fix the error the log shows, then run docker compose restart <name>. Check it worked: docker compose ps shows the container with STATUS "Up" (and healthy, if a health check is set).
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.
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.