G.O.Ps - Voting app - CrashLoopBackOff

Hi All ,

Im getting the below error for kodekloud/examplevotingapp_worker image.

System.AggregateException: One or more errors occurred. (No such device or address) —> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No such device or address
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
at System.Net.Dns.<>c.b__14_1(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
— End of inner exception stack trace —
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Npgsql.NpgsqlConnector.Connect(NpgsqlTimeout timeout) at Npgsql.NpgsqlConnector.RawOpen(NpgsqlTimeout timeout) at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout) at Npgsql.ConnectorPool.Allocate(NpgsqlConnection conn, NpgsqlTimeout timeout) at Npgsql.NpgsqlConnection.OpenInternal() at Worker.Program.OpenDbConnection(String connectionString) in /code/src/Worker/Program.cs:line 74 at Worker.Program.Main(String[] args) in /code/src/Worker/Program.cs:line 19 ---> (Inner Exception #0) System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No such device or address at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult) at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult) at System.Net.Dns.<>c.<GetHostAddressesAsync>b__14_1(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task`1 promise, Boolean requiresSynchronization)<—

I googled the error and found few solutions , but none of it worked.

set DNSpolicy : ClusterFirst to Default
added commands to run shell
changed the liveness & readiness probes
tried with previous version
tried with the original version from Dockersamples repositories
checked mumshad’s git repo , I don’t find any dockerfile for this image , there is no overview in docker hub as well

please let me know how to fix this

note: other images from kodekloud and others are working fine , only worker is throwing the error

1 Like

I was having the same issue and solved it by changing the image with dockersamples/examplevotingapp_worker:latest.
I also did that for the voting and result apps.

I just tried that, still the same error happens. I am lost for words.

The voting app crashes because the postgres pod crashes. The postgres pod crashes because the root password has not been set. To set the root password, add the environment variable POSTGRES_PASSWORD to the container like this:

containers:
- name: postgres
image: postgres:9.4
env:
- name: POSTGRES_PASSWORD
value: password

I encountered the same issue. Did anyone able to solve the error?

I think I tried michael’s suggestion and it worked! Do those practice exams well! I passed my CKA after a year worth of prep and still only got 77 on my exam, it was sure very hard!

1 Like

@hellolin324

Thanks! I was able to run it after using Postgres with tag 9.4. Using the latest tag will cause an issue even you have the env values.