How to run apm-server as service to run in background

I have APM-SERVER and i using the command ./apm-server -e to run but If i check the status using sudo service apm-server status im get below error.
sudo service apm-server status
● apm-server.service - Elastic APM Server
Loaded: loaded (/usr/lib/systemd/system/apm-server.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2018-10-17 13:29:47 UTC; 15s ago
Docs: https://www.elastic.co/solutions/apm
Process: 15534 ExecStart=/usr/share/apm-server/bin/apm-server -c /etc/apm-server/apm-server.yml -path.home /usr/share/apm-server -path.config /etc/apm-server -path.data /var/lib/apm-server -path.logs /var/log/apm-server (code=exited, status=1/FAILURE)
Main PID: 15534 (code=exited, status=1/FAILURE)

Oct 17 13:29:46 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: Unit apm-server.service entered failed state.
Oct 17 13:29:46 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: apm-server.service failed.
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: apm-server.service holdoff time over, scheduling restart.
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: start request repeated too quickly for apm-server.service
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: Failed to start Elastic APM Server.
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: Unit apm-server.service entered failed state.
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: apm-server.service failed.

@arun5635 To start apm-server with systemd, use sudo service apm-server start instead of apm-server -e. This should resolve the issues with sudo service apm-server status.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.