Closed Aifolin closed 1 month ago
Can you explain what is the issue itself? What is causing.
Can you explain what is the issue itself? What is causing.
I use command at clean debian 11 node.
curl https://get.dgraph.io -sSf | bash -s -- --systemd
It creates creates two files as I described upper.
/etc/systemd/system/dgraph-alpha.service file include next string:
ExecStart= -c 'dgraph alpha -p /var/lib/dgraph/p -w /var/lib/dgraph/w'
and /etc/systemd/system/dgraph-zero.service file include:
ExecStart= -c 'dgraph zero --wal /var/lib/dgraph/zw'
Then I tried to start dgraph alpha
root@some:~# systemctl start dgraph-alpha.service
root@some:~# systemctl status dgraph-alpha.service
○ dgraph-alpha.service - dgraph.io Alpha instance
Loaded: loaded (/etc/systemd/system/dgraph-alpha.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Jan 20 10:42:56 some.com systemd[1]: Started dgraph.io Alpha instance.
Jan 20 10:42:56 some.com systemd[24437]: dgraph-alpha.service: Executable c missing, skipping: No such file or directory
Jan 20 10:42:56 some.com systemd[1]: dgraph-alpha.service: Deactivated successfully.
Tried to start dgraph zero:
dgraph-zero.service: Executable c missing, skipping: No such file or directory
When I removed -c
and ' '
from systemd files dgraph starts well
Or maybe it should be like:
ExecStart=/usr/bin/bash -c 'dgraph alpha -p /var/lib/dgraph/p -w /var/lib/dgraph/w'
This script should find your shell and replace the variable https://github.com/dgraph-io/Install-Dgraph/blob/master/contrib/service.tmpl - I will make it bash as default. Thanks!
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.
For alfa it creates:
For zero it creates:
ExecStart should be:
ExecStart=dgraph alpha -p /var/lib/dgraph/p -w /var/lib/dgraph/w
andExecStart=dgraph zero --wal /var/lib/dgraph/zw