Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run WasmEdge Rust HTTP service #477

Open
rgl opened this issue Feb 10, 2024 · 1 comment
Open

Cannot run WasmEdge Rust HTTP service #477

rgl opened this issue Feb 10, 2024 · 1 comment

Comments

@rgl
Copy link

rgl commented Feb 10, 2024

I'm trying to run my independent WasmEdge Rust HTTP example service (ghcr.io/rgl/wasmedge-http-rust-example:0.0.4) under k3s, but it just enters the CrashLoopBackOff state without any obvious clue.

I'm using:

  • k3s v1.28.5+k3s1
  • k3s containerd v1.7.11-k3s2
  • containerd-shim-wasmedge-v1 0.3.0
  • my k3s playground wasmedge branch https://github.com/rgl/k3s-vagrant/tree/wasmedge (please look at the latest commit to known how containerd-shim-wasmedge-v1 installed and configured)

Please note that it works fine when executed directly by the wasmedge binary as wasmedge target/wasm32-wasi/release/wasmedge-http-rust-example.wasm.

Can you please help me understand why this is happening?

Here's the kubectl describe pods output:

$ kubectl describe pods
Name:                example-wasmedge-6864476bff-2cfb7
Namespace:           default
Priority:            0
Runtime Class Name:  wasmedge
Service Account:     default
Node:                a1/10.11.0.41
Start Time:          Sat, 10 Feb 2024 13:24:52 +0000
Labels:              app=example-wasmedge
                     pod-template-hash=6864476bff
Annotations:         <none>
Status:              Running
IP:                  10.12.1.30
IPs:
  IP:           10.12.1.30
Controlled By:  ReplicaSet/example-wasmedge-6864476bff
Containers:
  example:
    Container ID:    containerd://97c1316ac9cd57f3df72fadda254644d427d7130567acbd9a86e08d126b05562
    Image:           ghcr.io/rgl/wasmedge-http-rust-example:0.0.4
    Image ID:        ghcr.io/rgl/wasmedge-http-rust-example@sha256:13314434e6bf3b7fc322589b2374742e4dec543490d7f6e8fc0d3f686167f62f
    Port:            8080/TCP
    Host Port:       0/TCP
    SeccompProfile:  RuntimeDefault
    State:           Terminated
      Reason:        Error
      Exit Code:     9
      Started:       Sat, 10 Feb 2024 13:24:55 +0000
      Finished:      Sat, 10 Feb 2024 13:24:57 +0000
    Last State:      Terminated
      Reason:        Error
      Exit Code:     9
      Started:       Sat, 10 Feb 2024 13:24:53 +0000
      Finished:      Sat, 10 Feb 2024 13:24:54 +0000
    Ready:           False
    Restart Count:   1
    Limits:
      cpu:     100m
      memory:  32Mi
    Requests:
      cpu:        100m
      memory:     32Mi
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-9rmcj (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  kube-api-access-9rmcj:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Guaranteed
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  12s               default-scheduler  Successfully assigned default/example-wasmedge-6864476bff-2cfb7 to a1
  Normal   Pulled     9s (x2 over 11s)  kubelet            Container image "ghcr.io/rgl/wasmedge-http-rust-example:0.0.4" already present on machine
  Normal   Created    9s (x2 over 11s)  kubelet            Created container example
  Normal   Started    9s (x2 over 11s)  kubelet            Started container example
  Warning  BackOff    7s                kubelet            Back-off restarting failed container example in pod example-wasmedge-6864476bff-2cfb7_default(ed1feb8e-9cf7-4883-ad39-ce2e45e62512)
@Mossaka
Copy link
Member

Mossaka commented Feb 12, 2024

The best way to debug this at the moment is to see the logs in containerd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants