Here's your tip, I set up ExecStart as below but when I upload the service with the systemctl the service is not over and it returns me the error at the bottom log.
when executing the same command via scrip bash the service goes up normally.
Jun 17 16:03:03 andromeda systemd[1]: Reloading.
Jun 17 16:03:04 andromeda systemd[1]: Started ACPI event daemon.
Jun 17 16:03:09 andromeda systemd[1]: Started APP. Jun 17 16:03:09 andromeda java[20937]: Unrecognized option: -javaagent=/opt/apm/elastic-apm-agent.jar Jun 17 16:03:09 andromeda java[20937]: Error: Could not create the Java Virtual Machine. Jun 17 16:03:09 andromeda java[20937]: Error: A fatal exception has occurred. Program will exit. Jun 17 16:03:09 andromeda systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
Jun 17 16:03:09 andromeda systemd[1]: app.service: Unit entered failed state.
Jun 17 16:03:09 andromeda systemd[1]: app.service: Failed with result 'exit-code'
1st I would suggest getting the command running from the normal command line first then once you get that working then I would try it in the app.service
2nd I also noticed your service name APP-PRODUCTION has a - in it, so you may need to quote that so it does not get misinterpreted by the ExecStart command.
so see if you can get something like this running first then try it in the app.service
Thanks to answer, today I carry started apm-agent for a shell script, but emerged the demanda to monitoring the aplication java they initiate as a service in systemd.
And by the way the apm-agent is spectacular, when I use more and I learn more with the possibility of its use
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.