terminal.cab

Linux Basics Lesson 34 of 38

guestLevel 1Badges and progress0/100 XP, XP to the next levelStreak0

Nothing gets through from outside

Detective 110 XP

10 minutes

Learning goals

Work from the inside out: does the app answer on the machine itself, where does it listen, where does that address come from? Then fix it.

The app runs as the service app.service under the user app and reads its configuration from /srv/app/app.conf. The team rolled it out with the account lerner, so you may change that file without sudo. Restarting the service needs sudo, and on this training machine it asks for no password.

cat, grep, kill and journalctl are not loaded on this page and answer with command not found or a hint. systemctl status shows the last lines of the journal for the service, and with -l it does not cut them off.

Steps

Step 1/4: Start on the inside. Does the app answer on the server itself? Ask it for /api/health on port 8080 of the loopback.

Detective 110 XP

The new API is live, and on the server it answers. From her laptop, your colleague gets curl: (7) Failed to connect to 203.0.113.10 port 8080 after 0 ms: Could not connect to server, straight away and not after a long wait. She has already checked the name and ping, both fine. So it is on you: why does nothing get through from outside?

  1. Step 1

    Start on the inside. Does the app answer on the server itself? Ask it for /api/health on port 8080 of the loopback.

  2. Step 2

  3. Step 3

  4. Step 4

Loading terminal …

lerner@web-01: ~bash
lerner@web-01:~$

Esc, then Tab leaves the terminal

Step 1 of 4

Cards

  1. Card 1 of 2

    Tap the card or press Space to turn it over.

  2. Card 2 of 2

    Tap the card or press Space to turn it over.

Cheat sheet

The most important command lines of this module on one A4 page, black and white, to print or keep on your phone.