Solr can't create core in docker command

来源:互联网 发布:阿里云软件下载 编辑:程序博客网 时间:2024/06/05 23:04

This is a error while create a new core by commandline in docker.

solr在docker下创建core失败的问题, 官网及所有博客中给的命令中没包含端口号, 估计是create_core程序更新导致的.

>> docker exec -it --user=solr my-solr bin/solr create_core  -c gettingstartedbin/solr: line 957: ps: command not foundFailed to determine the port of a local Solr instance, cannot create gettingstarted!

Because it’s missing the port, but the right command is :

>> docker exec -it --user=solr my-solr bin/solr create_core -p 8983 -c gettingstartedCopying configuration to new core instance directory:/opt/solr/server/solr/gettingstartedCreating new core 'gettingstarted' using command:http://localhost:8983/solr/admin/cores?action=CREATE&name=gettingstarted&instanceDir=gettingstarted{  "responseHeader":{    "status":0,    "QTime":1111},  "core":"gettingstarted"}

you
can use this command to search help.

docker exec -it --user=solr my-solr bin/solr -help
原创粉丝点击