Tag: windows 10

Docker and Windows — Unable to Allocate Port

On the most recent iteration of Windows (20H2 build 19042.1052) and Docker Desktop (20.10.7 built Wed Jun 2 11:54:58 2021), I found myself unable to launch my Oracle container. The error indicated that the binding was forbidden.


C:\WINDOWS\system32>docker start oracleDB
Error response from daemon: Ports are not available: listen tcp bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Error: failed to start containers: oracleDB

Forbidden by whom?! Windows, it seems. Checking excluded ports using netsh:

netsh int ipv4 show excludedportrange protocol=tcp

Shows that there are all sorts of ports being forbidden — Hyper-V is grabbing a lot of ports when it starts. To avoid that, you’ve got to add a manual excluded port for the one you want to use.

To reserve the port for your own use, disable Hyper-V (reboot), add a port exclusion, and enable Hyper-V (reboot)

REM Disable Hyper-V
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V 
REM REBOOT ... then add an exclusion for the Oracle DB Port
netsh int ipv4 add excludedportrange protocol=tcp startport=1521 numberofports=1 
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

Now 1521 is reserved for Oracle

Windows 10 Tablet Mode

Now I know the *right* answer is “don’t let your four year old randomly click stuff on your computer” … which is an extension of “don’t let your cat walk/sleep on your keyboard” (a maxim I could never convince my mom was a good rule for computer usage). But I booted my Windows 10 computer to find I no longer had a desktop. I’ve got some theme-colored background with a couple of icons. I can go to all apps. I can get into settings and all sorts of things.

Not a Windows desktop:

And I didn’t even know what this thing was called to Google how to get rid of it. A bunch of random clicking later, and I’ve discovered Windows 10 has a “tablet mode”. Which was turned on – and just like I could never figure out how a sleeping cat managed to hit the three-key command required to rotate an Intel graphics card display by 90º, I have no clue how Anya’s gotten into this particular mode. Luckily it’s easy to undo (click it to turn it off); voila, I’ve got a desktop again.