注销时 SSH Selenium 会话崩溃(即使使用 "screen"、"nohup" 等)
SSH Selenium Session Crashes on Logout (even with "screen", "nohup" etc)
我正在 运行通过 SSH 在 Linux 服务器上的 Java 中安装一个 Selenium webscraper,但是浏览器在会话终止时崩溃,尽管有各种尝试来指示该程序在后台 运行。具体来说,我使用了 screen
、tmux
、nohup
、disown
和 setsid
(如此处 https://www.tecmint.com/keep-remote-ssh-sessions-running-after-disconnection/),但结果相似,但效果不佳.我想尝试 VNC 会话,但到目前为止尚未在服务器上启用。
以screen
为例:
- 我输入
screen
,运行程序,正常输出
- 我用
Ctrl+a+d
拆屏,继续正常输出
- 我结束 SSH 会话。输出停止并且(在重新登录并返回到屏幕会话时),我收到错误消息
Exiting due to channel error
Exiting due to channel error
Exiting due to channel error
Exiting due to channel error
Exception in thread "main" org.openqa.selenium.WebDriverException: Failed to decode response from marionette
我已经尝试过几次,所以它在结束 SSH 会话的确切时间崩溃并非巧合。可能出了什么问题,我该如何诊断问题?
系统信息:
OS: Red Hat Enterprise Linux, Linux 3.10.0-1127.10.1.el7.x86_64
Java: 1.8.0_252
Firefox version: Mozilla Firefox 78.3.1esr
Firefox boot options: "--marionette" "-headless" "-foreground" "-no-remote" "-profile"
Gecko driver version: 0.27.0
Selenium version: 3.141.59m revision e82be7d358
SSH client: MobaXTerm, personal version 10.4
通过纯粹的愚蠢试验和错误运气,我尝试将 MobaXTerm 换成 PuTTY(继续使用 screen
),问题消失了。我不知道为什么会这样。宇宙是一个复杂的地方,超出了人类的理解范围。
我正在 运行通过 SSH 在 Linux 服务器上的 Java 中安装一个 Selenium webscraper,但是浏览器在会话终止时崩溃,尽管有各种尝试来指示该程序在后台 运行。具体来说,我使用了 screen
、tmux
、nohup
、disown
和 setsid
(如此处 https://www.tecmint.com/keep-remote-ssh-sessions-running-after-disconnection/),但结果相似,但效果不佳.我想尝试 VNC 会话,但到目前为止尚未在服务器上启用。
以screen
为例:
- 我输入
screen
,运行程序,正常输出 - 我用
Ctrl+a+d
拆屏,继续正常输出 - 我结束 SSH 会话。输出停止并且(在重新登录并返回到屏幕会话时),我收到错误消息
Exiting due to channel error
Exiting due to channel error
Exiting due to channel error
Exiting due to channel error
Exception in thread "main" org.openqa.selenium.WebDriverException: Failed to decode response from marionette
我已经尝试过几次,所以它在结束 SSH 会话的确切时间崩溃并非巧合。可能出了什么问题,我该如何诊断问题?
系统信息:
OS: Red Hat Enterprise Linux, Linux 3.10.0-1127.10.1.el7.x86_64
Java: 1.8.0_252
Firefox version: Mozilla Firefox 78.3.1esr
Firefox boot options: "--marionette" "-headless" "-foreground" "-no-remote" "-profile"
Gecko driver version: 0.27.0
Selenium version: 3.141.59m revision e82be7d358
SSH client: MobaXTerm, personal version 10.4
通过纯粹的愚蠢试验和错误运气,我尝试将 MobaXTerm 换成 PuTTY(继续使用 screen
),问题消失了。我不知道为什么会这样。宇宙是一个复杂的地方,超出了人类的理解范围。