我在Tomcat 7中以嵌入式HA模式运行Neo4j 2.0.1。一切正常,我还设法制作了#34; webadmin"模块工作使用此处描述的解决方案:https://github.com/theon/neo4j-war-with-webadmin
嵌入式服务器在localhost:7474
上运行,http://localhost:7474/webadmin/#/info/org.neo4j/High%20Availability/
显示群集中的所有节点。
问题是访问http://localhost:7474/db/manage/server/ha/master
(或/ slave或/ master)总是返回404。
卷曲:
C:\Windows\system32>curl -v localhost:7474/db/manage/server/ha/available
* Adding handle: conn: 0x2053d10
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2053d10) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 7474 (#0)
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 7474 (#0)
> GET /db/manage/server/ha/available HTTP/1.1
> User-Agent: curl/7.33.0
> Host: localhost:7474
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Access-Control-Allow-Origin: *
< Content-Type: text/html; charset=ISO-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 0
* Server Jetty(9.0.5.v20130815) is not blacklisted
< Server: Jetty(9.0.5.v20130815)
<
* Connection #0 to host localhost left intact
Tomcat日志:
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.server.Server - REQUEST /db/manage/server/ha/available on HttpChannelOverHttp@956fe72{r=1,a=DISPATCHED,uri=/db/manage/server/ha/available}
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.j.server.handler.ContextHandler - scope null||/db/manage/server/ha/available @ o.e.j.s.h.MovedContextHandler@6703f008{/,null,AVAILABLE}
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.j.server.handler.ContextHandler - context=||/db/manage/server/ha/available @ o.e.j.s.h.MovedContextHandler@6703f008{/,null,AVAILABLE}
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.j.server.handler.ContextHandler - scope null||/db/manage/server/ha/available @ o.e.j.w.WebAppContext@2e612ff1{/webadmin,file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/main_webapp/WEB-INF/classes/webadmin-html/,AVAILABLE}
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.j.server.handler.ContextHandler - scope null||/db/manage/server/ha/available @ o.e.j.s.ServletContextHandler@1384d8d1{/db/manage,null,AVAILABLE}
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.j.server.handler.ContextHandler - context=/db/manage||/server/ha/available @ o.e.j.s.ServletContextHandler@1384d8d1{/db/manage,null,AVAILABLE}
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.server.session - sessionManager=org.eclipse.jetty.server.session.HashSessionManager@56444482
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.server.session - session=null
17:28:24.775 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.servlet.ServletHandler - servlet /db/manage||/server/ha/available -> org.neo4j.server.web.NeoServletContainer-2094766571@81874825==org.neo4j.server.web.NeoServletContainer,-1,true
17:28:24.776 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.servlet.ServletHandler - chain=org.neo4j.server.rest.security.SecurityFilter-828500158->org.neo4j.server.web.NeoServletContainer-2094766571@81874825==org.neo4j.server.web.NeoServletContainer,-1,true
17:28:24.776 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.servlet.ServletHandler - call filter org.neo4j.server.rest.security.SecurityFilter-828500158
17:28:24.776 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.servlet.ServletHandler - call servlet org.neo4j.server.web.NeoServletContainer-2094766571@81874825==org.neo4j.server.web.NeoServletContainer,-1,true
17:28:24.776 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$CommitCallback@2e5af328 generate: NEED_HEADER (null,[p=0,l=0,c=0,r=0],true)@START
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$CommitCallback@2e5af328 generate: FLUSH ([p=0,l=204,c=20480,r=204],[p=0,l=0,c=0,r=0],true)@COMPLETING
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.io.WriteFlusher - write: WriteFlusher@42289da6{IDLE} [HeapByteBuffer@1c21a7ab[p=0,l=204,c=20480,r=204]={<<<HTTP/1.1 404 Not ....v20130815)||||>>>?????????????????...???????????????}]
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.io.WriteFlusher - update WriteFlusher@42289da6{WRITING}:IDLE-->WRITING
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.io.ChannelEndPoint - flushed 204 SelectChannelEndPoint@1728ae41{/127.0.0.1:49466<r-l>/127.0.0.1:7474,o=true,is=false,os=false,fi=FillInterest@6fc83947{false,null},wf=WriteFlusher@42289da6{WRITING},it=30000}{HttpConnection@78861f38{FILLING},g=HttpGenerator{s=COMPLETING},p=HttpParser{s=END,0 of 0}}{io=0,kio=0,kro=1}
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.io.WriteFlusher - flushed true
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.io.WriteFlusher - update WriteFlusher@42289da6{IDLE}:WRITING-->IDLE
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$CommitCallback@2e5af328 generate: SHUTDOWN_OUT ([p=204,l=204,c=20480,r=0],[p=0,l=0,c=0,r=0],true)@END
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.io.ChannelEndPoint - oshut SelectChannelEndPoint@1728ae41{/127.0.0.1:49466<r-l>/127.0.0.1:7474,o=true,is=false,os=false,fi=FillInterest@6fc83947{false,null},wf=WriteFlusher@42289da6{IDLE},it=30000}{HttpConnection@78861f38{FILLING},g=HttpGenerator{s=END},p=HttpParser{s=END,0 of 0}}{io=0,kio=0,kro=1}
17:28:24.777 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$CommitCallback@2e5af328 generate: DONE ([p=204,l=204,c=20480,r=0],[p=0,l=0,c=0,r=0],true)@END
17:28:24.778 [qtp1865404499-150 - /db/manage/server/ha/available] DEBUG org.eclipse.jetty.server.Server - RESPONSE /db/manage/server/ha/available 404 handled=true
更新1
我在类路径中缺少MasterInfoService.class
。我已经为neo4j-server-enterprise
添加了依赖性,但这还没有解决问题,MasterInfoService
似乎没有被调用。