DPC 19.10 upgrade shows UI "Failed to connect to localhost"
Summary: After upgrade to DPC 19.10, the DPC UI shows "Failed to connection to localhost/127.0.0.1:8143."
Symptoms
After upgrade to DPC 19.10, you are not able to access the DPC UI.
Checking the /var/log/dpc/elg/elg.log file you see the following errors:
2024-05-09 13:34:54,911 DEBUG reactor-http-epoll-4 c.d.i.i.k.c.IAMCliRunner Received error during execution: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:8143; nested exception is io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:8143
Running the docker ps command show that the Keycloak container has 'EXITED':
/data01/docker/volumes/keycloak-postgres-db/_data # docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 05dd8ebc74e8 dpd/dpc/iam-service:latest "java -cp iam:iam/li…" 52 minutes ago Up 48 minutes 127.0.0.1:8870->8870/tcp, ::1:8870->8870/tcp iam-service 34a6b3c4c5c4 dpd/dpc/dp-keycloak:2.3.0-2 "/opt/keycloak/bin/k…" 52 minutes ago Exited (127) 10 minutes ago iam-provider df560f07da93 dpd/dpc/postgres-db:2.3.0-2 "docker-entrypoint.s…" 52 minutes ago Up 49 minutes (healthy) 5432/tcp postgres-db
Checking the docker logs you get the following error:
/data01/docker/volumes/keycloak-postgres-db/_data # docker logs --tail 100 34a6b3c4c5c4 Fatal glibc error: CPU does not support x86-64-v2
Cause
Keycloak version used in DPC 19.10 (Keycloak 21) requires a CPU type of x86-64-v2 or above.
The VM that was built for DPC, does not have that type of CPU, so the Keycloak container is exiting and not running.
Resolution
This issue may be caused by a couple of issues.
- The ESXi host does not support x86-64-v2, most processors made after 2008 support this microarchitecture.
- The VM may have been built without this microarchitecture support.
To resolve this issue, determine if your host supports x86-64-v2.
- If it does, then you can deploy a new VM with that microarchitecture configured and then deploy DPC on that VM.
- If it does not support it, you have to find a host that does support this microarchitecture and move the DPC VM to that host.
To check if your VM supports this, create a cpuinfo.sh script on the Linux VM with the following in it:
#!/usr/bin/awk -f
BEGIN {
while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1
if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1
if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2
if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3
if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4
if (level > 0) { print "CPU supports x86-64-v" level; exit level + 1 }
exit 1
}
Then chmod +x this script file and then run it with the following command:
./cpuinfo.sh
If you get the following output, it is supported:
./cpu-type.sh CPU supports x86-64-v2