You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows Server 2012 R2中无法配置Selenium节点问题求助

Troubleshooting Selenium Node Registration Failure on Windows Server 2012 R2

Let’s walk through targeted fixes for your Selenium node registration issue on Windows Server 2012 R2—since other Windows servers work with the same hub setup, the problem is likely specific to this VM’s configuration.

1. Fix the Hub URL Typo First

I spotted a critical typo in your node command: the hub URL uses http:/ instead of http://. Even if you tried switching ports, this invalid URL would break registration. Here’s the corrected command:

java -jar selenium-server-standalone-3.9.0.jar -role node -hub http://10.136.32.140:4444/grid/register

2. Verify Network Reachability Between VM and Hub

First rule out basic network issues:

  • On the Windows Server 2012 R2 VM, open Command Prompt and run ping 10.136.32.140 to confirm the hub machine is reachable. If ping fails, check the VM’s network mode (switch from NAT to Bridged if using a hypervisor) or subnet restrictions.
  • Test port 4444 accessibility with PowerShell: Test-NetConnection 10.136.32.140 -Port 4444. If this returns "Connection refused," the VM is blocked from accessing the hub’s port.

3. Adjust Windows Server Firewall Rules

Windows Server 2012 R2 has stricter default firewall settings:

  • Outbound Rule: Create a new outbound rule to allow TCP traffic to port 4444 (the hub’s port). Go to Windows Defender Firewall > Advanced Settings > Outbound Rules > New Rule.
  • Inbound Rule: Add an inbound rule for the node’s default port (5555) or any custom port you’re using—this lets the hub communicate back to the node.

4. Check Java Version Compatibility

Selenium Server 3.9.0 relies heavily on Java 8 (newer versions like Java 9+ often cause compatibility issues):

  • Run java -version on the VM. If it’s not Java 8, downgrade to a Java 8 update (update 111 or later is recommended for Selenium 3.9.0).
  • Ensure the JAVA_HOME environment variable points to the correct Java 8 installation directory.

5. Enable Verbose Logging to Diagnose Exact Errors

Add logging to your node command to get detailed failure messages:

java -jar selenium-server-standalone-3.9.0.jar -role node -hub http://10.136.32.140:4444/grid/register -log selenium-node-debug.log

Open the generated selenium-node-debug.log file—it will show specific issues like connection timeouts, protocol mismatches, or permission errors that are breaking registration.

6. Disable Proxy Settings (If Applicable)

Windows Server 2012 R2 might have proxy settings that block the node from reaching the hub:

  • Go to Internet Options > Connections > LAN Settings and uncheck "Use a proxy server for your LAN." If you need a proxy, add the hub’s IP address to the exceptions list.

内容的提问来源于stack exchange,提问作者Abdulhameed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:42:40