A 12-day Advent calendar of Linux and DevOps challenges of different difficulties,from December 1st to December 12th.
Advent of Sysadmin is for Linux sysadmins, DevOps/SRE engineers, developers, and anyone who wants a hands-on troubleshooting challenge right here in the browser. Each day (at 00:01 UTC) unlocks a new lab - from Easy to Hard - so you can learn something new while having fun. They are free for the duration of the event (there are some limitations on the number of runs per day for free users).
New here? Start with an Easy challenge and check the FAQ. Sign up for a free account (so you can track your progress, not required) and start solving the scenarios!
New here? Start with an Easy challenge and check the FAQ.
Scenario: "Los Algodones": App container cannot reach Redis
Description: Two Docker containers are running: a small web app (app) on port :80 and a Redis cache (redis). The app is supposed to use Redis, but the page shows it cannot connect. curl -s http://127.0.0.1/ returns: Error: cannot connect to Redis Redis itself is running. The app configures its Redis connection with the REDIS_HOST environment variable (see /home/admin/algodones).
Test: curl -s http://127.0.0.1/ returns OK. From inside the app container, Redis is reachable by the hostname redis. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Tromso": The pipeline keeps dying
Description: Your CI job on this host is /home/admin/pipeline/run-pipeline. It should print pipeline completed and leave /home/admin/pipeline/out/DONE. Instead it is terminated before it finishes. Something on the box is sending it a fatal signal. There are many maintenance helpers and watchdogs running; most of them look guilty. Find the real culprit, stop it permanently (survive reboot), and make the pipeline succeed. NOTE: Do not replace or patch run-pipeline itself — the checker verifies its checksum. You can run more than one shell session at the same time by clicking again the "Open the Server Terminal in a New Window" button.
Test: /home/admin/pipeline/run-pipeline prints pipeline completed and creates /home/admin/pipeline/out/DONE. The binary checksum is unchanged. The fix still works after reboot. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Helsinki": Fix the AWS VPC public subnet internet path
Description: The AWS VPC helsinki-app has a public subnet and an internet gateway, but instances in that subnet still have no path to the Internet. The IGW was never attached, and the public route table has no 0.0.0.0/0 route. Attach the existing internet gateway to the VPC and add a default route on route table helsinki-public-rt that targets that IGW. Do not recreate the VPC or subnet. The AWS CLI is already configured against the local endpoint. Start with: aws ec2 describe-internet-gateways NOTE: this scenario uses Floci, a local AWS emulator; there are no real AWS resources.
Test: IGW tagged for this scenario is attached to VPC helsinki-app, and route table helsinki-public-rt has 0.0.0.0/0 → that IGW. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Basel": The waitlist that never landed - db migration
Description: The Basel Events catalog API on port :5000 should list events and serve a waitlist for event 1. Last night's 2.4 deploy added that waitlist; /events still works, but /events/1/waitlist does not. Prod is MariaDB on :3306. Staging Postgres on :5432 uses the same migration versions. There is a short handover note in /home/admin/HANDOVER.txt. Do not drop the catalog databases.
Test: curl -s http://127.0.0.1:5000/events/1/waitlist returns JSON containing the fields email and notified. The waitlist table exists with a notified column in both the MariaDB and Postgres catalog databases. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Valletta": SSL Certs expiring within 30 days
Description: Your TLS inventory lives in /home/admin/certs/ (PEM files and a few non-cert decoys). List every certificate that is already expired or will expire within the next 30 days. Write one name per line to /home/admin/expiring.txt (just the name). A name may be the file basename (with or without .pem), or the certificate CN. Order does not matter; blank lines and extra spaces are fine.
Test: /home/admin/expiring.txt names exactly the certs in /home/admin/certs/ that fail a 30-day validity window (expired or expiring soon). Basename or CN accepted; order ignored. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Description: The nightly customer merge is wrong. /home/admin/bin/merge-report.sh joins CRM keys in /home/admin/data/keys.txt with warehouse rows in /home/admin/data/details.txt into /home/admin/report.txt. After a run, many keys are missing from the report even though they exist in both inputs. Fix the merge so every key from keys.txt appears in report.txt with its matching detail fields from details.txt. You can edit the script and re-run it, or produce a correct report.txt another way.
Test: /home/admin/report.txt has one line per key in keys.txt, each joined with the correct fields from details.txt (order of lines does not matter). The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Bratislava": PostgreSQL won't accept connections
Description: After last night's crash, PostgreSQL (systemd unit bratislava-db) should be serving database bratislava on localhost, but clients cannot connect. When the database is healthy, this returns ahoj: sudo -u postgres psql -d bratislava -tAc "SELECT message FROM greeting" Make that work again.
Test: sudo -u postgres psql -d bratislava -tAc "SELECT message FROM greeting" returns ahoj. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Sofia": Status file stuck on maintenance
Description: Ops runs a oneshot unit status-fetch that should copy the live status page at http://127.0.0.1/ into /home/admin/site-status.txt. The site itself looks fine, but the file still does not show the expected ALL SYSTEMS GO line. Fix the fetcher and re-run it so the file matches the page.
Test: /home/admin/site-status.txt contains ALL SYSTEMS GO. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Split": SQLite locked under concurrent writes
Description: A small Go ledger service stores rows in SQLite at /opt/ledger/ledger.db. Concurrent goroutine writers often fail with database lock errors. Probe: curl -s http://127.0.0.1:5001/stress?n=30 You want fail=0 (all inserts succeed). Source is /opt/ledger/main.go; after editing, run /opt/ledger/rebuild.sh (or go build + systemctl restart ledger). NOTE: the SQLite driver for Go used in the ledger code is modernc.org/sqlite> . To connect to a database, the code is db, err := sql.Open("sqlite", dsnURI), where The dsnURI is a plain file name or a "file:" URI, either optionally followed by '?' and query parameters. This is used in line 23 of /opt/ledger/main.go .
Test: GET http://127.0.0.1:5001/stress?n=30 returns fail=0 and ok ≥ 25. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Lima": Deduplicate identical files
Description: Under /home/admin/data there are many byte-identical files left over from messy exports and archives (same content, different paths and names). They currently each have their own inode and waste space. Deduplicate the tree so identical files share storage via hard links, while keeping every existing path and its contents. Unique files must stay as they are. jdupes and fdupes are installed.
Test: Every file under /home/admin/data is unchanged in path and content, and identical contents share a single inode (hard-linked). The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Description: The cacheapp service should answer http://127.0.0.1:9090/ with CACHE OK, but it dies on startup. Get the service healthy without removing that memory ceiling (the cacheapp systemd unit is left unchanged.)
Test: cacheapp is active, curl http://127.0.0.1:9090/ returns CACHE OK, and the cacheapp unit is left unchanged. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Scenario: "Caracas": The warehouse volume went missing
Description: After last night's reboot the warehouse app data under /srv/appdata looks empty — inventory files that should be there are gone from the directory listing. Ops moved that tree onto a dedicated disk some time ago; the root filesystem itself still looks fine. Bring the application data back so it is readable again at /srv/appdata. The fix must still work after a reboot (you do not need to reboot to prove it).
Test: /srv/appdata is mounted from the data volume (not just an empty directory on root), and /srv/appdata/inventory/stock.dat contains the line caracas-stock-ok. Confirm with mount or findmnt /srv/appdata. The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.
Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.