You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
The script referenced in the systemd unit does not exist
$ ls /usr/share/elasticsearch/bin/performance-analyzer-agent-cli
ls: cannot access '/usr/share/elasticsearch/bin/performance-analyzer-agent-cli': No such file or directory
$ rpmverify opendistro-performance-analyzer-1.13.0.0-1.noarch
missing /usr/share/elasticsearch/bin/performance-analyzer-agent-cli
The scripts which is in the RPM /usr/share/elasticsearch/plugins/opendistro-performance-analyzer/bin/performance-analyzer-agent-cli exits with Error: Could not find or load main class com.amazon.opendistro.elasticsearch.performanceanalyzer.PerformanceAnalyzerApp
The text was updated successfully, but these errors were encountered:
It is not only /usr/share/elasticsearch/bin/performance-analyzer-agent-cli which is gone after an RPM upgrade, also the whole /usr/share/elasticsearch/performance-analyzer-rca directory and the /usr/share/elasticsearch/data/rca_enabled.conf configuration file.
Only the CLI file is identified by the verify command because that path is present in the %files list of the RPM. The other files are created in the post script of the RPM:
Those files are removed by the postrm script:
So what I think that happens is that the post script of the new RPM is executed first, creating (overwriting) those files, and then the postrm script of the old package removes them.
This RPM behavior seems to cause other problems. I also filed a bug in elasticsearch because that behavior causes that the service fails to restart on upgrades: elastic/elasticsearch#71784
# Install elastcisearch older version
curl https://d3g5vo6xdbdb9a.cloudfront.net/yum/opendistroforelasticsearch-artifacts.repo -o /etc/yum.repos.d/opendistroforelasticsearch-artifacts.repo
yum install -y curl unzip wget libcap java-11-openjdk-devel
yum install -y opendistroforelasticsearch-1.12.0-1
systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
# Check that performance analyzer is running
systemctl status opendistro-performance-analyzer
ps aux | grep elasticsearch | grep java
# Check that files exist
ls /usr/share/elasticsearch/bin/performance-analyzer-agent-cli
ls /usr/share/elasticsearch/performance-analyzer-rca
ls /usr/share/elasticsearch/data/rca_enabled.conf
rpm -V opendistro-performance-analyzer
# Install newer version
yum install -y opendistroforelasticsearch-1.13.2-1
systemctl daemon-reload
systemctl restart elasticsearch.service
# Check that performance analyzer did not run
systemctl status opendistro-performance-analyzer
ps aux | grep elasticsearch | grep java
# Check that files do not exist
ls /usr/share/elasticsearch/bin/performance-analyzer-agent-cli
ls /usr/share/elasticsearch/performance-analyzer-rca
ls /usr/share/elasticsearch/data/rca_enabled.conf
rpm -V opendistro-performance-analyzer
And as workaround, to set up the performance analyzer again, some steps that the RPM does can be done manually:
The script referenced in the systemd unit does not exist
There is a PR related to this https://github.com/opendistro-for-elasticsearch/performance-analyzer/pull/254/files but that seems to be outdated. (refereces $ES_HOME/plugins/opendistro_performance_analyzer instead of $ES_HOME"/plugins/opendistro-performance-analyzer)
The scripts which is in the RPM
/usr/share/elasticsearch/plugins/opendistro-performance-analyzer/bin/performance-analyzer-agent-cli
exits withError: Could not find or load main class com.amazon.opendistro.elasticsearch.performanceanalyzer.PerformanceAnalyzerApp
The text was updated successfully, but these errors were encountered: