Solr 8.3.1:无法找到或加载 org.apache.solr.util.SolrCLI
Solr 8.3.1: could not find or load org.apache.solr.util.SolrCLI
所以我是 Solr 的新手,大部分时间都在使用 Solr 8.3.1(发布时的最新版本)学习教程。
我已经在我的 Windows 10 机器上安装了 Java 版本 1.8.0_181,并且我已经将 solr/bin 添加到 PATH 变量中。
当我 运行 solr start
我得到:
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1525: ulimit: -m: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
*** [WARN] *** Your open file limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1542: [: !=: unary operator expected
NOTE: Please install lsof as this script needs it to determine if Solr is listening on port 8983.
Started Solr server on port 8983 (pid=). Happy searching!
这对我说它开始 运行ning,但是当我 运行 solr status
我得到:
Found 1 Solr nodes:
Solr process 56136 from /d/Program Files and Documents/solr-8.3.1/bin/solr-8983.pid not found.
这似乎不对。无论如何,我继续学习教程 运行 solr start -e cloud
并得到:
$ solr start -e cloud
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1525: ulimit: -m: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
*** [WARN] *** Your open file limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1542: [: !=: unary operator expected
Error: Could not find or load main class org.apache.solr.util.SolrCLI
我试过 solr start -e techproducts
结果相同。
我已经在早期版本的 Solr 中看到了这个问题的答案,通常这些答案涉及更新 Solr 版本...我已经是最新版本了?我确定我遗漏了一些愚蠢的东西,但是任何指向正确方向的指示都将不胜感激!非常感谢!
编辑 1:已解决!使用的是基于 Cygwin 的 Git Bash。使用 Windows 命令提示符和 Windows Powershell 就像一个魅力。
solr start
的输出:
Java HotSpot(TM) 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.
Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
solr status
的输出:
Found Solr process 50764 running on port 8983
{
"solr_home":"D:\Program Files and Documents\solr-8.3.1\server\solr",
"version":"8.3.1 a3d456fba2cd1b9892defbcf46a0eb4d4bb4d01f - ishan - 2019-11-29 11:51:37",
"startTime":"2019-12-19T22:20:25.127Z",
"uptime":"0 days, 0 hours, 0 minutes, 14 seconds",
"memory":"176.3 MB (%34.4) of 512 MB"}
solr start -e cloud
的输出:
Welcome to the SolrCloud example!
This interactive session will help you launch a SolrCloud cluster on your local workstation.
To begin, how many Solr nodes would you like to run in your local cluster? (specify 1-4 nodes) [2]:
看起来你是 运行 来自 /d/...
路径的 cygwin 下 bin/solr
的 *nix 版本。在 Windows 下,您应该使用带有标准命令行控制台 (´cmd.exe`) 的 bin/solr.cmd
命令。
似乎 solr.in
脚本包含 cygwin 中的 bash 版本无法识别的选项。我猜这也可能影响类路径的设置,这意味着 类 没有在预期的位置找到。
所以我是 Solr 的新手,大部分时间都在使用 Solr 8.3.1(发布时的最新版本)学习教程。
我已经在我的 Windows 10 机器上安装了 Java 版本 1.8.0_181,并且我已经将 solr/bin 添加到 PATH 变量中。
当我 运行 solr start
我得到:
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1525: ulimit: -m: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
*** [WARN] *** Your open file limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1542: [: !=: unary operator expected
NOTE: Please install lsof as this script needs it to determine if Solr is listening on port 8983.
Started Solr server on port 8983 (pid=). Happy searching!
这对我说它开始 运行ning,但是当我 运行 solr status
我得到:
Found 1 Solr nodes:
Solr process 56136 from /d/Program Files and Documents/solr-8.3.1/bin/solr-8983.pid not found.
这似乎不对。无论如何,我继续学习教程 运行 solr start -e cloud
并得到:
$ solr start -e cloud
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1525: ulimit: -m: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
*** [WARN] *** Your open file limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 256.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
/d/Program Files and Documents/solr-8.3.1/bin/solr: line 1542: [: !=: unary operator expected
Error: Could not find or load main class org.apache.solr.util.SolrCLI
我试过 solr start -e techproducts
结果相同。
我已经在早期版本的 Solr 中看到了这个问题的答案,通常这些答案涉及更新 Solr 版本...我已经是最新版本了?我确定我遗漏了一些愚蠢的东西,但是任何指向正确方向的指示都将不胜感激!非常感谢!
编辑 1:已解决!使用的是基于 Cygwin 的 Git Bash。使用 Windows 命令提示符和 Windows Powershell 就像一个魅力。
solr start
的输出:
Java HotSpot(TM) 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.
Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
solr status
的输出:
Found Solr process 50764 running on port 8983
{
"solr_home":"D:\Program Files and Documents\solr-8.3.1\server\solr",
"version":"8.3.1 a3d456fba2cd1b9892defbcf46a0eb4d4bb4d01f - ishan - 2019-11-29 11:51:37",
"startTime":"2019-12-19T22:20:25.127Z",
"uptime":"0 days, 0 hours, 0 minutes, 14 seconds",
"memory":"176.3 MB (%34.4) of 512 MB"}
solr start -e cloud
的输出:
Welcome to the SolrCloud example!
This interactive session will help you launch a SolrCloud cluster on your local workstation.
To begin, how many Solr nodes would you like to run in your local cluster? (specify 1-4 nodes) [2]:
看起来你是 运行 来自 /d/...
路径的 cygwin 下 bin/solr
的 *nix 版本。在 Windows 下,您应该使用带有标准命令行控制台 (´cmd.exe`) 的 bin/solr.cmd
命令。
似乎 solr.in
脚本包含 cygwin 中的 bash 版本无法识别的选项。我猜这也可能影响类路径的设置,这意味着 类 没有在预期的位置找到。