agones icon indicating copy to clipboard operation
agones copied to clipboard

the pod status is running ,but GameServer status is Unhealthy

Open rexleimo opened this issue 2 years ago • 1 comments

What happened: image image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Agones version: laster
  • Kubernetes version (use kubectl version): version difference between client (1.24) and server (1.22) exceeds the supported minor version skew of +/-1
  • Cloud provider or hardware configuration:
  • Install method (yaml/helm): yaml
  • Troubleshooting guide log(s):
  • Others:

rexleimo avatar Aug 11 '22 10:08 rexleimo

Unfortunately I can't help you without more information- there are a lot of reasons a game server might be unhealthy.

Can you take a look at https://agones.dev/site/docs/guides/health-checking/ to understand how the healthchecks work for game servers and see if that helps you understand? And if not, can you add some additional information to this ticket?

roberthbailey avatar Aug 13 '22 06:08 roberthbailey

An example that I ran into of why this might happen is if the second container in the pod comes up too slowly. A game server pod typically has an agones-gameserver-sidecar container and and a separate game server container (simple-game-server in your case).

With the default health checking settings, it can be a bit tight - by default if it takes more than 15s between the start of the sidecar container and the start of the game server container, Agones will mark the GameServer as Unhealthy, which is what happened in my case. You can see this in the events from kubectl describe right after the pod has started.

If your setup for whatever reason is just prone to slower starts, you can health checking per the docs mentioned in https://github.com/googleforgames/agones/issues/2708#issuecomment-1213803021. For example, I'm running:

apiVersion: "agones.dev/v1"
kind: GameServer
metadata:
  generateName: "simple-game-server-"
spec:
  health:
    failureThreshold: 6
[...]

If none of this information helps and the problem persists, please reopen this ticket with more information, including a kubectl describe pod on the game server pod. Thanks!

zmerlynn avatar Nov 08 '22 01:11 zmerlynn