我刚刚下载了 RC2。我过去运行的是 1.9,没有任何问题。在 Windows 7 上运行。
这是我安装时发生的情况。所有启动服务的尝试都会失败,并显示 87 错误消息。
C:\Neo4j\Neo4JTest\neo4j-community-2.0.0-RC1\bin>Neo4jInstaller.bat install
"WARNING: this installer is deprecated and may not be the optimal way to install Neo4j on your system."
"Please see the Neo4j Manual for up to date information on installing Neo4j."
Press any key to continue
[SC] CreateService SUCCESS
[SC] StartService FAILED 87:
The parameter is incorrect.
关于警告消息:安装程序似乎没有作为服务安装的选项,并且我在手册中没有看到任何其他作为服务安装的说明。
http://docs.neo4j.org/chunked/2.0.0-RC1/server-installation.html#windows-install
最佳答案
Neo4j 2.0.0-RC1
neo4j-community-2.0.0-RC1-windows
Windows 7
neo4j>bin\Neo4jInstaller.bat install
[SC] CreateService SUCCESS
[SC] StartService FAILED 87:
The parameter is incorrect.
此问题是新 Neo4j 安装 bat 文件中的错误组合导致的结果,这些错误导致 binPath=
损坏。 sc create service
中的参数Neo4jInstaller.bat
中的命令文件本身。
具体来说,sc create
命令需要 binPath=
此实例中的参数需要引用,因为 Neo4j %binPath%
中存在嵌入空格多变的。然而,sc create
在Neo4jInstaller.bat
内创建的命令包含未转义的引号和嵌入在 %javaPath%
中的错误空格%binPath%
内的变量变量定义。
要解决此问题,需要编辑两个文件:
bin\functions.bat
bin\Neo4jInstaller.bat
%javaPath%
中嵌入的无效空格变量是由 set javaPath="%JAVA_HOME%"
中“=”符号后面的空格引起的命令 functions.bat
.
%binPath%
中的未转义引号需要 Neo4jInstaller.bat
中的三处更改:
-
%javaPath%
中的引号在将变量嵌入%binPath%
之前必须将其删除变量。 - 整个
%javaPath%\bin\java.exe
路径必须包含在 引用。 %binPath%
变量值必须用引号括起来,并且%binPath%
中嵌入的引号变量必须转义。
此外,请调用 functions.bat
Neo4jInstaller.bat
内必须修改,因为functions.bat
位于\bin
子目录,以及Neo4jInstaller.bat
必须从根目录运行neo4j
目录。
functions.bat
=============
:findJavaHome
if not "%JAVA_HOME%" == "" (
if exist "%JAVA_HOME%\bin\javac.exe" (
rem set javaPath= "%JAVA_HOME%\jre"
set javaPath="%JAVA_HOME%\jre"
goto:eof
)
rem set javaPath= "%JAVA_HOME%"
set javaPath="%JAVA_HOME%"
goto:eof
)
Neo4jInstaller.bat
==================
rem call functions.bat :findJavaHome
rem set javaPath=%javaPath:"="""%
rem set binPath="%javaPath%\bin\java.exe %loggingProperties% -DworkingDir="%~dps0.." -DconfigFile=%configFile% %classpath% %mainclass% -Dorg.neo4j.cluster.logdirectory="%~dps0..\data\log" -jar %~dps0%wrapperJarFilename% %serviceName%"
call %~dps0functions.bat :findJavaHome
set javaPath=%javaPath:"=%
set binPath="%javaPath%\bin\java.exe" %loggingProperties% -DworkingDir="%~dps0.." -DconfigFile=%configFile% %classpath% %mainclass% -Dorg.neo4j.cluster.logdirectory="%~dps0..\data\log" -jar %~dps0%wrapperJarFilename% %serviceName%
set binPath="%binPath:"=\"%"
GitHub 上有一个“已关闭”Neo4j 票证 https://github.com/neo4j/neo4j/pull/1535仅部分解决了 RC2 的这些问题。不过,与此同时,您必须自己解决此问题。
关于Neo4j 2.0.0RC1 启动服务失败 87,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20148443/