Search code examples
aerospike

Aerospike heartbeat configuration for single server, error "Unable to find any suitable network device for node ID"


I want to run Aerospike server in single-server mode. Now I have this configuration:

service {
    paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
    service-threads 4
    transaction-queues 4
    transaction-threads-per-queue 4
    proto-fd-max 15000
}

logging {
    console {
        context any info
    }
}

network {
    service {
        address 127.0.0.1
        port 3000
    }

    heartbeat {
        mode multicast
        multicast-group 239.1.99.222
        port 9918

        # To use unicast-mesh heartbeats, remove the 3 lines above, and see
        # aerospike_mesh.conf for alternative.

        interval 150
        timeout 10
    }

    fabric {
        port 3001
    }

    info {
        port 3003
    }
}

namespace test {
    replication-factor 1
    memory-size 20M
    default-ttl 1d # 30 days, use 0 to never expire/evict.

    storage-engine memory
}

And when I try to start server I got error in the log:

"Unable to find any suitable network device for node ID"

I don't want server to be available to internet. How to achieve this and fix the issue?


Solution

  • The Node ID is generated using the MAC id of the interface on the host.

    https://github.com/aerospike/aerospike-server/blob/master/cf/src/socket.c#L2470

    If you dont have any of the default interface names that aerospike is aware of, then you might get this error.

    To fix this problem, you can specify your interface name.

    http://www.aerospike.com/docs/operations/troubleshoot/startup#problem-with-network-interface

    To avoid exposing your aerospike node on internet, you can bind it only to localhost or to a private interface only or use other network tools/devices to avoid exposing the server port such as firewall or ACL. Best way to avoid exposing aerospike on internet is to ensure that the server hosting aerospike is not exposed to internet. If that is not doable then restrict your aerospike port access to your aerospike clients IP only using firewall. Also, you can use database credentials available in enterprise edition.

    http://www.aerospike.com/docs/guide/security.html