>_ IzzyLab

Hands-on task

This task is step 15 of the course “Troubleshooting and recovering a Linux server”

The service listens on the wrong address

medium~10 min

The app should be reachable at http://localhost:8090/, but right now it listens only on the external interface and doesn't answer on localhost. Restart it so it listens on 127.0.0.1:8090 and serves the page.

What you'll practise:
  • network sockets
  • ss
  • bind address
  • process management
  • setsid

Topic breakdown

A listening socket is bound to a specific address: 0.0.0.0 catches all interfaces, while an address like 127.0.0.1 catches only local requests; these are different bindings, and a client using localhost won't reach a socket bound to an external IP. Diagnosis starts with tools like ss/ps, which show which address the port is bound to and which process, with which arguments, brought it up. Changing the binding means restarting the process with a different address; the background process must be detached from your session (setsid/nohup plus I/O redirection), otherwise it dies with the shell.

What's checked

  1. localhost:8090 responds
  2. Port 8090 is listened on only at 127.0.0.1

What it looks like