Ashish Singh <frozen...@gmail.com> writes:
Hellow everyone,Cf engine server stopped working and getting crashed when agent is bootstraping it ….earlier it was working frok more than 1 year suddenly it stops working and getting aborted with core dump .
Hi Ashish,
First, are you aware that the version of CFEngine you are running is quite old? The 3.6 series went out of support back on July 17th 2016. The current latest supported version is 3.18.2, released June 29th 2022. 3.15.7 (the last in the 3.15 series), 3.18.3 and 3.21.0 (the first in the next LTS series) should be released before the end of the year. What are the impediments that hold back your upgrades?
To me it looks like you have some corruption in one of the embedded databases, probably cf_lastseen.lmdb
since it crashes after some peer related logging.
Newer versions of cfengine have a utility cf-check
which can help look for an remediate lmdb database issues.Try stopping the CFEngine services and moving cf_lastseen.lmdb
out of the way and then starting the services back up again.
service stop cfengine3 for each in $(ls /var/cfengine/state/cf_lastseen.lmdb*); do mv $each{,$(date +-%F-%T.bak)}; done service start cfengine3
– Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech
service stop cfengine3 for each in $(ls /var/cfengine/state/cf_lastseen.lmdb*); do mv $each{,$(date +-%F-%T.bak)}; done service start cfengine3
i don't see any file with the name cf_lasteen.lmdb . Could you please look at the screenshot once and help us troubleshoot the issue
Ashish Singh <frozen...@gmail.com> writes:
Hi Nick ,Thanks for your response !Yes we are aware of it as its a legacy setup where we are using CFengine engine and it is very old setup which was migrated to our cloud infrastructure and version were kept the same
Yeah, it happens. But, there is a lot of great stuff in CFEngine in the last 8 years (Augments and Custom Promise Types to name a couple) and you should definitely upgrade.
Regarding your recommendation : i don't see any file with the name cf_lasteen.lmdb . Could you please look at the screenshot once and help us troubleshoot the issue
Oh, I guess cf_lastseen.lmdb
isn't in state. It's in WORKDIR
, at least in 3.6.x.
[root@hub cfengine]# find /var/cfengine/ -name "cf_lastseen*" /var/cfengine/cf_lastseen.lmdb-lock /var/cfengine/cf_lastseen.lmdb.lock /var/cfengine/cf_lastseen.lmdb
So, perhaps …
service stop cfengine3 for each in $(ls /var/cfengine/cf_lastseen.lmdb*); do mv $each{,$(date +-%F-%T.bak)}; done service start cfengine3