Well, I’ve found this error again, and I forget to write down the workaround. So this error is found when you try to execute ./splunk start or status:
Cannot initialize: /opt/splunk/etc/apps/launcher/metadata/local.meta: Permission denied (and other similar errors)
The cause of this is actually silly: when we first installed the splunk agent, the developer use the other user rather than the one it should be.
In my case, it should be oracle but our developer install it with root. So everytime the VM is being restarted this error happens. The ultimate solution? Reinstall the agent using oracle.
Too much work for you to reinstall? Do this workaround :
chown -R oracle:oinstall /opt/splunk/
In this case, we installed the splunk on /opt/splunk/. The user:group in our case is also oracle:oinstall.
Then, you can start/stop/status the splunk with ease.
Hope it helps 😀