omargnagy / subterfuge

Automatically exported from code.google.com/p/subterfuge
GNU General Public License v3.0
0 stars 0 forks source link

Port already in use - Error #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. start Subterfuge

What is the expected output? What do you see instead?
Expected: Should run without errors
Instead: "port is already in use" error
root@kali:~# subterfuge

Subterfuge courtesy of r00t0v3rr1d3 & 0sm0s1z
Validating models...

0 errors found
Django version 1.3.1, using settings 'subterfuge.settings'
Development server is running at http://127.0.0.1:80/
Quit the server with CONTROL-C.
Error: That port is already in use.

What version of the product are you using? On what operating system?
Version: Subterfuge 1.0
OS: Kali Linux
Using an external Alfa network card (wlan1) via USB

Please provide any additional information below.
I tried to collect information about the process that uses port 80.
But I am not sure what to do with the information (while still using BT5 I 
killed the appropriate PID)
See the available info below:

root@kali:~# subterfuge

Subterfuge courtesy of r00t0v3rr1d3 & 0sm0s1z
Validating models...

0 errors found
Django version 1.3.1, using settings 'subterfuge.settings'
Development server is running at http://127.0.0.1:80/
Quit the server with CONTROL-C.
Error: That port is already in use.
----------------------------------------------------------------------

root@kali:~# lsof -i :80
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
python  4603 root    3u  IPv4  16753      0t0  TCP localhost:http (LISTEN)
python  4605 root    3u  IPv4  16753      0t0  TCP localhost:http (LISTEN)
python  4607 root    3u  IPv4  16753      0t0  TCP localhost:http (LISTEN)
python  4623 root    3u  IPv4  16753      0t0  TCP localhost:http (LISTEN)
--------------------------------------------------------------------------------
----

root@kali:~# netstat -an | grep LISTEN
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:80            0.0.0.0:*               LISTEN     
unix  2      [ ACC ]     STREAM     LISTENING     11475    @/tmp/dbus-XXaaEWpAgC
unix  2      [ ACC ]     SEQPACKET  LISTENING     2324     /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     8473     
/var/run/pcscd/pcscd.comm
unix  2      [ ACC ]     STREAM     LISTENING     11477    @/tmp/.ICE-unix/2894
unix  2      [ ACC ]     STREAM     LISTENING     8477     
/var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     10419    @/tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     8167     
@/tmp/gdm-session-EfuWGauv
unix  2      [ ACC ]     STREAM     LISTENING     10420    /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     9561     
/root/.cache/keyring-O6A65i/control
unix  2      [ ACC ]     STREAM     LISTENING     11478    /tmp/.ICE-unix/2894
unix  2      [ ACC ]     STREAM     LISTENING     12770    
/tmp/pulse-995MhWHBFgQk/native
unix  2      [ ACC ]     STREAM     LISTENING     9789     
/tmp/pulse-995MhWHBFgQk/dbus-socket
unix  2      [ ACC ]     STREAM     LISTENING     12457    
/root/.cache/keyring-O6A65i/gpg
unix  2      [ ACC ]     STREAM     LISTENING     12511    
/root/.cache/keyring-O6A65i/pkcs11
unix  2      [ ACC ]     STREAM     LISTENING     12512    
/root/.cache/keyring-O6A65i/ssh
unix  2      [ ACC ]     STREAM     LISTENING     11461    @/tmp/dbus-wR0PUdlEzc
unix  2      [ ACC ]     STREAM     LISTENING     9043     
/tmp/ssh-xEq55GO8ggrD/agent.2894
--------------------------------------------------------------------------------
-----------------

root@kali:~# netstat lpn | grep :80
--------------------------------------------------------------------------------
-------------------

root@kali:~# netstat -ant |grep :80
tcp        0      0 127.0.0.1:80            0.0.0.0:*               LISTEN     
tcp        1      0 127.0.0.1:80            127.0.0.1:57510         CLOSE_WAIT 
tcp        1      0 127.0.0.1:80            127.0.0.1:57508         CLOSE_WAIT 
tcp      330      0 127.0.0.1:80            127.0.0.1:57509         CLOSE_WAIT 
tcp      332      0 127.0.0.1:80            127.0.0.1:57507         CLOSE_WAIT 
root@kali:~# 
--------------------------------------------------------------------------------
------------------

Thank you!
FriFri

Original issue reported on code.google.com by frifrit...@gmail.com on 4 Jan 2014 at 12:07

GoogleCodeExporter commented 8 years ago
I can think of two possibilities. One thing that often happens is apache2 web 
server is running and using port 80. You can type the following command to stop 
apache2: service apache2 stop

It is also possible if you have recently opened and closed Subterfuge - that it 
did not close properly. Sometimes when you "Control + C" Subterfuge, it doesn't 
completely stop running (this is thanks to the Django development server 
Subterfuge uses as a backend and not any of our own code). You can try typing 
the following command to kill every running instance of python: killall python

Original comment by topher.s...@gmail.com on 4 Jan 2014 at 9:16

GoogleCodeExporter commented 8 years ago
O.K. I will keep these two possibilities in mind in case the problem shows up 
again.
I started Subterfuge several times by now and the error only shows up quite 
seldom.

Thank you again!
FriFri

P.S.:
(I do not want to get on your nerves, but it seems there is yet another problem.
I will open a new Issue though, to make sure there are no mix-ups)

Original comment by frifrit...@gmail.com on 4 Jan 2014 at 9:44

GoogleCodeExporter commented 8 years ago

Original comment by topher.s...@gmail.com on 7 Jan 2014 at 12:55

GoogleCodeExporter commented 8 years ago
plz mail me the solution for this (ravi.saikrishna007@gmail.com)

root@unknown:~# netstat -ant |grep :80
tcp6       0      0 :::80                   :::*                    LISTEN

Original comment by ravi.sai...@gmail.com on 6 Nov 2014 at 12:47

GoogleCodeExporter commented 8 years ago
sudo pkill python. It will kill all python processes and you wont have any 
further problems.

Original comment by Pujov...@gmail.com on 13 Jan 2015 at 6:31