我是solr的新手,如果我在这里遗漏了什么,请告诉我。我正在按照此指南操作,但目前还没有成功-https://solr.apache.org/guide/8_10/making-and-restoring-backups.html
我现在在solr.xml
中添加了一个备份部分
<backup>
<repository name="s3" class="org.apache.solr.s3.S3BackupRepository" default="false">
<str name="s3.bucket.name">solr-backups</str>
<str name="s3.region">us-east-1</str>
</repository>
</backup>
之后,我添加了S3插件(通过ansible,就像我通常做的那样)
- name: Copy SOLR S3 module to server
copy:
src: /opt/solr/dist/solr-s3-repository-8.10.1.jar
dest: /opt/solr/server/solr/lib
owner: solr
group: solr
remote_src: yes
become_user: root
最后,在solr配置中添加了S3凭据
- name: Add aws credentials
become_user: root
lineinfile:
path: /opt/solr/bin/solr.in.sh
line: 'SOLR_OPTS="-Daws.accessKeyId=REDACTED -Daws.secretAccessKey=REDACTED"'
在重新启动Solr以应用所有新设置后,我将运行以下命令进行备份。
http://my-server.com:8983/solr/schools/replication?command=backup&name=29-10-2021&repository=s3&location=backupfolder
但接收到如下错误:
HTTP ERROR 500 java.lang.NoClassDefFoundError: org/apache/solr/core/backup/repository/BackupRepository
URI: /solr/schools/replication
STATUS: 500
MESSAGE: java.lang.NoClassDefFoundError: org/apache/solr/core/backup/repository/BackupRepository
SERVLET: default
CAUSED BY: java.lang.NoClassDefFoundError: org/apache/solr/core/backup/repository/BackupRepository
CAUSED BY: java.lang.ClassNotFoundException: org.apache.solr.core.backup.repository.BackupRepository
Error message for solar backup on s3
你知道我的配置出了什么问题吗?
1条答案
按热度按时间xesrikrc1#
除了从
dist/
复制插件jar之外,您还必须从contrib/s3-repository/lib
文件夹复制所有jar