Dgraph-alpha fails on ubuntu (Installscript with system.d)

Report a Dgraph Bug

What version of Dgraph are you using?

Dgraph Version
$ dgraph version
 
Dgraph version   : v21.03.0
Dgraph codename  : rocket
Dgraph SHA-256   : b4e4c77011e2938e9da197395dbce91d0c6ebb83d383b190f5b70201836a773f
Commit SHA-1     : a77bbe8ae
Commit timestamp : 2021-04-07 21:36:38 +0530
Branch           : HEAD
Go version       : go1.16.2
jemalloc enabled : true

Have you tried reproducing the issue with the latest release?

Yes

What is the hardware spec (RAM, OS)?

Ubuntu 20.04.2 LTS
8 GB RAM

Steps to reproduce the issue (command/config used to run Dgraph).

Installed dgraph on a clean system with via curl

curl https://get.dgraph.io -sSf | bash -s -- --systemd

Expected behaviour and actual result.

Then check status of dgraph. Zero is running, but alpha returns this message:

# service dgraph-alpha status
● dgraph-alpha.service - dgraph.io Alpha instance
     Loaded: loaded (/etc/systemd/system/dgraph-alpha.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-05-18 07:36:56 CEST; 2s ago
    Process: 7753 ExecStart=/bin/bash -c dgraph alpha --lru_mb 2048 -p /var/lib/dgraph/p -w /var/lib/dgraph/w (code=exited, status=1/F>
   Main PID: 7753 (code=exited, status=1/FAILURE)

systemd[1]: dgraph-alpha.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped dgraph.io Alpha instance.
systemd[1]: dgraph-alpha.service: Start request repeated too quickly.
systemd[1]: dgraph-alpha.service: Failed with result 'exit-code'.
systemd[1]: Failed to start dgraph.io Alpha instance.

When I edit /etc/systemd/system/dgraph-alpha.service and remove --lru_mb 2048, alpha runs as expected.

Ah thanks for reminding me. I started some work literally this morning to put a PR to fix this exact thing. Will get it done

1 Like