Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ports are not available: listen tcp 0.0.0.0/50070: bind: An attempt was made to access a socket in a way forbidden by its access permissions

I am trying to start a docker container with the below command.

docker run -it -p 50070:50070 -p 8088:8088 -p 8080:8080 suhothayan/hadoop-spark-pig-hive:2.9.2 bash 

It ended up with the following error.

docker: error response from daemon: Ports are not available: listen tcp 0.0.0.0/50070: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

As I understand, the error has occurred as the port 50070 is used by another process. I've tried to identify the process in order to kill that with the below command in the command prompt, but it does not give an output nor an error.

netstat -ano | findstr :50080 
like image 258
lse23 Avatar asked Dec 13 '20 05:12

lse23


People also ask

What is a docker programming?

Docker is an open source platform that enables developers to build, deploy, run, update and manage containers—standardized, executable components that combine application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.

What Docker compose up does?

The docker compose up command aggregates the output of each container (like docker compose logs --follow does). When the command exits, all containers are stopped. Running docker compose up --detach starts the containers in the background and leaves them running.


2 Answers

This solution helped me:

net stop winnat docker start container_name net start winnat 
like image 142
Cepr0 Avatar answered Sep 28 '22 05:09

Cepr0


I did this to stop tcp processes =>

  • net stop winnat
  • net start winnat

In this way, the busy port operation is terminated.

This worked for me.

like image 39
Göktuğ Yıldırım Avatar answered Sep 28 '22 04:09

Göktuğ Yıldırım