Troubleshooting - truongnhatbui/techtrends GitHub Wiki
Help Center - Container Orchestration Get help on the following frequently asked issues
Issue #1 I built the python image and created a container ... everything went well but when i visit in the browser 127.0.0.1:5000, I was getting empty response. It turn out that the app was unreachable outside the container.
The problem was I was only binding to the localhost interface. NB: You should be binding to 0.0.0.0 if you want the container to be accessible from outside. After changing:
if __name__ == '__main__':
app.run()
to
if __name__ == '__main__':
app.run(host='0.0.0.0')
The app was reachable.
Issue #2 I am getting CreateContainerError message on pod when trying to deploy container to Kubernetes
First please run the command kubectl get po podname in order go get the error description. If the error message is "Error: failed to create containerd container: get apparmor_parser version: exec: "apparmor_parser": executable file not found in $PATH" then quick fix is to run below line in the command prompt
zypper install -t pattern apparmor
Issue #3 When building docker image, I am receiving "go.mod file not found in current or any parent directory." error message
Adding "RUN go mod init" line before "RUN go build..." into the Dockerfile solves this issue.
Issue #4 I am getting ImagePullBackOff message on pod when trying to deploy container to Kubernetes
Most probably, you entered the container URL incorrectly when deploying the Kubernetes cluster. Please double check your container URL in the Docker Hub. We might be wrong as well. To get a more accurate error message run to check on more details of what is going on:
kubectl describe po PODNAME
Issue #5 Did anyone else get this when trying to label a deployment in exercise 21?: kubectl label deploy nginx-alpine app=nginx tag=alpine --namespace demo
error: 'app' already has a value (nginx-alpine), and --overwrite is false
Are we meant to overwrite it? Yes, app=nginx is already there, that's why is asking to overwrite, hence you need to add only the tag=alpine Tag or you can add --overwrite==true
Issue #6 I ran port-forward on a pod to view it in the browser, however, it is saying that the site cannot be reached in my browser window. Try this command:
kubectl port-forward --address 0.0.0.0 po/<pod-id> 6111:6111
Take a look at the Vagrantfile. By default, 192.168.50.4 is used as a fixed IP address there so on your local machine, browse 192.168.50.4:6111
Issue #7 When running vagrant up I am receiving the following error:
There was an error while executing VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Command: [“hostonlyif”, “create”]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 95 of file VBoxManageHostonly.cpp
You probably have a Mac computer but depending on the OS version it can be solvable or not. Please look at the following forum article for the solution virtualbox.org • View topic - Installation on MacOS 10.15.1 fails . If you are using M1 know that Virtualbox does not support M1.
M1 MacOS instructions* for replacing VirtualBox. This will install k8s
brew install kind
brew install kubectl
kind create cluster
kubectl get no
Issue #8 When running vagrant up I am receiving the following error: Getting this error when trying to run vagrant up command Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2' (VERR_INTNET_FLT_IF_NOT_FOUND). VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
Disable the virtual box network adapters in the control panel (Windows 10), then use the vagrant reload command in Git Bash
Issue #9 wget -q0 IP address is not returning a response
The command is wget -qO- IP Address
Issue #10 When running vagrant up, I am receiving VERR_INTNET_FLT_IF_NOT_FOUND error message
i solved it doing the following steps:
Go to Device Manager on Windows (type "Device Manager" on the botton left lens)
Click on Network Adapter
and then right click and disable any "VitualBox Host-Only Ethernet Adapter" and re-enable it.
now vagrant up should work.
Issue #11 When running docker version, I am receiving an error message: error during connect: In the default daemon configuration on Windows, the docker client must run with elevated priviliges to connect
The error was gone after restarting the PC and signing in to Docker Desktop App https://forums.docker.com/t/restart-docker-service-from-command-line/27331/10
Issue #12 When running vagrant up I got this error: There was an error while executing VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Stderr: VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
Enabling virtualization in the computer BIOS helps. Here is the link
Issue #13 kubectl cluster-info is returning the following error message: Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it. To fix this issue, Run the command below to tell the kubernetes where to find the configuration file: [Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + ".kube\config", [EnvironmentVariableTarget]::Machine)
Please make sure to replace $HOME + ".kube\config" with "/etc/rancher/k3s/k3s.yaml" if you have k3s installed.
Issue #14 There was an error while executing VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Stderr: VBoxManage.exe: error: Call to WHvSetupPartition failed: ERROR_SUCCESS (Last=0xc000000d/87) (VERR_NEM_VM_CREATE_FAILED)
You need to go into Windows Features and uncheck BOTH Hyper-V as well as Containers. Reinstalling the latest Virtualbox and rebooting your PC should help.
Issue #15 Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version: dial unix /var/run/docker.sock: connect: permission denied
You need to add your user name using sudo usermod -aG docker USER
Issue #16 When running vagrant up I got this error: There was an error while executing VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
This is typically because you don't have VT-x or AMD-V enabled in your BIOS. Or worse yet, your CPU doesn't support virtualization. Following are the instructions if you have the first case.
Issue #17 When running vagrant up I'm getting an error that states that "The box you're attempting to add has no available version that matches the constraints you requested. Please double-check your settings. Also verify that if you specified version constraints, that the provider you wish to use is available for these constraints.
It means that the OpenSuSe version you are trying to pull is not available. In your Vagrantfile comment or remove the line that says config.vm.box_version
Issue #18 If you have Mac OS Catalina or higher and virtualbox is throwing an error: Kernel driver not installed (VERR_VM_DRIVER_NOT_INSTALLED)
It has to do with permissions in your operating system. Please follow this article to fix it.
Issue #19 I encountered this error when running the port-forward for my application. docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:6111: bind: address already in use.
Some app is already using port 6111, try picking any other port.
Please reach out to us, Student Advocates, if you find a solution to your error so we can help new students solve it. @Abdulquadri.Adewale.Mumuney @Atibhi @FedTheBug @WhiteHatJoker