How to Run Commands Across All Nodes
To execute a command on all nodes, use the ecactl cluster exec
command followed by the desired command.
-
Get the hostname of each node:
ecactl cluster exec hostname
-
List running containers on each node:
ecactl cluster exec ecactl containers ps
-
Restart the
turboaudit
container on all three nodes:ecactl cluster exec "ecactl containers stop turboaudit && ecactl containers rm -r turboaudit && ecactl containers up -d turboaudit"
You can run commands that require sudo
, but you will be prompted for the ecaadmin
password each time.
-
Restart the Docker service on all nodes:
ecactl cluster exec sudo systemctl restart docker
Commands
CLI Command | Function |
---|---|
ecactl cluster <command> | Up: Bring up the cluster across all nodes. Down: Bring down the cluster across all nodes. Status: Get the status of all processes and the connection to the HDFS database. Refresh: Use this command on an ECA node when it has restarted and needs to rejoin an existing cluster. |
ecactl cluster remove-docker-networks | Remove all Docker networks to allow ecactl cluster up to recreate them. Use this when the Docker subnet has changed and you need to delete the networks and recreate them with the correct IP information. |
ecactl cluster down --hard | Use this only if the normal down process hangs or a container will not shut down correctly. This command shuts down the database without a clean shutdown process. Use it only if directed by support. |
ecactl cluster up --clean | Clean up Zookeeper data during the cluster up process. WARNING: If you are using a SQL Database this will also wipe out the database configuration. Use this only if directed by support |
ecactl cluster down --bg | Use the --bg flag for a rapid, parallel cluster shutdown during upgrades. Requires version 2.5.7 or later. |
ecactl stats | Return container memory and CPU statistics to view the health of all containers. |
ecactl containers ps | List all running containers. |
ecactl logs --follow iglssvc | Tail the Eyeglass agent logs on a node for debugging. Other services include rmq and fastanalysis . |
ecactl cluster exec <command> | Execute the specified command across all ECA nodes. Run this from the ECA master node. Use only with single commands (not multiple concatenated commands). Example: ecactl cluster exec ecactl containers ps |