Skip to content

healthcheck segfault #28

Description

@fsacer

Describe the bug
Ghostwritter CLI healthcheck subcommand crashes.

To Reproduce
Run ./ghostwriter-cli-linux healthcheck

Expected Behavior
It's expected to get the output with status of containers and services.

Screenshots

./ghostwriter-cli-linux healthcheck
[+] Checking the status of Docker and the Compose plugin...
[+] Checking Ghostwriter containers and their respective health checks...
[*] Identified zero container issues, now testing services...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x84f498]

goroutine 1 [running]:
github.com/GhostManager/Ghostwriter_CLI/cmd/internal.CheckGhostwriterHealth(0x80?)
        /github/workspace/cmd/internal/utils.go:280 +0x298
github.com/GhostManager/Ghostwriter_CLI/cmd.runHealthcheck(0xc0000d9900?, {0xa3caf8?, 0x4?, 0xa3cafc?})
        /github/workspace/cmd/healthcheck.go:54 +0x2b8
github.com/spf13/cobra.(*Command).execute(0xf18c40, {0xf42cc0, 0x0, 0x0})
        /go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860 +0x691
github.com/spf13/cobra.(*Command).ExecuteC(0xf198c0)
        /go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x38e
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
github.com/GhostManager/Ghostwriter_CLI/cmd.Execute()
        /github/workspace/cmd/root.go:23 +0x1a
main.main()
        /github/workspace/main.go:8 +0xf

Server Specs:

  • OS: Ubuntu
  • Docker: Docker version 28.4.0, build d8eb465 (snap docker)
  • Docker compose: Docker Compose version v2.39.1
  • Ghostwriter: v6.2.3

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions