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

从外部IP连接Google Compute Engine上的Bitcoin Core失败求助

Troubleshooting Bitcoin Core RPC Connection Issues on Google Compute Engine

Let's break down the potential issues and actionable fixes for your two connection problems:

1. First, Rule Out Google Cloud VPC Firewall Restrictions

Even if you disabled the Windows Server local firewall, Google Compute Engine has a separate VPC-level firewall that blocks incoming traffic by default—this is the most common overlooked step here:

  • Go to your GCE Console, navigate to VPC Network > Firewall.
  • Create a new ingress rule (or edit an existing one) with these settings:
    • Targets: Select your specific VM instance
    • Source IP ranges: Either 192.185.35.200/32 (to allow only your Hostgator server) or 0.0.0.0/0 (if you need to allow all external IPs)
    • Protocols and ports: Check tcp and enter 8332
  • Save the rule and wait 1-2 minutes for it to propagate.

2. Fix Bitcoin Core Configuration File Issues

Your current config has syntax gaps and missing settings that could block external connections:

Correct Syntax Errors

The rpcallowip entry should not contain spaces around the equals sign. Update your bitcoin.conf to:

deprecatedrpc=1
dbcache=1000
txindex=1
server=1
rpcuser=myusername
rpcpassword=mypassword
rpcport=8332
rpcallowip=192.185.35.200  # No spaces before/after =

Add rpcbind to Allow External Connections

By default, Bitcoin Core only binds the RPC server to 127.0.0.1 (localhost), so it won't accept connections from external IPs even if ports are open. Add this line to your config:

rpcbind=0.0.0.0  # Binds to all network interfaces on the VM

Restart Bitcoin Core

After making these changes, fully shut down and restart Bitcoin Core—config updates won't take effect until the service is restarted.

3. Verify Connectivity with Diagnostic Tools

On your Hostgator server, run these commands to test if the port is reachable:

For Windows Hostgator Servers (PowerShell)

Test-NetConnection 35.195.0.35 -Port 8332

Look for TcpTestSucceeded : True in the output. If this is False, the issue is still network-related (double-check your GCE firewall rules).

For Linux Hostgator Servers

telnet 35.195.0.35 8332

A blank screen means the port is open; a "connection refused" message confirms the port is still blocked at the network level.

4. Check Bitcoin Core Logs for Detailed Errors

Open the debug.log file in your Bitcoin Core data directory (usually %APPDATA%\Bitcoin\debug.log on Windows) and look for these common error entries:

  • RPC connection from 192.185.35.200 rejected → Indicates rpcallowip is misconfigured
  • RPC authentication failed → Double-check that your rpcuser and rpcpassword match what you're using in your connection request
  • Binding RPC on address 0.0.0.0 port 8332 failed → Port 8332 might be used by another service on your Windows VM

5. Final Checks

  • Confirm your GCE VM's external IP is static (not ephemeral)—if it changed, your connection target will be invalid.
  • On Windows Server, ensure no third-party security software (like advanced antivirus tools) is blocking port 8332.

内容的提问来源于stack exchange,提问作者Ola Fashade Samson

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.25 03:33:03