1. Environmental Science
System ：CentOS 7.3
Environmental Science ： virtual machine
Received an on-site question ,k8s Environment nginx Of pod All start exception .
#kubectl get pod |grep nginx
nginx-7945cf468c-z7z9r 0/1 Running 0 10m17m
see pod There is no valid information in the log , Then enter the nginx Of pod, perform nginx Binary system , Report errors Illegal instruction (core dumped)
~# kubectl exec -ti nginx-7945cf468c-z7z9r bash bash-4.4# /usr/local/openresty/nginx/sbin/nginx -h Illegal instruction (core dumped)
3. Guess and answer
In view of the above problems, we have the following conjecture ：
1. Image corruption 2. The system has security software installed 3. The system has done kernel or parameter upgrade
Judge the problem 1： Image corruption , So I found nginx pod Before compiling nginx base Mirror image , direct docker run Execute after startup nginx Binary system , The question is the same ;
Judge the problem 2： According to some understanding , Three in one was installed before the scene , And Ruixing , But it’s all shut down , There is no relevant process ;
Judge the problem 3： It is understood that no kernel upgrade or system parameter modification has been done in the field environment .
After thinking and finding out, I got the following sentence ：
So I checked it with the following command cpu Instruction set
#grep -q sse4_2 /proc/cpuinfo && echo “SSE 4.2 supported” || echo “SSE 4.2 not supported” SSE 4.2 not supportedj
actually CPU I won’t support it SSE 4.2 Instruction set . It’s supported to look at the running environment
# grep -q sse4_2 /proc/cpuinfo && echo “SSE 4.2 supported” || echo “SSE 4.2 not supported” “SSE 4.2 supported”
So we asked if the virtual machine had been migrated , Sure enough, I moved .
So I found support again SSE 4.2 After the physical machine of instruction set is migrated , Environmental restoration ,nginx Normal start , Problem solved .
Reference documents ：https://github.com/openresty/docker-openresty/issues/49