目录移动后无法启动neo4j服务 [英] can't start neo4j service after moving directory

查看:394
本文介绍了目录移动后无法启动neo4j服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台Windows 7 x64计算机.我安装了neo4j,它进行得非常顺利.然后,我设法安装了neo4django和neo4j-embedded,这也很好.

I have a windows 7 x64 machine. I installed neo4j which went very smoothly. I then managed to install neo4django and neo4j-embedded and that was fine too.

但是,我决定更改它所在的目录,所以我在powershell中停止了neo4j服务,并将其移至其他位置.从那时起,我一直无法重新启动服务,尽管如果我运行控制台,它将在java.exe窗口中启动neo4j(我认为),因此它可以正常工作(可访问localhost:7474,能够运行neo4j嵌入式示例脚本等),直到我关闭该java.exe窗口.

However I decided to change the directory it was in, so I stopped the neo4j service in powershell and moved it to a different spot. Since then I haven't been able to restart the service, though if I run the console it starts neo4j in a java.exe window (I think) and thus it works (localhost:7474 accessible, able to run the neo4j-embedded example script, etc) until I close that java.exe window.

这是我在PowerShell中获得的输出:

Here is the output I got in PowerShell:

PS G:\dev files\neo4j\bin> .\neo4j start
[SC] StartService FAILED 1053:

The service did not respond to the start or control request in a timely fashion.

PS G:\dev files\neo4j\bin> .\neo4j console
25/06/13 9:36:57 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup timeout to: 120000ms based on -1
Detected incorrectly shut down database, performing recovery..
25/06/13 9:36:59 PM org.neo4j.server.database.Database INFO: Loaded neo4j tuning properties from conf/neo4j.properties
25/06/13 9:37:01 PM org.neo4j.server.database.Database INFO: Successfully started database
25/06/13 9:37:02 PM org.neo4j.server.AbstractNeoServer INFO: Starting Neo Server on port [7474] with [80] threads available
25/06/13 9:37:02 PM org.neo4j.server.AbstractNeoServer INFO: Enabling HTTPS on port [7473]
25/06/13 9:37:03 PM org.neo4j.server.modules.DiscoveryModule INFO: Mounted discovery module at [/]
25/06/13 9:37:03 PM org.neo4j.server.modules.RESTApiModule INFO: Mounted REST API at [/db/data/]
25/06/13 9:37:03 PM org.neo4j.server.modules.ManagementApiModule INFO: Mounted management API at [/db/manage/]
25/06/13 9:37:03 PM org.neo4j.server.modules.WebAdminModule INFO: Mounted webadmin at [/webadmin]
21:37:03.260 [main] INFO  org.mortbay.log - Logging to Logger[org.mortbay.log] via org.mortbay.log.Slf4jLog
25/06/13 9:37:03 PM org.neo4j.server.web.Jetty6WebServer INFO: Mounting static content at [/webadmin] from [webadmin-html]
21:37:03.366 [main] INFO  org.mortbay.log - jetty-6.1.25
21:37:03.548 [main] INFO  org.mortbay.log - NO JSP Support for /webadmin, did not find org.apache.jasper.servlet.JspServlet
21:37:06.088 [main] INFO  org.mortbay.log - Started SelectChannelConnector@localhost:7474

最感谢您的帮助.干杯.

I'd be most appreciative of your help. Cheers.

推荐答案

在Windows中创建服务时,通常会绑定操作系统可以找到的可执行文件的位置.因为您移动了目录,所以Neo4J服务不再有效.您需要做的是删除旧服务,使用新目录重新创建服务,然后启动它.

When you create a service in Windows you typically bind a location for the executable that the operating system can find. Because you moved the directory your Neo4J service is no longer valid. What you must do is delete the old service, recreate the service with the new directory, and then launch it.

在PowerShell中获取和删除服务的代码:

Code to get and delete service in PowerShell:

$service = Get-WmiObject -Class Win32_Service -Filter "Name='servicename'"
$service.delete()

摘自此处

这篇关于目录移动后无法启动neo4j服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆