How to Fix Error Handler Failed to Bind

Aug 3, 2019 09:10 AM
Sep 30, 2019 01:42 PM
637003074757172982.jpg

Why this error occurs?

this error occurs because you may have a server started on this port which you need to start the Metasploit server on it. so to fix this error we have stopped any other server which is trying to use from the same port.

for example, if I had a python simple HTTP server on port 80 and my listener use port 80 this problem will occur.

This is a picture of the error. take a look at it :

637003074105765268.jpg

as you can see, the Metasploit gave me an error wich is telling us that the port (LPORT) you choose is busy now and that why we get an error calling Handler failed to bind to x.x.x.x:y.

what is the solution to this error?

Step 1: Finding PID of the Server

the solution is really easy. first, you need to check which server is using this port and what its PID?

to do that you need to type the following command in your terminal :

lsof -i:80

637003087689249054.jpg

be careful that you have to type your port instead of the 80 in the command. and you can see the command and PID of the python server on port 80.

Step 2: Terminating the Server Which Is Using Our Port

now you have to kill this server to start your Metasploit server on this port.

to do that you need to kill this PID it's simple you just have to type :

kill PID

PID in this tutorial is 1749, so ill put this instead of the PID in my terminal like the picture below :

637003939108155837.jpg

and after hitting enter, any other server on port 80 will terminate and the port will be free to use it :

637003942237954207.jpg

this is how to fix error handler failed to bind , thank you for reading this tutorial and please let us know if you have any other questions and don't forget following us to make more tutorial.

author: Mohamad Chavoshi

email address: mrezach01010@outlook.com

written in: 2019-8-3

telegram Group : join us

Comments

No Comments Exist

Be the first, drop a comment!