Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey all, I'm trying to stop all the services on port 80 by I'm not entirely sure how.
Infact, I don't really know what's running on port 80... I tried throwing a netstat -a in a prompt but I don't see port numbers anywhere so I can't figure out which PID to kill.
Any ideas on how I can figure out what's running on port 80, and stop it?
Hey all, I'm trying to stop all the services on port 80 by I'm not entirely sure how.
Infact, I don't really know what's running on port 80... I tried throwing a netstat -a in a prompt but I don't see port numbers anywhere so I can't figure out which PID to kill.
Any ideas on how I can figure out what's running on port 80, and stop it?
Thanks,
Phoebe
Port 80 is usually HTTP, as in Apache or web services. Since you don't say what version/distro of Linux you're using, we'll have to guess as to how to stop it. Normally /etc/init.d/apache2 stop, as root.
"Stopping web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName."
Running netstat -tupn, I get the following:
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.194.128:48544 69.63.189.39:80 TIME_WAIT -
tcp 0 0 127.0.0.1:41402 127.0.0.1:80 TIME_WAIT -
I'm not sure what to kill, are the PID's 48544 and 41402?
The TIME_WAIT status means that those connections are shutting down (because you shut down the apache server). If you run the netstat command again, they should disappear.
The TIME_WAIT status means that those connections are shutting down (because you shut down the apache server). If you run the netstat command again, they should disappear.
I checked it again and got the following:
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
So it looks like it did disappear. However, when I tried to run the program which wasn't working in the first place (since port 80 was in use) it still gave me an error. After recieveing the error, I threw another netstat -tupn command out and it looks like it came back:
"Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.194.128:48544 69.63.189.39:80 TIME_WAIT -
tcp 0 0 127.0.0.1:41402 127.0.0.1:80 TIME_WAIT -"
I suggest that you check your log file (/var/log/syslog or /var/log/messages;the location depends on your distribution) and the kernel messages (dmesg) to see if the failing program is giving any indication about the failure.
Hey all, I'm trying to stop all the services on port 80 by I'm not entirely sure how.
Infact, I don't really know what's running on port 80... I tried throwing a netstat -a in a prompt but I don't see port numbers anywhere so I can't figure out which PID to kill.
Any ideas on how I can figure out what's running on port 80, and stop it?
Thanks,
Phoebe
Why don't you block all services on 80 with iptables.
How come it sees python as an unrecognized service?
Because python is a programming language not a service. Chances are you've got some other sort of program running on this box, that's using port 80, and it's written in Python.
Execute the following command as root. It might help you track down who launched the Python application. You can decide from there if you want to kill it.
How come it sees python as an unrecognized service?
Yes, sorry, I should have made it clearer that the output wouldn't necessarily be a service. The number appearing before that (6216 in this case) would be the process id, so you probably found out that you could just
Code:
kill 6216
to stop the program from running.
Code:
ps axu | grep 6216
would have shown the process and the user under which it was running
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.