APM Server version: 7.0.0.
APM Agent language and version: Node.js
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
https://artifacts.elastic.co/downloads/apm-server/apm-server-7.0.0-x86_64.rpm
Is there anything special in your setup?
We use ansible playbook to install and config APM;
// this would copy the apm-server.yml ot the right plalce
- name: Deploy /etc/apm-server/apm-server.yml config
template:
src: apm-server.yml.j2
dest: /etc/apm-server/apm-server.yml
become: true
// We want to start the service, `become: true` means become `root` user
- name: Start APM-Server Service
systemd:
state: started
name: apm-server.service
become: true
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
[deploy@ip-192-168-0-141 ~]$ systemctl status apm-server
● 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 Thu 2019-05-02 21:23:57 UTC; 3 days ago
Docs: https://www.elastic.co/solutions/apm
Process: 5707 ExecStart=/usr/share/apm-server/bin/apm-server $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS (code=exited, status=1/FAILURE)
Main PID: 5707 (code=exited, status=1/FAILURE)
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: apm-server.service: main process exited, code=exited, status=1/FAILURE
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: Unit apm-server.service entered failed state.
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: apm-server.service failed.
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: apm-server.service holdoff time over, scheduling restart.
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: start request repeated too quickly for apm-server.service
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: Failed to start Elastic APM Server.
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: Unit apm-server.service entered failed state.
May 02 21:23:57 ip-192-168-0-141.ec2.internal systemd[1]: apm-server.service failed.
Provide logs and/or server output (if relevant):
Exiting: error loading config file: config file ("/etc/apm-server/apm-server.yml") must be owned by the user identifier (uid=0) or root
Other comments:
- The
/etc/apm-server/apm-server.yml
is owned by theapm-server
user. -
https://github.com/elastic/apm-server/blob/6.3/_beats/dev-tools/packer/platforms/debian/systemd.j2
This is an old systemd file. I couldn't find the v7.0.0.
How can I run this service with userapm-server
without changing the file permission toroot
?