This is the error reported to start the container, docker logs is not, the container is created, but can not start the container
Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused “process_linux.go:449: container init caused “rootfs_linux.go:58: mounting \”/etc/timezone\” to rootfs \”/var/lib/docker/overlay2/132f5ea82c98a1206ccb13e13f06c96737036c722c290e989b462c2d77458a8f/merged\” at \”/var/lib/docker/overlay2/132f5ea82c98a1206ccb13e13f06c96737036c722c290e989b462c2d77458a8f/merged/etc/timezone\” caused \“not a directory\”””: unknown: Are you trying to mount a directory onto a file (or vice-versa)?Check if the specified host path exists and is the expected type
Error: failed to start containers: 6e3a9e751884
Check that it is a mapping problem, after checking that the host does not have a directory to be mapped, create the directory and the container will start normally.
Tag Archives: Operation and maintenance
Solutions to start failed after dhcpd installation
1. SELinux shutdown of Linux
By default, SELinux contains the policy for DHCP, so close SELinux and restart the DHCP service to start it
method:
1) Temporary shutdown (no machine restart): setenforce 0 ## Set SELinux to permission mode ## Setenforce 1 sets SELinux to enforcing mode
2) To modify the configuration file, you need to restart the machine: modify the/etc/SELinux/config file, change SELinux = enforcing to SELinux = disabled, and restart the machine
2. By modifying dhcpd to root, the policy management of SELinux is bypassed
Reproduced in: https://blog.51cto.com/qiansi/1966572
Solutions to start failed after dhcpd installation
1. SELinux shutdown of Linux
By default, SELinux contains the policy for DHCP, so close SELinux and restart the DHCP service to start it
method:
1) Temporary shutdown (no machine restart): setenforce 0 ## Set SELinux to permission mode ## Setenforce 1 sets SELinux to enforcing mode
2) To modify the configuration file, you need to restart the machine: modify the/etc/SELinux/config file, change SELinux = enforcing to SELinux = disabled, and restart the machine
2. By modifying dhcpd to root, the policy management of SELinux is bypassed
Reproduced in: https://blog.51cto.com/qiansi/1966572
Failed to start docker.service: Unit not found(Docker service does not start)
Linux deployment docker appears: failed to start docker.service : unit not found
linux has deployed k8s and other projects before, Some of the remaining dockers are damaged
after re installation, the service always fails: failed to start docker.service : unit not found
warning: if applicable to my situation, it needs to be reinstalled
solution:
Direct Yum update
be sure to restart Linux
Yum install docker
systemctl start docker.service
Solution to pod error “back off restarting failed container”
Solution to pod error “back off restarting failed container”
Phenomenon:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 3m default-scheduler Successfully assigned default/jenkins-master-deploy-6694c4f497-r46fn to master.localdomain
Normal SandboxChanged 85s kubelet, master.localdomain Pod sandbox changed, it will be killed and re-created.
Normal Pulled 83s (x5 over 2m59s) kubelet, master.localdomain Container image "drud/jenkins-master:v0.29.0" already present on machine
Normal Created 83s (x5 over 2m59s) kubelet, master.localdomain Created container jenkins-master
Normal Started 81s (x5 over 2m59s) kubelet, master.localdomain Started container jenkins-master
Warning BackOff 78s (x9 over 2m57s) kubelet, master.localdomain Back-off restarting failed container
Solution.
Add the command to the end of the deployment affirmation image
command: [ “/bin/bash”, “-ce”, “tail -f /dev/null” ]
kind: Deployment
apiVersion: apps/v1beta2
metadata:
labels:
app: jenkins-master
name: jenkins-master-deploy
spec:
replicas: 1
selector:
matchLabels:
app: jenkins-master
template:
metadata:
labels:
app: jenkins-master
spec:
containers:
- name: jenkins-master
image: drud/jenkins-master:v0.29.0
imagePullPolicy: IfNotPresent
command: [ "/bin/bash", "-ce", "tail -f /dev/null" ]
volumeMounts:
- mountPath: /var/jenkins_home/
name: masterjkshome
ports:
- containerPort: 8080
volumes:
- name: masterjkshome
persistentVolumeClaim:
claimName: pvcjkshome