Django Server Error port is already in use

0 votes

Restarting the Django server displays the following error:

this port is already running....

This problem occurs specifically on Ubuntu and not other operating systems. 

How can I free up the port to restart the server?

Jun 26, 2020 in Python by kartik
• 37,510 points
1,407 views

1 answer to this question.

0 votes

Hello @kartik,

Just type:

sudo fuser -k 8000/tcp. 

This should kill all the processes associated with port 8000.

For osx users you can use sudo lsof -t -i tcp:8000 | xargs kill -9

Hope it helps!!

Thank You!!

answered Jun 26, 2020 by Niroj
• 82,880 points

Related Questions In Python

+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,440 points
4,286 views
0 votes
1 answer

What is the use of raw_input function in Python?

raw_input fuction is no longer available in ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
919 views
0 votes
1 answer

Raw_input method is not working in python3. How to use it?

raw_input is not supported anymore in python3. ...READ MORE

answered May 5, 2018 in Python by aayushi
• 750 points
3,088 views
0 votes
1 answer

Error:Python3.4 can't install mysql-python

Hello @kartik, You can resolved this by the ...READ MORE

answered Jun 24, 2020 in Python by Niroj
• 82,880 points
1,822 views
0 votes
1 answer

What is `related_name` used for in Django?

Hello @kartik, The related_name attribute specifies the name of the ...READ MORE

answered Jun 26, 2020 in Python by Niroj
• 82,880 points
10,364 views
+1 vote
1 answer

How can I build multiple submit buttons django form?

Hiii @kartik, You can use self.data in the clean_email method to access ...READ MORE

answered Jun 26, 2020 in Python by Niroj
• 82,880 points
2,277 views
0 votes
1 answer

Error: port is already in use of Django Server

Hii @kartik, Just type sudo fuser -k 8000/tcp. This ...READ MORE

answered May 6, 2020 in Python by Niroj
• 82,880 points
13,496 views
0 votes
1 answer

How to check if an element is present in a Django queryset?

Hello @kartik, You can use the following code: if ...READ MORE

answered May 27, 2020 in Python by Niroj
• 82,880 points
14,198 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP