Installing ArangoDB

Note : Most of the how-to contents are from internet – Just recording here for me to consolidate what to do for my requirements.

Created a VM, Debian 9.8, with 4 vCPU and 8GB RAM – Did not check out recommended values. Will be updating this post as I proceed with my testing. At the time for writing this post, the latest version was ArangoDB 3.4.4-1.

Note : In the initial stages of getting hang of stuffs, I prefer to login as ‘root’ user and work. So ‘sudo’ usage might not appear in the post.apt-key add – < Release.key

Install curl (not installed by default), and then add the repository key – a per-requesite for installing ArangoDB.

apt install curl
curl -OL https://download.arangodb.com/arangodb34/DEBIAN/Release.key
apt-key add - < Release.key

Install ArangoDB

echo 'deb https://download.arangodb.com/arangodb34/DEBIAN/ /' |  tee /etc/apt/sources.list.d/arangodb.list 
apt install apt-transport-https
apt update
apt install arangodb3=3.4.4-1

Install the debug symbols package (not required by default)

apt install arangodb3-dbg=3.4.4-1

Observed the following

Preparing to unpack …/arangodb3_3.4.4-1_amd64.deb …
Unpacking arangodb3 (3.4.4-1) …
Processing triggers for systemd (232-25+deb9u9) …
Processing triggers for man-db (2.7.6.1-2) …
Setting up arangodb3 (3.4.4-1) …
2019-03-24T05:10:23Z [2038] INFO {syscall} file-descriptors nofiles) hard limit is 1048576, soft limit is 1048576
2019-03-24T05:10:23Z [2038] WARNING {threads} --server.threads (64) is more than eight times the number of cores (4), this might overload the server
2019-03-24T05:10:25Z [2038] INFO {startup} server will now shut down due to upgrade, database initialization or admin restoration.
Database files are up-to-date.
Created symlink /etc/systemd/system/multi-user.target.wants/arangodb3.service → /lib/systemd/system/arangodb3.service.

Fix for file-descriptors – add the following to /etc/security/limits.conf

 *    hard    nofile    262140
* soft nofile 262140

Fix for –server-threads warning : Increase vCPUs to 16 and RAM to 16 and update the following config in /etc/arangodb3/arangod.conf

#number of maximal server threads. use 0 to make arangod determine the
#number of threads automatically, based on available CPUs
maximal-threads = 0

Updated the end point from 127.0.0.1 to 0.0.0.0 in /etc/arangodb3/arangod.conf

endpoint = tcp://0.0.0.0:8529 

Applied the recommended fix for WARNING {memory} maximum number of memory mappings per process is 65530, which seems too low. Added the following to /etc/sysctl.conf

vm.max_map_count=1024000

Not required – Updated kernel to 5.0.4. Check the status of arangodb3

root@db1:~# systemctl status arangodb3
● arangodb3.service - ArangoDB database server
Loaded: loaded (/lib/systemd/system/arangodb3.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2019-03-24 12:17:36 IST; 11s ago
Process: 490 ExecStartPre=/usr/bin/env chmod 700 /var/lib/arangodb3-apps (code=exited, status=0/SUCCESS)
Process: 487 ExecStartPre=/usr/bin/env chown -R arangodb:arangodb /var/lib/arangodb3-apps (code=exited, status=0/SUCCESS)
Process: 484 ExecStartPre=/usr/bin/env chmod 700 /var/lib/arangodb3 (code=exited, status=0/SUCCESS)
Process: 481 ExecStartPre=/usr/bin/env chown -R arangodb:arangodb /var/lib/arangodb3 (code=exited, status=0/SUCCESS)
Process: 479 ExecStartPre=/usr/bin/env chmod 700 /var/log/arangodb3 (code=exited, status=0/SUCCESS)
Process: 476 ExecStartPre=/usr/bin/env chown -R arangodb:arangodb /var/log/arangodb3 (code=exited, status=0/SUCCESS)
Process: 473 ExecStartPre=/usr/bin/install -g arangodb -o arangodb -d /var/run/arangodb3 (code=exited, status=0/SUCCESS)
Process: 469 ExecStartPre=/usr/bin/install -g arangodb -o arangodb -d /var/tmp/arangodb3 (code=exited, status=0/SUCCESS)
Main PID: 494 (arangod)
Tasks: 51 (limit: 131072)
CGroup: /system.slice/arangodb3.service
└─494 /usr/sbin/arangod --uid arangodb --gid arangodb --pid-file /var/run/arangodb3/arangod.pid --temp.path /var/tmp/arangodb3 --log.foreground-tty true
Mar 24 12:17:36 db1 systemd[1]: Started ArangoDB database server.
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO ArangoDB 3.4.4 [linux] 64bit, using jemalloc, build tags/v3.4.4-0-gc6abdf4449, VPack 0.1.33, RocksDB 5.16.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO detected operating system: Linux version 5.0.4 (root@db1) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP Sun Mar 24 11:33:26 IST 20
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO {authentication} Jwt secret not specified, generating…
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO using storage engine rocksdb
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO {cluster} Starting up with role SINGLE
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO {syscall} file-descriptors (nofiles) hard limit is 131072, soft limit is 131072
Mar 24 12:17:37 db1 arangod[494]: 2019-03-24T06:47:37Z [494] INFO {authentication} Authentication is turned on (system only), authentication for unix sockets is turned on
Mar 24 12:17:41 db1 arangod[494]: 2019-03-24T06:47:41Z [494] INFO using endpoint 'http+tcp://0.0.0.0:8529' for non-encrypted requests
Mar 24 12:17:42 db1 arangod[494]: 2019-03-24T06:47:42Z [494] INFO ArangoDB (version 3.4.4 [linux]) is ready for business. Have fun!
root@db1:~#

About sandeep

Passionate about sharing information on "how to".
This entry was posted in Installation / How To, Notes and tagged , , . Bookmark the permalink.