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

Azure Ubuntu虚拟机部署Neo4j社区版后无法通过浏览器访问的排查请求

Let's walk through troubleshooting this ERR_CONNECTION_REFUSED error step by step—here's what to check to get your Neo4j Community Edition accessible via browser from outside your Azure Ubuntu 18.04 VM:

1. First, Confirm Neo4j is Running Properly

Start by checking if the Neo4j service is active and healthy:

  • Run sudo systemctl status neo4j—you should see active (running) in green. If it's stopped or failed, start it with sudo systemctl start neo4j and set it to auto-start on boot with sudo systemctl enable neo4j.
  • To dig into startup errors, view real-time logs with sudo journalctl -u neo4j -f—look for lines mentioning failed bindings, missing dependencies, or configuration issues.
2. Double-Check Your Neo4j Configuration

It’s easy to miss a comment or typo in neo4j.conf—verify these critical settings:
Open the config file with sudo nano /etc/neo4j/neo4j.conf and ensure these lines are uncommented (no leading #) and set correctly:

dbms.connector.http.listen_address=0.0.0.0:7474
dbms.connector.bolt.listen_address=0.0.0.0:7687

Also, check for dbms.default_listen_address—if this is set to a specific IP (not 0.0.0.0), it will override the individual connector settings. Either comment this line out or set it to 0.0.0.0.

After making changes, restart Neo4j to apply them: sudo systemctl restart neo4j

3. Check Ubuntu’s Local Firewall (ufw)

Azure’s NSG rules don’t override Ubuntu’s built-in firewall. Even if you didn’t explicitly enable ufw, it might be active by default:

  • Check status with sudo ufw status
  • If active, allow incoming traffic on Neo4j ports:
    sudo ufw allow 7474/tcp
    sudo ufw allow 7687/tcp
    sudo ufw reload
    
4. Validate Your Azure NSG Inbound Rules

You mentioned adding a rule for 7474, but let’s confirm it’s configured correctly:

  • Priority: Ensure no higher-priority deny rule is blocking traffic (deny rules take precedence over allow rules)
  • Source: If you restricted the source to a specific IP, make sure your local machine’s public IP is included. For testing, temporarily set it to 0.0.0.0/0 (remember to lock this down later for security)
  • Protocol & Port: Confirm it’s set to TCP and port 7474 (include 7687 too if you plan to use Bolt connections)
  • Association: Verify the NSG is attached to your VM’s network interface or the subnet it’s deployed in
5. Test Connectivity Locally on the VM

Rule out service-level issues by testing from inside the VM:
Run curl http://localhost:7474—if you get a response with Neo4j’s welcome page HTML or JSON, the service is working locally, and the problem is network-related. If this fails, go back to checking service status and configs.

6. Ensure Java 11 is Properly Installed

Neo4j 4.x and newer require Java 11—double-check your version:
Run java -version—you should see output like openjdk version "11.0.x". If you have a different version, install Java 11:

sudo apt update
sudo apt install openjdk-11-jdk

Set it as the default Java version with sudo update-alternatives --config java and select the Java 11 option.

7. Check for Port Conflicts

Make sure no other process is using port 7474:
Run sudo ss -tulpn | grep 7474—if another process is listed, stop it or modify Neo4j’s port in neo4j.conf (e.g., change 7474 to 7475), then update your firewall and NSG rules to match.


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.09 19:27:55