Skip to main content

Command Palette

Search for a command to run...

Day 12: Linux Network Services | 100 Days of DevOps

Updated
โ€ข3 min read
R
Iโ€™m currently working in DevOps and documenting my learning journey along the way. From CI/CD pipelines to cloud and containers, Iโ€™m exploring how modern systems are built and deployed. This blog is where I share what I learn, break down concepts in simple terms, and track my progress. Learning one concept at a time, and trying to apply it practically.

Content:

Today I worked on troubleshooting a real-world Linux network issue where an Apache service was not accessible on port 8088. The issue required debugging at multiple levels including network connectivity, service conflicts, and firewall rules.

What I Learned

Through this task, I understood:

  • How to approach troubleshooting step by step
  • How port conflicts can break services
  • How to identify which process is using a port
  • How to adjust configurations safely
  • How firewall rules impact service accessibility

Steps I Followed :

1. Checked Connectivity from Jump Host

telnet stapp01 8088
telnet stapp02 8088
telnet stapp03 8088

๐Ÿ‘‰ I started by testing connectivity from the jump host to all app servers.

  • stapp02 and stapp03 were reachable
  • stapp01 failed

โžก๏ธ This confirmed the issue was specific to stapp01, not a global problem.


2. Logged into the Problem Server

ssh tony@stapp01

๐Ÿ‘‰ After identifying the problematic server, I logged in to investigate further.


3. Checked Apache Service Status

sudo systemctl status httpd

๐Ÿ‘‰ The Apache service was not running. ๐Ÿ‘‰ The error message showed: "Address already in use"

โžก๏ธ This indicated that another service was already using port 8088.


4. Installed netstat Tool

sudo yum install -y net-tools

๐Ÿ‘‰ The netstat command was not available, so I installed net-tools to inspect open ports.


5. Identified Port Conflict

sudo netstat -tlnup

๐Ÿ‘‰ I checked which service was using port 8088. ๐Ÿ‘‰ Found that sendmail was running on that port.

โžก๏ธ This was the root cause โ€” Apache couldn't start because the port was already occupied.


6. Modified Sendmail Configuration

cd /etc/mail
sudo vi sendmail.mc

๐Ÿ‘‰ I edited the sendmail configuration file and changed its port from 8088 to another unused port.

โžก๏ธ This ensured there would be no conflict with Apache.


7. Restarted Sendmail

sudo systemctl restart sendmail

๐Ÿ‘‰ Restarted the service to apply the configuration changes.


8. Verified Port Availability

sudo netstat -tlnup

๐Ÿ‘‰ Checked again to confirm that port 8088 was now free.


9. Tested Apache Before Fix

curl http://localhost:8088

๐Ÿ‘‰ Apache was still not accessible .


10. Checked Firewall Rules

sudo iptables -L -n

๐Ÿ‘‰ I inspected firewall rules and noticed that port 8088 was not explicitly allowed.

โžก๏ธ Even if Apache runs, firewall could block access.


11. Allowed Port 8088 in Firewall

sudo iptables -I INPUT 4 -p tcp --dport 8088 -j ACCEPT

๐Ÿ‘‰ Added a rule to allow incoming traffic on port 8088.


12. Restarted Apache Service

sudo systemctl restart httpd

๐Ÿ‘‰ Now that:

  • Port conflict was resolved โœ…
  • Firewall rule added โœ…

I restarted Apache.


13. Final Verification

curl http://localhost:8088

๐Ÿ‘‰ Successfully received a response

โžก๏ธ This confirmed Apache is running and accessible locally.


My Understanding

This task taught me that service failures are often caused by multiple layered issues โ€” not just one. Here, both port conflict and firewall rules had to be resolved to fully fix the problem.


What I Found Interesting

It was interesting to see how a background service like sendmail can unintentionally block a web server. Also, the importance of checking firewall rules after fixing the service was a great real-world lesson.


๐Ÿ“Œ Full notes: GitHub link