Neo4j 2.0.0RC1 启动服务失败 87

标签 neo4j

我刚刚下载了 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 createNeo4jInstaller.bat内创建的命令包含未转义的引号和嵌入在 %javaPath% 中的错误空格%binPath% 内的变量变量定义。

要解决此问题,需要编辑两个文件:

bin\functions.bat
bin\Neo4jInstaller.bat

%javaPath% 中嵌入的无效空格变量是由 set javaPath="%JAVA_HOME%" 中“=”符号后面的空格引起的命令 functions.bat .

%binPath% 中的未转义引号需要 Neo4jInstaller.bat 中的三处更改:

  1. %javaPath% 中的引号在将变量嵌入 %binPath% 之前必须将其删除变量。
  2. 整个%javaPath%\bin\java.exe路径必须包含在 引用。
  3. %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/

相关文章:

algorithm - Neo4j 运行总计

recursion - 带有子图聚合的递归查询(任意深度)

neo4j - 遍历所有节点并将每个节点与其他节点进行比较

date - 在 Neo4J 中使用 Cypher 将 DateTime 转换为 Epoch 毫秒

neo4j - 如何删除具有重复属性的 Neo4j 节点?

neo4j - 密码: `sort -u` 的模拟来合并 2 个集合?

Neo4j:是否可以基于整数增量创建节点 ID 的替代方案?

docker - 在Neo4j bolt 端口上添加基本前缀

使用 neo4j 进行分页(图数据库)

java - 在导入的 OWL 本体中获取父类(super class)