Skip to content

JetBrains Active Connections counter stuck at 0 despite active usage #18350

Open
@blink-so

Description

@blink-so

Problem Description

The JetBrains Active Connections counter in the Coder UI is perpetually stuck at 0, even when users are actively connected via JetBrains Toolbox or Gateway. This issue has been observed across multiple customers for at least six months.

Current Behavior

  • The connection counter remains at 0 despite confirmed active usage
  • The tracking mechanism relies on a string match (idea.vendor.name=JetBrains) in the forwarded process name, which appears to no longer be used by newer JetBrains processes
  • In some workspaces, even with JetBrains running, no "discovered forwarded JetBrains process" log entry appears

Investigation Results

Based on process analysis in a workspace with active JetBrains usage:

# Active JetBrains processes found:
$ jps -lv
3607 com.jetbrains.toolbox.MainKt -ea -Dfile.encoding=UTF8 ...
11004 com.intellij.idea.Main abort vfprintf -XX:ErrorFile=/home/coder/java_error_in_goland_%p.log ...

The processes are running as:

  • JetBrains Toolbox CLI: com.jetbrains.toolbox.MainKt
  • GoLand IDE: com.intellij.idea.Main

However, these processes may not contain the expected idea.vendor.name=JetBrains property that Coder's detection logic relies on.

Potential Solutions

  1. Update detection logic to recognize modern JetBrains process patterns:

    • Look for com.jetbrains.toolbox.MainKt processes
    • Look for com.intellij.idea.Main processes
    • Check for JetBrains-specific JVM arguments or classpath patterns
  2. Leverage existing experimental flag: The --usage-type=JetBrains flag seems to work on dev.coder.com, suggesting this could be formalized as the default detection method

  3. Implement fallback detection strategies when legacy string matching fails

Expected Behavior

Active JetBrains sessions (via Gateway/Toolbox) should be accurately reflected in the Coder UI's Active Connections metric.

Environment

  • Coder Version: [Current production version]
  • JetBrains Toolbox: 2.6.3.43718
  • IDE: GoLand (via com.intellij.idea.Main)
  • Platform: Linux

Related Issues

Metadata

Metadata

Assignees

Labels

s2Broken use cases or features (with a workaround). Only humans may set this.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions