cancel
Showing results for 
Search instead for 
Did you mean: 
willesalminen
Mission Specialist
Mission Specialist
  • 260 Views

Just for the curiosity - what is the web server listening on port 8080?

In Section 5.2: Guided Exercise: Externalize the Configuration of Application, I noticed that web UI syntax for Router Target port is a bit confusing. What this really mean: 8080 -> 8080 (TCP)?

image.png

I know the router interface listen on port 80 default. But for the curiosity, I tried URL http://webconfig-rt-storage-configs.apps.ocp4.example.com:8080 and I was surpised to see there was another apache web instance, but the welcome page wasn't the same than in http://webconfig-rt-storage-configs.apps.ocp4.example.com. And of course lab modifications didn't impact to that site either.

This is not related to lab directly, but what is this server, and why traffic was allowed to it? Or have I done mistake in lab configuration?

image.png

Thanks!

5 Replies
Trevor
Starfighter Starfighter
Starfighter
  • 82 Views

I'm seeing three (3) questions here.  Which query is the
official one????

Trevor "Red Hat Evangelist" Chandler
willesalminen
Mission Specialist
Mission Specialist
  • 65 Views

Your are correct. The main question is "What is the web server listening on port 8080 in this lab?".

And secondary question, which may or may not be related to the first question: "Web UI syntax for Router Target port is a bit confusing. What this really mean: 8080 -> 8080 (TCP)?"

Kent-Kamau
Mission Specialist
Mission Specialist
  • 45 Views

The target port is the port on the Pod where the application or service is actually listening. When a Service receives traffic, it forwards that traffic to the target port on the Pods it selects. This port is defined in the Pod's container specification. For example, if a container is running a web server on port 8080, the target port would be 8080.

0 Kudos
  • 40 Views

All correct, just to clarify. Here we have 3 ports in play:

80 - port of the route (where route controller listens for and accept the traffic). 
8080 - port of the service (this is first of 8080 -> 8080 in target port)
8080 - port of the pod (here we have server running at port 8080)

OG, is asking about "second" server running on the same hostname as the "first" server but on the port 8080. 
As the route resolves and connects to one of the nodes, having something running on port 8080 most likely is something exposed on the node on the port 8080. Traffic here is bypassing route controller and  comes to the one of the pods (most likely the same pod that handles "first" server). 
I recommend making a call and looking into the logs of the pods to verify which one accepted the traffic. 

0 Kudos
mcapileibm
Mission Specialist
Mission Specialist
  • 12 Views

The server on port 8080 is likely a separate web instance from the main one.
If your lab changes didn’t affect it, it could be:
A default service running on port 8080.
A different pod exposing this port.

80 Route port (entry point for external traffic).
8080 Service port (first 8080 in the UI).
8080 Pod port (where the actual server runs).
Normally, traffic goes through the Route to the Service.
But accessing port 8080 directly may be bypassing the Route and hitting the Node where the pod is running.
To check which pod is responding
oc logs -f <pod_name>

0 Kudos
Join the discussion
You must log in to join this conversation.