How to do I troubleshoot connection issue to my web server?

I have deployed a web server on a headless Ubuntu machine on my local network. The server is running a Springboot app that I would like to access from my laptop (another machine on my local network) using the browser like this: http://192.168.1.200:8080

The web server has a static DHCP lease set to 192.168.1.200

(The app is running in a Docker container and maps connections from port 8080 to port 80).

When browsing to http://192.168.1.200:8080/ however I get a ‘unable to find server’ error.

What steps can I take to troubleshoot why I can’t access my web app through HTTP from a computer on the same network as my server?

The docker-compose file is:

version: "3.3"
services:
  db:
    image: postgres
    environment:
      POSTGRES_PASSWORD: aaa
    volumes:
      - /var/lib/postgresql/data 
    ports:
      - "5432:5432"
    networks:
      - nat
  
  web:
    image: email-viewer
    ports:
      - "192.168.1.200:8080:80"
    depends_on:
      - db
    networks:
      - nat
networks:
  nat:
    external:
     name: nat 

Did you specificly set server.port=80 in application.properties, application.yaml or did set it as ENV in your Dockerfile? If not: the embedded tomcat in spring boot uses port 8080 by default and would require 192.168.1.200:8080:8080 instead of 192.168.1.200:8080:80

2 Likes

Ah OK, that was it. I didn’t know that. Thanks a lot!