hantsy / devops-sandbox

DevOps sandbox
7 stars 4 forks source link

Ports are not available: listen tcp 0.0.0.0:1520: bind: An attempt was made to access a socket in a way forbidden by its access permissions. #2

Open JannemanDev opened 4 years ago

JannemanDev commented 4 years ago

After succesful building the image I ran docker run --name oracleExpress -p 1520:1521 -p 5500:5500 -e ORACLE_PWD=test -v c:\temp\oracle\oradata:/opt/oracle/oradata oracle/database:18.4.0-xe

But I got an error docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:1520: bind: An attempt was made to access a socket in a way forbidden by its access permissions. The port 1520 was not in use but it was a reserved port. The fix is to just use a different port that's not in the reserved range. You can check this range with netsh int ipv4 show excludedportrange protocol=tcp

hantsy commented 4 years ago

I do not change the port, if you think this is a problem, raise an issue on Oracle/Docker-Images.

JannemanDev commented 4 years ago

Yeah not your fault, probably my setup and/or Docker thingy. Wanted to document it with my workaround/solution for others.