Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-12-2015, 02:47 PM
|
#1
|
Member
Registered: Jun 2003
Location: Phoenix, AZ
Posts: 112
Rep:
|
SimpleHTTPServer - How to disable on Debian on boot?
I've been trying to run LimboMedia which runs on port 8000 by default and is self contained. When I try to run it I get the error of port 8000 is already in use. I've ran a netstat and found that python/SimpleHTTPServer is running on 0.0.0.0:8000 every time I reboot on my Debian box. This happens on 3 different boxes using mix of Debian and Ubuntu two being PCs and one being an ODROID.
How can I get python/SimpleHTTPServer to not run at boot? I can't find a service for it in /etc/init.d. I can change the port in LimboMedia to 7000 and it work, but want to run on port 8000 if I can.
Do I need SimpleHTTPServer? I've looked all over Google, but can only find out how to run and exit the program and nothing to help with disable or remove so far.
If it has to run to boot, can I change the port and how can I do that since it seems you have to type a command each time to change the port?
|
|
|
04-12-2015, 04:25 PM
|
#2
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
|
Did you try disabling using the following:
Code:
update-rc.d <daemon> disable
I used it on Debian 6 box for apache2 and it worked!
|
|
|
04-12-2015, 04:47 PM
|
#3
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
So python is installed by default and SimpleHTTPServer which is a python module is also installed by default. However, I'm not sure what was installed that would automatically start the server at boot. Not something part of the basic installation that I know of. Looking at the running processes might provide a clue.
|
|
|
04-13-2015, 11:31 AM
|
#4
|
Member
Registered: Jun 2003
Location: Phoenix, AZ
Posts: 112
Original Poster
Rep:
|
I can't find anything in "/etc/init.d" or "service --status-all" that would be part of Python or SimpleHTTPServer or httpd so I can't figure out what to stop or disable.
When I run a netstat I just get 0.0.0.0:8000 used by Python. I go to 127.0.0.1 on the box and get nothing.
I've removed MPD thinking it might be conflicting with 8000 and rebooted, but same issue.
Is there a way to get more in depth to find out why and what Python is using 8000? Is there a way to just disable or stop SimpleHTTPServer from startup inside of Python? I've read SimpleHTTPServer been renamed to httpd in Python3? Still don't see any httpd services. The only way I can think of is to keep killing the port/process, but that isn't a fix.
|
|
|
04-13-2015, 01:46 PM
|
#5
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
|
It will be good if you share the output of the following:
Code:
netstat -ptan | grep LIST
Run this command when the service you are talking about is using port 8000.
|
|
|
04-13-2015, 03:57 PM
|
#6
|
Member
Registered: Jun 2003
Location: Phoenix, AZ
Posts: 112
Original Poster
Rep:
|
Thanks T3RM1NVT0R
That got me in the right direction. I ran "netstat -ptan | grep LIST" and followed the PID and found Ajenti was using it. Don't remember if I saw the PID last time or it just dawned on me now. Wow..can't believe I forgot about Ajenti on this box. I ran service ajenti stop for now and port 8000 if free for LimboMedia. I'll run the update-rc scripts to make it permanent later after playing around some more.
Now to run that command and find out what's going on port 8000 on the other 2 boxes. 
|
|
|
04-13-2015, 04:27 PM
|
#7
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
|
You're welcome.
Yup, that command works for me when troubleshooting such issues. Initially when you mentioned that you ran netstat I thought you already saw that. However, from the subsequent post I thought it will be good to have that output to see what is using it.
Please mark the thread as solved!
Enjoy Linux!!!
|
|
|
All times are GMT -5. The time now is 04:10 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|