对 solr 使用身份验证时,它无法识别它已启动
When using authentication for solr it does not recognize that it started
我正在使用 solr,最近为其设置了身份验证。现在每次我通过 cmd 启动 solr 时:
subprocess.call(SOLR_BIN_PATH + '\solr.cmd -p ' + '8983')
我遇到错误:
ERROR: Solr at http://localhost:8983/solr did not come online within 30 seconds!
感觉solr不识别它启动了,因为它不能对服务器进行身份验证。谁能告诉我如何解决这个问题,以便这个过程调用不需要 30 秒?
您 can configure the authentication information to be used 在 solr.in.cmd
或 solr.in.sh
脚本中:
Using the Solr Control Script with Basic Auth Add the following line
Add the following line to the solr.in.sh or solr.in.cmd file. This example tells the bin/solr
command line to to use basic
as the type of authentication, and to
pass credentials with the user-name solr
and password SolrRocks
:
SOLR_AUTH_TYPE="basic"
SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
在 .cmd
文件中,您必须在这些行前加上 set
- solr.in.cmd
文件中应该已经有示例,搜索 SOLR_AUTH
然后您应该罚款他们。删除行前面的 REM
并修改它们以具有相关的身份验证详细信息。
我正在使用 solr,最近为其设置了身份验证。现在每次我通过 cmd 启动 solr 时:
subprocess.call(SOLR_BIN_PATH + '\solr.cmd -p ' + '8983')
我遇到错误:
ERROR: Solr at http://localhost:8983/solr did not come online within 30 seconds!
感觉solr不识别它启动了,因为它不能对服务器进行身份验证。谁能告诉我如何解决这个问题,以便这个过程调用不需要 30 秒?
您 can configure the authentication information to be used 在 solr.in.cmd
或 solr.in.sh
脚本中:
Using the Solr Control Script with Basic Auth Add the following line
Add the following line to the solr.in.sh or solr.in.cmd file. This example tells the
bin/solr
command line to to usebasic
as the type of authentication, and to pass credentials with the user-namesolr
and passwordSolrRocks
:SOLR_AUTH_TYPE="basic" SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
在 .cmd
文件中,您必须在这些行前加上 set
- solr.in.cmd
文件中应该已经有示例,搜索 SOLR_AUTH
然后您应该罚款他们。删除行前面的 REM
并修改它们以具有相关的身份验证详细信息。