Title
#kolide
Miguel

Miguel

10/22/2020, 10:51 AM
hi all! I have Kolide Fleet 3.2.0 installed on CentOS 7.8.2003:
fleetctl - version 3.2.0
branch:       master
revision:     07534c766beb7bf9a022d29572d88493ecef8f7c
build date:   2020-10-08T19:25:24Z
build user:   zwass
go version:   go1.15
fleet version
fleet version 3.2.0
When I try to make a simple (in the same server):
fleetctl login
I get this error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xa4d1c9]
goroutine 1 [running]:
<http://github.com/kolide/fleet/server/service.(*Client).url(...)|github.com/kolide/fleet/server/service.(*Client).url(...)>
/Users/zwass/dev/fleet/server/service/client.go:128
<http://github.com/kolide/fleet/server/service.(*Client).doWithHeaders(0x0|github.com/kolide/fleet/server/service.(*Client).doWithHeaders(0x0>, 0xc0c65a, 0x4, 0xc1934b, 0x14, 0xb7a320, 0xc000440000, 0xc00033c780, 0x5, 0x2000, ...)
/Users/zwass/dev/fleet/server/service/client.go:87 +0x69
<http://github.com/kolide/fleet/server/service.(*Client).Do(0x0|github.com/kolide/fleet/server/service.(*Client).Do(0x0>, 0xc0c65a, 0x4, 0xc1934b, 0x14, 0xb7a320, 0xc000440000, 0x4824fc, 0x18205e0, 0xc0000f2280)
/Users/zwass/dev/fleet/server/service/client.go:106 +0x19b
<http://github.com/kolide/fleet/server/service.(*Client).Login(0x0|github.com/kolide/fleet/server/service.(*Client).Login(0x0>, 0x10b6aa8, 0x1, 0x10b6aa8, 0x1, 0x0, 0x0, 0x0, 0x0)
/Users/zwass/dev/fleet/server/service/client_sessions.go:18 +0xfe
main.loginCommand.func1(0xc0000cef20, 0x0, 0xc0000cef20)
/Users/zwass/dev/fleet/cmd/fleetctl/login.go:70 +0xc6
<http://github.com/urfave/cli.HandleAction(0xb1f700|github.com/urfave/cli.HandleAction(0xb1f700>, 0xc0001eafa0, 0xc0000cef20, 0xc0000a9800, 0x0)
/Users/zwass/dev/go/pkg/mod/github.com/urfave/cli@v1.20.0/app.go:490 +0x82
<http://github.com/urfave/cli.Command.Run(0xc0d5c9|github.com/urfave/cli.Command.Run(0xc0d5c9>, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc1a218, 0x15, 0xc3dc2d, ...)
/Users/zwass/dev/go/pkg/mod/github.com/urfave/cli@v1.20.0/command.go:210 +0x9fb
<http://github.com/urfave/cli.(*App).Run(0xc000204b60|github.com/urfave/cli.(*App).Run(0xc000204b60>, 0xc00009a020, 0x2, 0x2, 0x0, 0x0)
/Users/zwass/dev/go/pkg/mod/github.com/urfave/cli@v1.20.0/app.go:255 +0x768
<http://github.com/urfave/cli.(*App).RunAndExitOnError(0xc000204b60)|github.com/urfave/cli.(*App).RunAndExitOnError(0xc000204b60)>
/Users/zwass/dev/go/pkg/mod/github.com/urfave/cli@v1.20.0/app.go:276 +0x53
main.main()
/Users/zwass/dev/fleet/cmd/fleetctl/fleetctl.go:44 +0x828
Any clue about how to handle this? I cannot find anythin in github/inet. Thanks for your help. M.
zwass

zwass

10/22/2020, 6:00 PM
What do you get for
fleetctl config get address
?
Miguel

Miguel

10/22/2020, 10:16 PM
default.address => https://172.XX.XX.XX:8080, the IP for this server.
10:17 PM
If I query from other server, it goes OK...
10:17 PM
thx
zwass

zwass

10/22/2020, 10:17 PM
If I query from other server, it goes OK...
I don't understand this. Can you explain more?
Miguel

Miguel

10/22/2020, 11:05 PM
I have downloaded fleetctl on another server, configure with "fleetctl config set --address" the remote kolide address, then it works.
11:06 PM
But when executing fleetctl in the same kolide server, it doesn't work 😞
zwass

zwass

10/23/2020, 5:20 PM
Do you have something configured for
fleetctl config get rootca
? Can you make sure this exactly matches what is found on the working machine? I'm not sure that this is your issue, but I did find a bug in which we improperly handle an error parsing the certificate information that could lead to a segfault like you are getting.
Miguel

Miguel

10/23/2020, 9:14 PM
Let's see:
fleetctl config get rootca
default.rootca => /dev/null
Is this ok?
9:15 PM
mmm on the working machine is
./fleetctl config get rootca
default.rootca =>
9:18 PM
ooooooooooooh, removing rootca from .fleet/config and.. IT WORKS!!!
9:18 PM
THANKS!
zwass

zwass

10/23/2020, 10:01 PM
Great! I've filed an issue (https://github.com/kolide/fleet/issues/2338) to fix the segfault as well.