I'm using Wazuh v4.7.1 Docker single node.
I would like to activate the plugin to be able to snapshot the indexes on an S3 repository but I always receive an error.
To be able to do this I have to enter the Wazuh Indexer container.
https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore/#amazon-s3I enter the Wazuh Indexer container
cd /usr/share/wazuh-indexer/bin
I run the command:
./opensearch-plugin install repository-s3
I get the following error:wazuh-indexer@wazuh:~/bin$ ./opensearch-plugin install repository-s3
./opensearch-env: line 108: cd: /etc/wazuh-indexer: No such file or directory
-> Installing repository-s3
-> Downloading repository-s3 from opensearch
[======================================================================== ] 100%??
-> Failed installing repository-s3
-> Rolling back repository-s3
-> Rolled back repository-s3
Exception in thread "main" java.lang.IllegalStateException: duplicate plugin: - Plugin information:
Name: repository-s3
Description: The S3 repository plugin adds S3 repositories
Version: 2.8.0
OpenSearch Version: 2.8.0
Java Version: 11
Native Controller: false
Extended Plugins: []
* Classname: org.opensearch.repositories.s3.S3RepositoryPlugin
Folder name:
at org.opensearch.plugins.PluginsService.readPluginBundle(PluginsService.java:461)
at org.opensearch.plugins.PluginsService.findBundles(PluginsService.java:440)
at org.opensearch.plugins.PluginsService.getPluginBundles(PluginsService.java:433)
at org.opensearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:853)
at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:830)
at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:875)
at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:276)
at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:250)
at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
at org.opensearch.cli.Command.main(Command.java:101)
at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
The first time I run it I got this error:wazuh-indexer@wazuh:~/plugins$ /usr/share/wazuh-indexer/bin/opensearch-plugin install repository-s3
/usr/share/wazuh-indexer/bin/opensearch-env: line 108: cd: /etc/wazuh-indexer: No such file or directory
-> Installing repository-s3
-> Downloading repository-s3 from opensearch
[======================================================================== ] 100%??
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.NetPermission setDefaultAuthenticator
* java.net.SocketPermission * connect,resolve
* java.util.PropertyPermission opensearch.allow_insecure_settings read,write
See
http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.htmlfor descriptions of what these permissions allow and the associated risks.
Continue with installation? [y/N]y
-> Failed installing repository-s3
-> Rolling back repository-s3
-> Rolled back repository-s3