Starting Aerospike EE on docker throws Exited (1) error

Hi,

Trying to deploy Aerospike EE edition with Docker.

There seems to be an error in start-up doc which states:

$ sudo docker run -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 -v <DIRECTORY>:/etc/aerospike/ -e "FEATURE_KEY_FILE=/etc/aerospike/features.conf" aerospike/aerospike-server-enterprise.

I believe the correct way would be

cd /etc/aerospike
 sudo docker run -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 -v "$(pwd):/etc/aerospike/" -e "FEATURE_KEY_FILE=/etc/aerospike/features.conf" aerospike/aerospike-server-enterprise

However, this throws error as follows

 docker ps -a
CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS                      PORTS                                                                    NAMES
b13b046474a5        aerospike/aerospike-server-enterprise   "/entrypoint.sh asd"     31 minutes ago      Exited (1) 26 minutes ago                                                                            aerospike

The log does not say much:

docker logs aerospike
link eth0 state up
link eth0 state up in 0
link eth0 state up
link eth0 state up in 0

The config file used is as follows:

cat aerospike.conf
# Aerospike database configuration file for use with systemd.

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

logging {
        ##console {
        file /tmp/aerospike.log {
                context any info
        }
}

network {
        service {
                address localhost
                port 3000
                access-address 127.0.0.1
        }

        heartbeat {

                mode mesh                   # Send heartbeats using Mesh (Unicast) protocol
                address localhost       # (Optional) (Default: any) IP of the NIC on
                                            # which this node is listening to heartbeat
                port 3002                   # port on which this node is listening to
                                            # heartbeat
                mesh-seed-address-port localhost 3002 # IP address for seed node in the cluster
                                                          # This IP happens to be the local node
                mesh-seed-address-port rhes76 3002 # IP address for seed node in the cluster

                # 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
        }
}

security {               # (Optional, Enterprise Edition only) to enable
                         # ACL on the cluster
    enable-security true

    # Write the audit trail to syslog (optional).
    syslog {
        local 0 # write to "local0" facility as well as to default syslog sink

        report-authentication true
        report-user-admin true
        report-sys-admin true
        report-violation true
    }

    # Write audit trail to aerospike log file (optional).
    log {
        report-authentication true
        report-user-admin true
        report-sys-admin true
        report-violation true
        report-data-op test seta # report successful data transactions on set "seta" in namespace "test"
    }
}

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

        storage-engine memory

Appreciate any advice.

Thanks,

Mich

OK I sorted this one out and managed to create a docker for Aerospike Enterprise Edition with security plus both Aerospike-Kafka and Aerospike-Spark connectors on host running RHES 7.6

docker run -tid --net=host -v /etc/aerospike:/opt/aerospike/etc -v /etc/aerospike:/etc/aerospike -v /ssd/aerospike/ee/data:/opt/aerospike/data -v /opt/aerospike/etc/ee:/var/log -e "FEATURE_KEY_FILE=/etc/aerospike/features.conf" -e "LOGFILE=/var/log/aerospike.log" --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server-enterprise /usr/bin/asd --foreground --config-file /etc/aerospike/aerospike.conf
[root@rhes75 ~]# docker ps -a
CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS                    PORTS                                                                    NAMES
cd7ffc2f9041        ches/kafka                              "/start.sh"              36 minutes ago      Up 4 minutes              7203/tcp, 0.0.0.0:9094->9092/tcp                                         kafka_broker2
ef4f60ddb3a6        ches/kafka                              "/start.sh"              36 minutes ago      Up 4 minutes              7203/tcp, 0.0.0.0:9093->9092/tcp                                         kafka_broker1
6a8495ef9155        ches/kafka                              "/start.sh"              37 minutes ago      Up 4 minutes              7203/tcp, 0.0.0.0:9092->9092/tcp                                         kafka_broker0
e8039ace57e9        jplock/zookeeper                        "/opt/zookeeper/bin/…"   About an hour ago   Up 56 minutes (healthy)   0.0.0.0:2181->2181/tcp, 0.0.0.0:2888->2888/tcp, 0.0.0.0:3888->3888/tcp   zookeeper
77136f22858b        aerospike/aerospike-server-enterprise   "/entrypoint.sh /usr…"   2 hours ago         Up 2 hours                                                                                         aerospike

Will try to add the process to my GitHub

HTH,

Mich

Hi @Mich_Talebzadeh

The docker run command that you used initially looks fine. I see that you mentioned the container did not start successfully. Since you haven’t configured console {} logging in aerospike.conf file, docker logs will not show aerospike logs. Were you able to confirm what issue or exact error it was initially?

docker run -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 -v <DIRECTORY>:/etc/aerospike/ -e "FEATURE_KEY_FILE=/etc/aerospike/features.conf" aerospike/aerospike-server-enterprise

The <DIRECTORY> here could be any path on your host machine, where features.conf (Enterprise license) file is present.

Also your aerospike.conf file seems to be missing a } in the end. Is this the error that prevented the container from starting.

Thanks.