Skip to content

[BUG] Virtual node isn't working with meshcore #6319

Closed

Description

@AutonomousDev

Describe the bug
Using the virtual node settings with a meshcore source node isn't connecting.

To Reproduce
Steps to reproduce the behavior:

  1. Have a Meshcore companion node as a connected Source over TCP/IP
  2. In the source settings check the enable virtual source button. Save source settings.
  3. On a companion or other app try to connect to the virtual source node using meshmonitors IP address and the port 5000 from the virtual node settings.
  4. See error: TCP connection failed: SocketException Connection refused (OS Error: Connection refused, errno = 111), address = [My MeshMonitor IP here], port = 54346

Expected behavior
app should connect to the virtual node.

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Environment (please complete the following information):

  • Host OS: Pi OS Docker
  • Deployment type: Docker latest
  • Any networking customizations (Reverse proxies, Cloudflare tunnels, Tailscale, etc) No
    • docker-compose files are very helpful for networking-related issues. Default docker file from the setup tutorial.
  • Database backend: Default in docker setup
  • Node type: Heltec V4
  • Node Connection Type: Wifi virtual node
  • If this is about VirtualNode, then what client are you using for testing? I tested with the official Meshcore app, MeshCore Open and agessaman/meshcore-bot

Additional context

If you do not follow this template, your issue may be ignored or delayed due to lack of information.

Activity

  1. Yeraze commented on Nov 10, 2026

    @Yeraze
    Owner

    Thanks for the report. I checked for duplicates and found none open. The earlier MeshCore Virtual Node issues (#4535, #5350, #5597, #5916, #5933) are all closed and were about protocol behaviour once a client is connected. Yours is a connection-level failure.

    What I found in the code

    • Saving a MeshCore source's settings restarts its manager, and the Virtual Node server starts after the companion connects (startVirtualNodeServer in meshcoreManager.ts). If the source is not currently connected to the Heltec, the VN listener is never bound.
    • Your error says port 54346, but you configured 5000. "Connection refused" means nothing was listening at that address and port. The app may be using a different port than the one you configured.
    • The default docker-compose.yml publishes only 8080:3001 and 1883:1883. The Virtual Node port is not published, so a client on another machine can't reach it even if the VN is running inside the container.

    Things to try

    1. Add the VN port to the ports: section of your compose file, for example - "5000:5000", then run docker compose up -d. Alternatively, use network_mode: host.
    2. Confirm the source shows as Connected in MeshMonitor after you save.
    3. In your client, enter the host's LAN IP with port exactly as configured (5000).

    Information that would help

    • The container logs just after saving the source (docker logs meshmonitor 2>&1 | grep -i "virtual node"). Look for "Failed to start Virtual Node server" or a "listening on port" line.
    • Your docker-compose.yml ports section.
    • The VN port shown in the source settings (it should be 5000), and where port 54346 comes from.
    • The output of ss -ltn | grep 5000 on the host.

    If the logs show the server listening and the port published, but connections are still refused, I'll dig further.

    -- Authored by Roger 🤓


    Generated by Claude Code

  2. Yeraze commented on Nov 10, 2026

    @Yeraze
    Owner

    One more note on the error text. In a Dart/Flutter SocketException for a refused connection, port = 54346 is usually the phone's own local (ephemeral) port, not the port it dialled. So the app probably did try 5000, and nothing answered there.

    That points to the port not being reachable from the phone. Two quick checks:

    1. The MeshCore source's Dashboard card shows a Virtual Node badge when the server is listening. The source's Virtual Node section shows Server running. If neither appears, the source isn't connected to the Heltec, or the server failed to start (see the log line from my earlier comment).
    2. If it is running, publish the port in your compose file (- "5000:5000") and recreate the container. See the MeshCore Virtual Node docs for a compose example.

    -- Authored by Roger 🤓


    Generated by Claude Code

  3. AutonomousDev commented on Nov 10, 2026

    @AutonomousDev
    Author

    This was my fault. I needed to open the port on the docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions