logdna / logdna-agent-v2

The blazingly fast, resource efficient log collection client
https://logdna.com
MIT License
65 stars 47 forks source link

StateDirectory not available on Amazon Linux 2 #419

Open deepy opened 2 years ago

deepy commented 2 years ago

The packaged systemd service includes StateDirectory which doesn't seem to exist on Amazon Linux 2

[/usr/lib/systemd/system/logdna-agent.service:12] Unknown lvalue 'StateDirectory' in section 'Service'
dkhokhlov commented 2 years ago

file in repo does not have it: https://github.com/logdna/logdna-agent-v2/blob/master/linux/logdna-agent.service#L12 agent version?

deepy commented 2 years ago

I'm getting this with both 3.6.0-1 and 3.5.2-1

deepy commented 2 years ago

There is however a file in the repo which does have it, and it's in packaging https://github.com/logdna/logdna-agent-v2/blob/master/packaging/linux/logdna-agent.service#L12

dkhokhlov commented 2 years ago

ic. your systemd version? systemd --version

deepy commented 2 years ago

219

dkhokhlov commented 2 years ago

too old - 2015. that StateDirectory is needed for non-root service when /var/lib/logdna has to be created by systemd. will look into this. thanks.

dkhokhlov commented 2 years ago

Update:

TJDev commented 1 year ago

@dkhokhlov Does this mean that we cannot use the latest version with AWS instances installing over yum? The info for Elastic Beanstalk would then also be not working?

deepy commented 1 year ago

@TJDev if you install the package on Amazon Linux you need to manually modify the package-provided systemd service to be able to start it

TJDev commented 1 year ago

I have created a gist based on the former one for old logdna-agent with the requirements for AL2 (create directory, remove StateDirectory). Work in a test environment for me.

https://gist.github.com/TJDev/df2262535895190599ff96d43a28c329