This repository was archived by the owner on Jul 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Spin app with Redis trigger stuck in crash loop with no useful logs #201
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'm having trouble running a Spin app with the Redis trigger. The app is stuck in a crash loop. No Spin logs are being produced. Using the steps in #197 the last containerd-shim-spin log line I see is >>> running spin trigger.
My app source code is as follows:
//go:build ignore
package main
import (
"fmt"
"github.com/fermyon/spin/sdk/go/v2/redis"
)
func init() {
// redis.Handle() must be called in the init() function.
redis.Handle(func(payload []byte) error {
fmt.Println("Payload::::")
fmt.Println(string(payload))
return nil
})
}
// main functiion must be included for the compiler but is not executed.
func main() {}spin_manifest_version = 2
[application]
name = "order-processor"
version = "0.1.0"
authors = ["Caleb Schoepp <caleb.schoepp@fermyon.com>"]
description = "Process orders off of redis queue"
[application.trigger.redis]
address = "redis://redis-master.default.svc.cluster.local:6379"
[[trigger.redis]]
channel = "orders"
component = "order-processor"
[component.order-processor]
source = "main.wasm"
allowed_outbound_hosts = []
[component.order-processor.build]
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"- I installed Redis into my cluster via
helm install redis bitnami/redis. - I'm running on a local k3d cluster.
My hunch is that I'm configuring the Redis trigger address incorrectly, but I'm not unsure how to debug further because I'm not getting any useful logs. Is there a way to turn on more verbose tracing/logging?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request