Skip to content

axon-server installation (Debian / Ubuntu)

Step 1 - Prerequisites

Elasticsearch stores all of the collected data by axon-server. Let's install Java 8 and Elasticsearch first.

Installing JDK

Elasticsearch supports either OpenJDK or Oracle JDK. Since Oracle has changed the licensing model as of January 2019 we suggest using OpenJDK.

Run the following commands for OpenJDK:

sudo apt-get update
sudo apt-get install default-jdk

Run the following commands for Oracle JDK:

sudo apt-get update
sudo apt-get install dirmngr
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update
sudo apt-get install oracle-java8-installer

Once you've accepted the license agreement the JDK will install.

Installing Elasticsearch

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
sudo dpkg -i elasticsearch-6.6.1.deb

Increase the bulk queue size of Elasticsearch by running the following command:

Elastic 7+:

sudo echo 'thread_pool.write.queue_size: 2000' >> /etc/elasticsearch/elasticsearch.yml

Elastic 6.x:

sudo echo 'thread_pool.bulk.queue_size: 2000' >> /etc/elasticsearch/elasticsearch.yml

Set the following index codec by running the following command:

sudo echo 'index.codec: best_compression' >> /etc/elasticsearch/elasticsearch.yml

Elasticsearch uses a mmapfs directory by default to store its indices. The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions.

You can increase the limits by running the following command:

sudo sysctl -w vm.max_map_count=262144

Also, Elasticsearch needs max file descriptors system settings at least to 65536.

echo 'elasticsearch  -  nofile  65536' | sudo tee --append /etc/security/limits.conf > /dev/null

And set LimitNOFILE=65536 in /etc/systemd/system/elasticsearch.services

Start Elasticsearch

sudo systemctl start elasticsearch.service

After a short period of time, you can verify that your Elasticsearch node is running by sending an HTTP request to port 9200 on localhost:

curl -X GET "localhost:9200/"

Step 2 - axon-server installer

curl -1sLf 'https://repo.axonops.com/public/apt/cfg/setup/bash.deb.sh' | sudo bash
sudo apt-get install axon-server

Step 3 - axon-server configuration update

Make sure elastic_host and elastic_port are corresponding to your Elasticsearch instance.

  • /etc/axonops/axon-server.yml
host: 0.0.0.0  # axon-server listening address (used by axon-dash and axon-agent)
port: 8080 # axon-server HTTP API listening port (used by axon-dash)
elastic_host: http://localhost # Elasticsearch endpoint
elastic_port: 9200 # Elasticsearch port

axon-dash: # This must point to axon-dash address
  host: 127.0.0.1
  port: 3000
  https: false

alerting:
# How long to wait before sending a notification again if it has already
# been sent successfully for an alert. (Usually ~3h or more).
  notification_interval: 3h

retention:
  events: 8w # logs and events retention. Must be expressed in weeks (w)
  metrics:
      high_resolution: 14d # High frequency metrics. Must be expressed in days (d)
      med_resolution: 12w # Must be expressed in weeks (w)
      low_resolution: 12M # Must be expressed in months (M)
      super_low_resolution: 2y # Must be expressed in years (y)
  backups: # Those are use as defaults but can be overridden from the UI
    local: 10d
    remote: 30d

Step 4 - Start the server

sudo systemctl daemon-reload
sudo systemctl start axon-server
sudo systemctl status axon-server

This will start the axon-server process as the axonops user, which was created during the package installation. The default listening address is 0.0.0.0:8080.

Package details

  • Configuration: /etc/axonops/axon-server.yml
  • Binary: /usr/share/axonops/axon-server
  • Logs: /var/log/axonops/axon-server.log
  • Systemd service: /usr/lib/systemd/system/axon-server.service
  • Copyright : /usr/share/doc/axonops/axon-server/copyright
  • Licenses : /usr/share/axonops/licenses/axon-server/

Step 5 - Installing axon-dash

Now axon-server is installed, you can start installing the GUI for it: axon-dash