Issue Node & Controller configuration

Issue Report

Environment

  • Operating System: Unbuntu server (over proxmox)
  • Space Acres/Advanced CLI/Docker: Advanced CLI with cluster mode
  • Latest release possible at 18/012025

Problem

I’m trying to open a node for queries. I’m currently building somethin wich requiere http connectin to this cluster node.

But when I had the possibility to listen for rpc, the controller fail for any valable reason.

# /etc/systemd/system/subspace_controller.service

[Unit]
Description="subspace controller"
Requires=network-online.target
After=network-online.target

[Service]
User=subspace_controller
Group=subspace_controller
WorkingDirectory=/opt/subspace_controller/
ExecStart=subspace_controller cluster \
        --prometheus-listen-on 0.0.0.0:8081 \
         --nats-server nats://subspace-alpha-node.mythologic.fr:4222  --nats-server nats://subspace-beta-node.mythologic.fr:4222  \
         controller \
        --cache-group "subspace-beta-node" \
        --base-path /opt/subspace_controller \
        --node-rpc-url ws://192.168.1.9:9944 \
        --listen-on /ip4/0.0.0.0/tcp/30533 \
        --allow-private-ips



StandardOutput=append:/var/log/subspace_controller/controller.log
StandardError=append:/var/log/subspace_controller/controller.log
LimitNOFILE=infinity

Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
# /etc/systemd/system/subspace_node.service

[Unit]
Description="subspace node"
After=network-online.target

[Service]
User=subspace_node
Group=subspace_node
WorkingDirectory=/opt/subspace_node/
ExecStart=subspace_node run \
    --farmer \
    --chain mainnet \
    --name subspace-beta-node \
    --base-path /opt/subspace_node/ \
    --blocks-pruning archive \
    --state-pruning archive \
    --listen-on /ip4/0.0.0.0/tcp/50334 \
    --dsn-listen-on /ip4/0.0.0.0/udp/50434/quic-v1 \
    --dsn-listen-on /ip4/0.0.0.0/tcp/50434 \
    --prometheus-listen-on 0.0.0.0:9080 \
    --rpc-listen-on 192.168.1.9:9944 \
    --rpc-cors all \
    --sync full

StandardOutput=append:/var/log/subspace_node/node.log
StandardError=append:/var/log/subspace_node/node.log


Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

So when i remove

    --rpc-listen-on 192.168.1.9:9944 \
    --rpc-cors all \

all work, but if those option are set, then logs loop on this.

Error: Failed to create caching proxy node client: ErrorObject { code: InternalError, message: "Internal error", data: None }
2025-01-17T19:32:42.185002Z  INFO subspace_farmer::commands::cluster::controller: Connecting to node RPC url=ws://192.168.1.9:9944
2025-01-17T19:32:42.185018Z  INFO async_nats: event: connected
2025-01-17T19:32:42.187981Z  INFO subspace_farmer::node_client::caching_proxy_node_client: Downloading all segment headers from node...
2025-01-17T19:32:42.192188Z  INFO subspace_farmer::node_client::caching_proxy_node_client: Downloaded all segment headers from node successfully
Error: Failed to create caching proxy node client: ErrorObject { code: InternalError, message: "Internal error", data: None }
2025-01-17T19:32:47.399420Z  INFO subspace_farmer::commands::cluster::controller: Connecting to node RPC url=ws://192.168.1.9:9944
2025-01-17T19:32:47.399442Z  INFO async_nats: event: connected
2025-01-17T19:32:47.402221Z  INFO subspace_farmer::node_client::caching_proxy_node_client: Downloading all segment headers from node...
2025-01-17T19:32:47.446232Z  INFO subspace_farmer::node_client::caching_proxy_node_client: Downloaded all segment headers from node successfully

Beside this, the node work fine, and queries does the job, only the cluster is failing.

We discussed about it here Discord

Let me know if you need more info.

Try adding --rpc-methods unsafe as in Docker example here: Install | Farm from Anywhere

The reason is that by default it listens on localhost (127.0.0.1) and allows unsafe requests there, but for anything else unsafe requests are denied by default, hence the error.

Make sure to not expose such endpoint publicly though.