user5113188
user5113188

Reputation:

Windows 10, Docker problem with Port 80, Ports are not available: listen tcp 0.0.0.0:80:

I was trying to run docker app...

λ docker run -p 80:80 -p 8080:8080 --name billingapp sotobotero/udemy-devops:0.0.1
docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

I was trying to apply this answer... https://stackoverflow.com/a/65274083/811293

λ netsh int ipv4 add excludedportrange protocol=tcp startport=80 numberofports=1
The process cannot access the file because it is being used by another process.

I was trying with https://stackoverflow.com/a/66198584/811293

D:\Programs\cmder\config\profile.d
λ docker container rm billingapp
billingapp

D:\Programs\cmder\config\profile.d
λ net stop winnat
The Windows NAT Driver service is not started.

More help is available by typing NET HELPMSG 3521.


D:\Programs\cmder\config\profile.d
λ docker run -p 80:80 -p 8080:8080 --name billingapp sotobotero/udemy-devops:0.0.1
docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

D:\Programs\cmder\config\profile.d
λ

Checking with Resource Monitor... enter image description here

Checking with netstat

D:\Programs\cmder\config\profile.d
λ netstat -aon | find /i "listening"  | findStr ":80"
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:808            0.0.0.0:0              LISTENING       4140
  TCP    [::]:80                [::]:0                 LISTENING       4
  TCP    [::]:808               [::]:0                 LISTENING       4140

D:\Programs\cmder\config\profile.d
λ

Using tasklist

D:\Programs\cmder\config\profile.d
λ tasklist /FI "PID eq 4"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System                           4 Services                   0        144 K

D:\Programs\cmder\config\profile.d
λ

VERSION Docker Desktop:

PS C:\WINDOWS\system32> Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | select DisplayName,DisplayVersion | where {$_.DisplayName -like "Docker*"}

DisplayName    DisplayVersion
-----------    --------------
Docker Desktop 2.5.0.0


PS C:\WINDOWS\system32>

In other side:

D:\Programs\cmder\config\profile.d                             
λ docker --version                                             
Docker version 19.03.13, build 4484c46d9d                      
                                                               
D:\Programs\cmder\config\profile.d                             
λ docker version                                               
Client: Docker Engine - Community                              
 Cloud integration: 1.0.1                                      
 Version:           19.03.13                                   
 API version:       1.40                                       
 Go version:        go1.13.15                                  
 Git commit:        4484c46d9d                                 
 Built:             Wed Sep 16 17:00:27 2020                   
 OS/Arch:           windows/amd64                              
 Experimental:      false                                      
                                                               
Server: Docker Engine - Community                              
 Engine:                                                       
  Version:          19.03.13                                   
  API version:      1.40 (minimum version 1.12)                
  Go version:       go1.13.15                                  
  Git commit:       4484c46d9d                                 
  Built:            Wed Sep 16 17:07:04 2020                   
  OS/Arch:          linux/amd64                                
  Experimental:     false                                      
 containerd:                                                   
  Version:          v1.3.7                                     
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175   
 runc:                                                         
  Version:          1.0.0-rc10                                 
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd   
 docker-init:                                                  
  Version:          0.18.0                                     
  GitCommit:        fec3683                                    
                                                               
D:\Programs\cmder\config\profile.d    

What other solution I need try to apply?

Upvotes: 2

Views: 7131

Answers (1)

Dennis
Dennis

Reputation: 91

I had the same problem, got rid of it with this command

NET stop HTTP

it stopped the print queue service ("Druckwarteschlange" in German).

Bad side effect, you can't use your printer anymore..

Upvotes: 8

Related Questions