Install the Events Service on Linux
This page describes how to install and administer the Events Service on Linux systems through the CLI. Steps for scaling up an embedded Events Service using the Enterprise Console are also included.
The Enterprise Console automates the task of installing and administering an Events Service deployment through either the GUI or CLI. For information on installing Events Service using the Enterprise Console, see Custom Install.
Events Service Host Requirements
Before starting, be sure to review the Release Notes for known issues and late-breaking information on using the Events Service and Enterprise Console. Also, observe the following requirements:
-
The Events Service can be deployed as a single node or as a multi-node cluster of 3 or more nodes.
- The versions of Linux supported include the flavors and versions supported by the Controller, as indicated by Prepare Linux for the Controller.
-
The Events Service must run on a dedicated machine. The machine should not run other applications or processes not related to the Events Service.
- Use appropriately sized hardware for the Events Service machines. The Enterprise Console checks the target system for minimum hardware requirements. For more information on these requirements, see the description of the profile argument to the Events Service install command in Install the Events Service Cluster.
- The Controller and Events Service must reside on the same local network and communicate by the internal network. Do not deploy the cluster to nodes on different networks, whether relative to each other or to the Controller where the Enterprise Console runs. When identifying cluster hosts in the configuration, you will need to use the internal DNS name or IP address of the host, not the externally routable DNS name. For example, in terms of an AWS deployment, use the private IP address such as
172.31.2.19
rather than public DNS hostname such asec2-34-201-129-89.us-west-2.compute.amazonaws.
com.
-
Make sure that the appropriate ports on each Events Service host are open. See Port Settingsfor more information.
-
The Enterprise Console uses an SSH key to access the Events Services hosts. See the section below for information on generating the key.
-
Events Service nodes normally operate behind a load balancer. When installing an Events Service node, the Enterprise Console automatically configures a direct connection from the Controller to the node. If you deploy a cluster, the first primary node is automatically configured as the connection point in the Controller. You will need to reconfigure the Controller to connect through the load balancer VIP after installation, as described below. For sample configurations, see Load Balance Events Service Traffic.
Error if the /tmp Directory is Missing the Execute Permission
.Port Settings
Each machine must have the following ports accessible to external (outside the cluster) traffic:
- Events Service API Store Port: 9080
- Events Service API Store Admin Port: 9081
For a cluster, ensure that the following ports are open for communication between machines within the cluster. Typically, this requires configuring iptables
or OS-level firewall software on each machine to open the ports listed
-
9300 – 9400
The following shows an example of iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9080 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 9081 -j ACCEPT -A INPUT -m state --state NEW -m multiport -p tcp --dports 9300:9400 -j ACCEPT
If a port on the Events Service node is blocked, the Events Service installation command will fail for the node and the Enterprise Console command output and logs will include an error message similar to the following:
failed on host: <ip_address> with message: Uri [http://localhost:9080/_ping] is un-pingable.
If you see this error, make sure that the ports indicated in this section are available to other cluster nodes.
Create the SSH Key
When installing Events Service, you will need to provide the SSH key that the Enterprise Console can use to access Events Service hosts remotely. Before starting, create the PEM public and private keys in RSA format. The key file must not use password protection.
For example, using ssh-keygen
, you can create the key using the following command:
ssh-keygen -t rsa -b 2048 -v -m pem
Configure SSH Passwordless Login
The Enterprise Console needs to be able to access each cluster machine using passwordless SSH. Before starting, enable key-based SSH access.
This setup involves generating a key pair on the Enterprise Console host and adding the Enterprise Console's public key as an authorized key on the cluster nodes. The following steps take you through the configuration procedure for an example scenario. You will need to adjust the steps based on your environment.
If you are using EC2 instances on AWS, the following steps are taken care of for you when you provision the EC2 hosts. At that time, you are prompted for your PEM file, which causes the public key for the PEM file to be copied to the authorized_keys
On the Enterprise Console machine, follow these steps:
./bin/platform-admin.sh add-hosts --hosts <es_host_1> <es_host_2> <es_host_3> --credential <credential name> --platform-name <name of platform>
...
Failed to connect to the remote host. Please verify that the host name and credentials you provided are correct.
For more information, consult the documentation: https://docs.appdynamics.com/display/PRO45/Administer+the+Enterprise+Console#AdministertheEnterpriseConsole-manage-hostsManageHosts
If you encounter this error, use the instructions in this section to double-check your passwordless SSH configuration. Also, you need to and add-hosts
first then install event-service
. If SSH configuration is not setup correctly, add-hosts
commands will fail.
The add-hosts
command is to add hostnames into platforms. During the events-service
installation, the hosts come from the platform hosts, and then they are used on the events-service
. Tune the Operating System for Production Cluster Nodes
Before installing the Events Service cluster, you need to perform a few manual changes as described below. These are particularly relevant for production Events Service deployments. On each node in the cluster, make these configuration changes:
Installing the Events Service Using the GUI
In the GUI, the Express Install option automatically installs an Events Service on the same host as the Controller. The Custom Install option can install an embedded or scaled-up Events Service. If you install an embedded Events Service and want to switch to a scaled-up Events Service, complete the steps described in Scaling Up an Embedded Events Service.
Installing the Events Service Using the CLI
Scaling Up an Embedded Events Service
The following steps describe how to scale up an Events Service that is on a shared host with the Controller. This allows the embedded Events Service to run on a separate host. You can also install the Events Service on a separate host directly by using the Custom Install.
Troubleshooting Installation
If the Enterprise Console crashes or shuts down while installing the Events Service, the GUI may display that the installation is in progress. To resolve this issue, uninstall the Events Service with the CLI. Then, install the Events Service with the CLI.
Handling ClusterFormationFailureHelper Error
When you run new Events Service 23.2.0 on a single node event service cluster, the following error may be displayed.
[WARN ][o.e.c.c.ClusterFormationFailureHelper] [ip] master not discovered yet, this node has not previously joined a bootstrapped cluster, and [cluster.initial_master_nodes] is empty on this node.
To resolve this issue:
- Uninstall the Events Service from Enterprise Console.
- Ensure that you have tuned the operating system for cluster nodes as defined in this section.
- Re-install the Events Service.
Error if the /tmp Directory is Missing the Execute Permission
If the /tmp
directory is missing execute permission, the Events Service installation or upgrade fails with the following errors:
failed to map segment from shared object or
failed to allocate closure
-
Run the following command to verify the execute permission of the folder:
mount | grep '/tmp' /dev/sda1 on /tmp type ext4 (rw,noexec)
-
Check the privileges for the following folders:
mount | grep '/var/tmp' mount | grep 'home'
You can troubleshoot the error by:
- Exporting the files to the Events Service directory.
- Removing the
noexec
mount option for the required directories.
Exporting the Files to the Events Service Directory
- Remove the Events Service files that were added during the failed installation.
-
Locate the binaries of Events Service in the following path:
cd /opt/appdynamics/platform/platform-admin/archives/events-service/<version>cd /opt/appdynamics/platform/platform-admin/archives/events-service/<version>
-
Unzip
events-service.zip
unzip events-service.zip
-
Rename the
events-service.zip
toevents-services.zip.original
.mv events-service.zip events-service.zip.original
-
In the
extracted events-service
directory, add the following lines to both theevents-service.vmoptions
andevents-service-elasticsearch.vmoptions
files:-Djna.tmpdir=/opt/appdynamics/platform/product/events-service/tmp -Djansi.tmpdir=/opt/appdynamics/platform/product/events-service/tmp
-
Archive the
events-service
folder with the modified.vmoptions
files:zip -r events-service.zip events-service
-
Create a temporary directory in the
events-service
folder where.vmoptions
files is mentioned.mkdir -p /opt/appdynamics/platform/product/events-service/tmp
-
Export the temporary directory using the following command:
export TMPDIR=<path/to/es_tmp>
- Install the Events Service using Enterprise Console.
Removing thenoexecMount Option for the Required Directories
Remove thenoexec
Mount Option for the Required Directoriessudo umount /tmp
sudo mount -o remount,rw /tmp