<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 7, 2018 at 11:13 PM, Goran <span dir="ltr"><<a href="mailto:sendmailtogoran@gmail.com" target="_blank">sendmailtogoran@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm starting Grafana on top of Arch Linux without problem. But when I<br>
install Grafana into an Arch Linux LXC container on top of Arch Linux<br>
OS I can't start it.<br>
<br>
The error is:<br>
<br>
systemd[24509]: grafana.service: Failed to determine user credentials:<br>
No such process<br>
systemd[24509]: grafana.service: Failed at step USER spawning<br>
/usr/bin/grafana-server: No such process<br>
<br>
It looks like a systemd error but it's working on top of a real OS.<br>
<br>
Here is my grafana.service file: <a href="https://pastebin.com/T8XU98XT" rel="noreferrer" target="_blank">https://pastebin.com/T8XU98XT</a><br>
<br>
I can start Grafana without any problems with<br>
<br>
runuser -s /bin/bash -g grafana -l grafana -c 'grafana-server<br>
-config=/etc/grafana.ini -homepath /usr/share/grafana'<br>
<br></blockquote><div><br></div><div>To confirm: you can start it by logging into the container and run the above command?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It looks like LXC is hindering systemd to start the process.<br>
<br></blockquote><div><br></div><div><br></div><div>I think the easiest way to troubleshoot is just use that command in a systemd unit. Something like</div><div><br></div><div><div>[Unit]</div><div>Description=Simple run test</div><div><br></div><div>[Service]</div><div>ExecStart=/bin/bash -c "runuser -s /bin/bash -g grafana -l grafana -c 'grafana-server -config=/etc/grafana.ini -homepath /usr/share/grafana'"</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div></div><div><br></div><div><br></div><div>Put it as a some service file somewhere on /etc/systemd/system, start it, and see what happens. If that works, you can start changing up the service to look more like the original while finding out which lines from the original service file is problematic.</div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>