LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-12-2015, 02:47 PM   #1
nicedreams
Member
 
Registered: Jun 2003
Location: Phoenix, AZ
Posts: 112

Rep: Reputation: 17
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?
 
Old 04-12-2015, 04:25 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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!
 
Old 04-12-2015, 04:47 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,820

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
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.
 
Old 04-13-2015, 11:31 AM   #4
nicedreams
Member
 
Registered: Jun 2003
Location: Phoenix, AZ
Posts: 112

Original Poster
Rep: Reputation: 17
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.
 
Old 04-13-2015, 01:46 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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.
 
Old 04-13-2015, 03:57 PM   #6
nicedreams
Member
 
Registered: Jun 2003
Location: Phoenix, AZ
Posts: 112

Original Poster
Rep: Reputation: 17
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.
 
Old 04-13-2015, 04:27 PM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot Ubuntu 14.04 64bit with greyed out Secure Boot disable option in BIOS? hanspeterii Linux - Newbie 9 05-04-2014 02:32 PM
[SOLVED] debian disable dhcp qrange Debian 3 09-07-2011 09:03 AM
anyway to stop nodm at boot or disable at boot in unstable? linus72 Debian 1 09-02-2009 01:44 AM
Disable debian Firewall!!!!!! shane200_ Debian 1 07-06-2006 04:09 PM
How do you disable going through a proxy in Debian? sanfran49 Linux - Software 2 02-12-2004 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration