knative / serving

Kubernetes-based, scale-to-zero, request-driven compute
https://knative.dev/docs/serving/
Apache License 2.0
5.59k stars 1.16k forks source link

Error: timeout: service 'helloworld-go' not ready after 600 seconds #14229

Closed zurrehma closed 12 months ago

zurrehma commented 1 year ago

Hi Experts, getting below error while deploying application via knative cli:

kn service create helloworld-go --namespace production --image=docker.io/zahid401/helloworld-go --env TARGET="Go Sample v1"
Warning: Kubernetes default value is insecure, Knative may default this to secure in a future release: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation, spec.template.spec.containers[0].securityContext.capabilities, spec.template.spec.containers[0].securityContext.runAsNonRoot, spec.template.spec.containers[0].securityContext.seccompProfile
Creating service 'helloworld-go' in namespace 'production':

  0.102s The Route is still working to reflect the latest desired specification.
  0.131s ...
  0.156s Configuration "helloworld-go" is waiting for a Revision to become ready.
 22.583s ...
 22.584s Ingress has not yet been reconciled.
Error: timeout: service 'helloworld-go' not ready after 600 seconds
Run 'kn --help' for usage

pod status:


kubectl describe pod helloworld-go-00001-deployment-5b5b7b64db-hcblm -n production
Name:                      helloworld-go-00001-deployment-5b5b7b64db-hcblm
Namespace:                 production
Priority:                  0
Service Account:           default
Node:                      kluff-cluster-worker3/172.20.0.2
Start Time:                Fri, 04 Aug 2023 19:08:08 +0500
Labels:                    app=helloworld-go-00001
                           pod-template-hash=5b5b7b64db
                           serving.knative.dev/configuration=helloworld-go
                           serving.knative.dev/configurationGeneration=1
                           serving.knative.dev/configurationUID=04e2a193-ed8d-4dfd-8d06-096a0db19ae1
                           serving.knative.dev/revision=helloworld-go-00001
                           serving.knative.dev/revisionUID=71daaed8-32a6-429d-9d94-cf4c79d8eb84
                           serving.knative.dev/service=helloworld-go
                           serving.knative.dev/serviceUID=3e6400ae-f89b-465b-861b-a4fbd71bcfa3
Annotations:               client.knative.dev/updateTimestamp: 2023-08-04T14:08:05Z
                           client.knative.dev/user-image: docker.io/zahid401/helloworld-go
                           serving.knative.dev/creator: kubernetes-admin
Status:                    Terminating (lasts <invalid>)
Termination Grace Period:  300s
IP:                        10.244.3.13
IPs:
  IP:           10.244.3.13
Controlled By:  ReplicaSet/helloworld-go-00001-deployment-5b5b7b64db
Containers:
  user-container:
    Container ID:   containerd://71cdc72ff8498e6baeba5fd3e4e481fa3c4f063b8f6f48db76a06cceffe7d902
    Image:          index.docker.io/zahid401/helloworld-go@sha256:4b2011ce643cbfa7bb2fdd53f8ffab9520c2dc30b31b1148461293f7515e0502
    Image ID:       docker.io/zahid401/helloworld-go@sha256:4b2011ce643cbfa7bb2fdd53f8ffab9520c2dc30b31b1148461293f7515e0502
    Port:           8080/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Fri, 04 Aug 2023 19:08:26 +0500
    Ready:          True
    Restart Count:  0
    Environment:
      TARGET:           Go Sample v1
      PORT:             8080
      K_REVISION:       helloworld-go-00001
      K_CONFIGURATION:  helloworld-go
      K_SERVICE:        helloworld-go
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-5ffn7 (ro)
  queue-proxy:
    Container ID:   containerd://612a6d01862490684efa9ac7c5c53c8072ac82793ee59db0636515004686ee2d
    Image:          gcr.io/knative-releases/knative.dev/serving/cmd/queue@sha256:dabaecec38860ca4c972e6821d5dc825549faf50c6feb8feb4c04802f2338b8a
    Image ID:       gcr.io/knative-releases/knative.dev/serving/cmd/queue@sha256:dabaecec38860ca4c972e6821d5dc825549faf50c6feb8feb4c04802f2338b8a
    Ports:          8022/TCP, 9090/TCP, 9091/TCP, 8012/TCP, 8112/TCP
    Host Ports:     0/TCP, 0/TCP, 0/TCP, 0/TCP, 0/TCP
    State:          Running
      Started:      Fri, 04 Aug 2023 19:08:26 +0500
    Ready:          True
    Restart Count:  0
    Requests:
      cpu:      25m
    Readiness:  http-get http://:8012/ delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:
      SERVING_NAMESPACE:                        production
      SERVING_SERVICE:                          helloworld-go
      SERVING_CONFIGURATION:                    helloworld-go
      SERVING_REVISION:                         helloworld-go-00001
      QUEUE_SERVING_PORT:                       8012
      QUEUE_SERVING_TLS_PORT:                   8112
      CONTAINER_CONCURRENCY:                    0
      REVISION_TIMEOUT_SECONDS:                 300
      REVISION_RESPONSE_START_TIMEOUT_SECONDS:  0
      REVISION_IDLE_TIMEOUT_SECONDS:            0
      SERVING_POD:                              helloworld-go-00001-deployment-5b5b7b64db-hcblm (v1:metadata.name)
      SERVING_POD_IP:                            (v1:status.podIP)
      SERVING_LOGGING_CONFIG:                   
      SERVING_LOGGING_LEVEL:                    
      SERVING_REQUEST_LOG_TEMPLATE:             {"httpRequest": {"requestMethod": "{{.Request.Method}}", "requestUrl": "{{js .Request.RequestURI}}", "requestSize": "{{.Request.ContentLength}}", "status": {{.Response.Code}}, "responseSize": "{{.Response.Size}}", "userAgent": "{{js .Request.UserAgent}}", "remoteIp": "{{js .Request.RemoteAddr}}", "serverIp": "{{.Revision.PodIP}}", "referer": "{{js .Request.Referer}}", "latency": "{{.Response.Latency}}s", "protocol": "{{.Request.Proto}}"}, "traceId": "{{index .Request.Header "X-B3-Traceid"}}"}
      SERVING_ENABLE_REQUEST_LOG:               false
      SERVING_REQUEST_METRICS_BACKEND:          prometheus
      TRACING_CONFIG_BACKEND:                   none
      TRACING_CONFIG_ZIPKIN_ENDPOINT:           
      TRACING_CONFIG_DEBUG:                     false
      TRACING_CONFIG_SAMPLE_RATE:               0.1
      USER_PORT:                                8080
      SYSTEM_NAMESPACE:                         knative-serving
      METRICS_DOMAIN:                           knative.dev/internal/serving
      SERVING_READINESS_PROBE:                  {"tcpSocket":{"port":8080,"host":"127.0.0.1"},"successThreshold":1}
      ENABLE_PROFILING:                         false
      SERVING_ENABLE_PROBE_REQUEST_LOG:         false
      METRICS_COLLECTOR_ADDRESS:                
      HOST_IP:                                   (v1:status.hostIP)
      ENABLE_HTTP2_AUTO_DETECTION:              false
      ROOT_CA:                                  
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-5ffn7 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  kube-api-access-5ffn7:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason     Age               From               Message
  ----     ------     ----              ----               -------
  Normal   Scheduled  98s               default-scheduler  Successfully assigned production/helloworld-go-00001-deployment-5b5b7b64db-hcblm to kluff-cluster-worker3
  Normal   Pulling    97s               kubelet            Pulling image "index.docker.io/zahid401/helloworld-go@sha256:4b2011ce643cbfa7bb2fdd53f8ffab9520c2dc30b31b1148461293f7515e0502"
  Normal   Pulled     81s               kubelet            Successfully pulled image "index.docker.io/zahid401/helloworld-go@sha256:4b2011ce643cbfa7bb2fdd53f8ffab9520c2dc30b31b1148461293f7515e0502" in 16.779733227s (16.779749469s including waiting)
  Normal   Created    80s               kubelet            Created container user-container
  Normal   Started    80s               kubelet            Started container user-container
  Normal   Pulled     80s               kubelet            Container image "gcr.io/knative-releases/knative.dev/serving/cmd/queue@sha256:dabaecec38860ca4c972e6821d5dc825549faf50c6feb8feb4c04802f2338b8a" already present on machine
  Normal   Created    80s               kubelet            Created container queue-proxy
  Normal   Started    80s               kubelet            Started container queue-proxy
  Normal   Killing    19s               kubelet            Stopping container queue-proxy
  Normal   Killing    19s               kubelet            Stopping container user-container
  Warning  Unhealthy  8s (x2 over 18s)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 503
phutaneVinayak commented 1 year ago

Getting same issue

dprotaso commented 1 year ago

Have you installed the knative component that programs the networking layer?

https://knative.dev/docs/install/yaml-install/serving/install-serving-with-yaml/#install-a-networking-layer