Skip to content

Desktop process stuck in state where all client requests return "connection refused" #1999

Description

@RebeccaMahany

A device began reporting "connection refused" repeatedly when talking to the /refresh endpoint on Dec 11 for the process for user 502, and then stayed in this state through "failing" to send notifications to user 502 on Dec 12.

Notifications did go through for user 501. @James-Pickett suggests that launcher didn't handle user switching appropriately. When looking through similar logs in Cloud Log, we noticed that this "connection refused" error appears pretty regularly when a user exists with a UID greater than 501 -- i.e. on devices with multiple user accounts.

We should investigate how devices are getting stuck in this state, and figure out an appropriate way to remediate the issue.

Example log:

{
    "time":"2024-12-11T18:52:00.121731Z",
    "level":"ERROR",
    "source":{
        "function":"github.com/kolide/launcher/ee/desktop/runner.(*DesktopUsersProcessesRunner).refreshMenu",
        "file":"/Users/runner/work/launcher/launcher/ee/desktop/runner/runner.go",
        "line":553
    },
    "msg":"sending refresh command to user desktop process",
    "component":"desktop_runner",
    "uid":"502",
    "pid":28623,
    "path":"/usr/bin/sudo",
    "err":"Get \"http://unix/refresh\": dial unix /var/kolide-k2/k2device.kolide.com/desktop_502/desktop.sock_4944: connect: connection refused"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions