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

[Bug Report]: k8sgpt serve panic: runtime error: invalid memory address or nil pointer dereference #109

Closed
3 of 4 tasks
shturec opened this issue Jul 10, 2024 · 1 comment

Comments

@shturec
Copy link

shturec commented Jul 10, 2024

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

0.3.37

Kubernetes Version

1.28.0

Host OS and its Version

No response

Steps to reproduce

  1. With a default configuration (/Users//Library/Application Support/k8sgpt/k8sgpt.yaml) including multiple specific backends, neither of which is OpenAI
  2. Run k8sgpt serve

Expected behaviour

Descriptive error for missing --backend flag with non-default (openai) backend configurations.

Actual behaviour

k8sgpt serve
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x102e297e0]

goroutine 1 [running]:
github.com/k8sgpt-ai/k8sgpt/cmd/serve.init.func1(0x140001dce00?, {0x102e2d786?, 0x4?, 0x102e2d78a?})
github.com/k8sgpt-ai/k8sgpt/cmd/serve/serve.go:152 +0x500
github.com/spf13/cobra.(*Command).execute(0x105b5b380, {0x105d9d388, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x105b57160)
github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:1039
github.com/k8sgpt-ai/k8sgpt/cmd.Execute({0x1036baa18?, 0x0?}, {0x1036bde88?, 0x100c567c0?}, {0x1036bdf70?, 0x140000021c0?})
github.com/k8sgpt-ai/k8sgpt/cmd/root.go:59 +0xa0
main.main()
github.com/k8sgpt-ai/k8sgpt/main.go:25 +0x4c

Additional Information

configuration:

ai:
    providers:
        - name: localai
          model: llama3
          baseurl: http://localhost:11434/v1
          temperature: 0.7
          topp: 0.5
          topk: 50
          maxtokens: 2048
        - name: amazonbedrock
          model: anthropic.claude-v2:0
          temperature: 0.7
          providerregion: us-east-1
          topp: 0.5
          topk: 50
          maxtokens: 2048
    defaultprovider: ""
kubeconfig: ""
kubecontext: ""

@shturec
Copy link
Author

shturec commented Jul 10, 2024

wrong place to open this issue.
closing in favor of k8sgpt-ai/k8sgpt#1180

@shturec shturec closed this as completed Jul 10, 2024
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

1 participant