restart


Bind for 0.0.0.0:443 failed: port is already allocated

On a Docker installation that we have, we updated the image files for our containers using the following command:

docker images --format "{{.Repository}}:{{.Tag}}" | grep ':latest' | xargs -L1 docker pull;

Then we tried to update our container, as usual, using the docker-compose command.

export COMPOSE_HTTP_TIMEOUT=180; # We extend the timeout to ensure there is enough time for all containers to start
docker-compose up -d --remove-orphans;

Unfortunately, we got the following error:

export COMPOSE_HTTP_TIMEOUT=180;
docker-compose up -d --remove-orphans;

Starting entry ... 
Starting entry ... error

ERROR: for entry  Cannot start service entry: driver failed programming external connectivity on endpoint entry (d3a5d95f55c4e872801e92b1f32d9693553bd553c414a371b8ba903cb48c2bd5): Bind for 0.0.0.0:443 failed: port is already allocated

ERROR: for entry  Cannot start service entry: driver failed programming external connectivity on endpoint entry (d3a5d95f55c4e872801e92b1f32d9693553bd553c414a371b8ba903cb48c2bd5): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

We used the docker container ls command to check which container was hoarding port 443, but none was doing so. Because of this, we assumed that docker ran into a bug. The first step we took (and the last) which solved the problem was to restart the docker service as follows:

sudo service docker restart;

This command was enough to fix our problem without messing with docker further.


How to restart or shut down Windows through Remote Desktop 2

Assuming you have the following scenario: you are connected to a remote Windows machine via remote desktop and you need to restart it.
Soon you will realize that there is no restart button on the Start menu to click on….
So.. without that button, how do you restart your machine???

Do not fret as there is a way!

To Restart the remote Windows machine

Press the keys Windows+R on the keyboard together, it will pop-up the run command screen.
In the input line type shutdown /r /t 0 and hit the Enter button to restart the machine immediately.

  • The /r option instructs the machine to reboot
  • The /t 0 option sets the number of seconds to delay before executing the restart to 0 (initiate restart process immediately)

To Shut Down the remote Windows machine

Press the keys Windows+R on the keyboard together, it will pop-up the run command screen.
In the input line type shutdown /s and hit the Enter button to shut down the machine immediately.

To Stop a Shut Down or Restart process

To try and stop a shut down process, type shutdown /a and hit enter, it will attempt to abort the shutdown/restart sequence.
Keep in mind though that there still is a high chance for this to fail.