-
Notifications
You must be signed in to change notification settings - Fork 71
Troubleshooting Docker
If you're trying to pull the container in Windows and get a timeout error, restart Docker. Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) https://forums.docker.com/t/error-response-from-daemon-get-https-registry-1-docker-io-v2/23741/12
This is caused by Docker not being able to effectively communicate with the Windows Subsystem for Linux (WSL) in Windows 10 build 2004+
You'll need to modify your .wslconfig
file. Steps:
- Open the following location in Windows Explorer (
WIN+E
):%USERPROFILE%
- Note:
%USERPROFILE%
is equivalent toC:\Users\<your user name>
- Note:
- Create the following file if it does not already exist:
.wslconfig
- Add the following code to the file:
[wsl2]
kernelCommandLine = vsyscall=emulate
- Save and close the file
- In Powershell run the following to fully cycle wsl
wsl --shutdown
wsl reboot
I had a port conflict between hbase in the docker image and Sophos antivirus on my Mac, but seemed to be able to resolve it by mapping hbase to a different local port. Hopefully that doesn't create problems down the line, but it seems to work for now. Mentioning in case anybody else has a port conflict error when running docker-compose up.
How do I ssh into the Docker container once it's running? ssh 127.0.0.1:8022
gives me a "Could not resolve hostname" error, as does port 22, as does ssh docker.w261:8022
I applied the hostname mapping per the w261-environment repo.
I got to a bash shell with this. https://stackoverflow.com/questions/30172605/how-do-i-get-into-a-docker-container . It looks like the ssh daemon isn't enabled by default
In case anyone encounters this error while setting up docker environment: "ERROR: for w261-environment_quickstart.cloudera_1 Cannot create container for service quickstart.cloudera: b'Drive has not been shared'"
Solution is to go to docker settings -> Shared Drives and check the box against 'C' to enable sharing C drive between local and docker instance.
If you are required to do so, it needs to be done in BIOS:
- Figure out how to get into BIOS on your Windows machine (most likely by continuously pressing F1 after initializing reboot)
- Find
Virtualization Technology
item in one of the menus (sometimes it's inConfig Settings
, sometimes it's inSecurity
Settings) and enable it. - Reboot.
Error: driver failed programming external connectivity... Bind for 0.0.0.0:50070: unexpected error Permission denied
This issue is due to ports reserved by Hyper-V.
# Display the reserved ports ports.
netsh interface ipv4 show excludedportrange protocol=tcp
# To free the ports, disable Hyper-V . Restart when prompted
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
#Reserve Ports
netsh int ipv4 add excludedportrange protocol=tcp startport=50070 numberofports=1
netsh int ipv4 add excludedportrange protocol=tcp startport=50075 numberofports=1
#Enable Hyper-V
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
My battle is over - finally connected to the class image. Again, for posterity: I am running on a droplet with Ubuntu 16.04. I installed docker via these instructions (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04). First error indicated that my docker-compose installation did not support version: '3' parameter in our docker-compose.yml file, so I changed to version: '2' The next error was ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. and it turns out the tty: true parameter of the docker-compose.yml file needs to be turned to tty: false. For whatever reason (not sure if Ubuntu or PuTTY) it gets hung up on a specific line (I believe where the colored console output would have been a color it can't write [guessing]): docker/compose#3633 Lastly, I ran in detached mode docker-compose up -d which at least expedited things, but also bypassed the console/color issue entirely.