3 replaced http://stackoverflow.com/ with https://stackoverflow.com/
source | link

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

Here is a quick solution without modifying anything in your script.

Look if any process with the same name is already running by issuing following command.

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script.

There is another way as per this linklink.

While creating socket, make use of follwoing option.

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

By enabling this option, socket will allow reusing the same address even if it's not terminated properly.

Hope it helps.

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

Here is a quick solution without modifying anything in your script.

Look if any process with the same name is already running by issuing following command.

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script.

There is another way as per this link.

While creating socket, make use of follwoing option.

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

By enabling this option, socket will allow reusing the same address even if it's not terminated properly.

Hope it helps.

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

Here is a quick solution without modifying anything in your script.

Look if any process with the same name is already running by issuing following command.

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script.

There is another way as per this link.

While creating socket, make use of follwoing option.

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

By enabling this option, socket will allow reusing the same address even if it's not terminated properly.

Hope it helps.

2 more technical information
source | link

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

LooksHere is a quick solution without modifying anything in your script.

Look if any process with the same name is already running by issuing following command.

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script. (Reference :

There is another way as per this http://stackoverflow.com/questions/19071512/socket-error-errno-48-address-already-in-use)link.

That should work probablyWhile creating socket, make use of follwoing option.

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

By enabling this option, socket will allow reusing the same address even if it's not terminated properly.

Hope it helps.

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

Looks if any process with the same name is running by

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script. (Reference : http://stackoverflow.com/questions/19071512/socket-error-errno-48-address-already-in-use)

That should work probably.

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

Here is a quick solution without modifying anything in your script.

Look if any process with the same name is already running by issuing following command.

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script.

There is another way as per this link.

While creating socket, make use of follwoing option.

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

By enabling this option, socket will allow reusing the same address even if it's not terminated properly.

Hope it helps.

1
source | link

Looks like while terminating / testing the script, your process might not be terminated properly and some part of it still running, occupying the same port.

Looks if any process with the same name is running by

    ps aux | grep <script-name>

If yes, kill it by

sudo kill -9 <process-id>

Restart the script. (Reference : http://stackoverflow.com/questions/19071512/socket-error-errno-48-address-already-in-use)

That should work probably.