Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

consoleproxy.session.timeout is honoured for noVNC sessions but not legacy VNC/RDP/AJAX viewers

未关闭
#13,858 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
java
领域
backend

调研方向

首先阅读 ConsoleProxyVncClient、ConsoleProxyRdpClient 和 ConsoleProxyNoVncClient 中的 ConsoleProxy.VIEWER_LINGER_SECONDS、ConsoleProxy.sessionTimeoutMillis 和 isFrontEndAlive()。将 consoleproxy.session.timeout 设置为高于 180000 ms 以重现问题,然后验证 legacy VNC、RDP、AJAX 和 noVNC 会话是否都使用配置的空闲超时,而不是单独的 180 秒阈值。

由索引模型根据 Issue 内容生成。

描述

component:console-proxy
problem

consoleproxy.session.timeout is now honoured for noVNC console sessions (#12810, PR #13058), but VNC/RDP/AJAX-based console viewers still rely on a separate, hardcoded idle threshold: ConsoleProxy.VIEWER_LINGER_SECONDS (180 seconds), used by isFrontEndAlive() in ConsoleProxyVncClient, ConsoleProxyRdpClient, and ConsoleProxyNoVncClient.

This means the effective idle timeout for a console session now depends on which viewer/hypervisor path served it:

  • noVNC sessions: idle timeout follows the configured consoleproxy.session.timeout (both via ConsoleProxyGCThread and, since PR #13058, the WebSocket session's own idle timeout).
  • Legacy VNC/RDP/AJAX sessions: idle timeout is still fixed at 180 seconds regardless of the consoleproxy.session.timeout setting.

An admin who sets consoleproxy.session.timeout to, say, 30 minutes to keep long-idle sessions open will still see legacy VNC/RDP/AJAX sessions get dropped after 3 minutes — an inconsistency that's confusing and undocumented.

versions

ACS 4.20+ (any branch carrying the PR #13058 / equivalent noVNC timeout fix)

The steps to reproduce the bug
  1. Set the global setting consoleproxy.session.timeout to a value well above 180000 ms (e.g. 1800000 ms / 30 minutes).
  2. Open a console session that uses the legacy VNC/RDP/AJAX path (e.g. a hypervisor or console mode that doesn't route through noVNC).
  3. Leave the session idle.
  4. Observe the session is torn down after ~180 seconds, not after the configured consoleproxy.session.timeout.
  5. Compare against a noVNC console session under the same setting, which correctly honours the configured value.
What to do about it?

Derive VIEWER_LINGER_SECONDS from the same configured consoleproxy.session.timeout value (ConsoleProxy.sessionTimeoutMillis) instead of keeping it as an independent hardcoded constant, so all console viewer types (noVNC, VNC, RDP, AJAX) honour one single, consistently-configured idle timeout.

This was flagged during review of PR #13058 (https://github.com/apache/cloudstack/pull/13058#discussion_r3309508273) but deliberately left out of that PR's scope, since it's a noVNC-focused backport and touching isFrontEndAlive() for the legacy viewer types is a broader behavioural change that deserves its own review/testing pass.

主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 20 小时
30 天内合并 PR
27

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。