gpt4 book ai didi

java - neo4j 服务器扩展示例 -- java.net.BindException : Address already in use

转载 作者:太空宇宙 更新时间:2023-11-04 14:01:59 25 4
gpt4 key购买 nike

我正在查看 github 中发布的 neo4j 服务器扩展示例,并且在运行 mvn package 时,我在 MovieServiceIntegrationTest 上的端口 7474 上收到“java.net.BindException:地址已在使用中”。

我通过命令“lsof -i:7474”和“netstat -n”查看了端口,没有看到任何干扰。

我也在 Linux 上尝试过(最初是在 os X 上),也遇到了同样的问题。

调查错误的最佳下一步是什么?

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running example.extension.movies.MovieServiceIntegrationTest
server.baseUri() = http://localhost:7474/
05:46:21.067 [main] WARN o.e.j.server.handler.ContextHandler - o.e.j.s.ServletContextHandler@29314cc9{/,null,null} contextPath ends with /
05:46:21.070 [main] WARN o.e.j.server.handler.ContextHandler - Empty contextPath
05:46:21.078 [main] INFO org.eclipse.jetty.server.Server - jetty-9.0.5.v20130815
05:46:21.133 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler@7b208b45{/,null,AVAILABLE}
Mar 23, 2015 5:46:21 AM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
example.extension.movies
Mar 23, 2015 5:46:21 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class example.extension.movies.MovieResource
Mar 23, 2015 5:46:21 AM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
Mar 23, 2015 5:46:21 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
05:46:21.588 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@ba354ca{/movie,null,AVAILABLE}
Mar 23, 2015 5:46:21 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
05:46:21.757 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@7b4acdc2{/db/manage,null,AVAILABLE}
Mar 23, 2015 5:46:21 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
05:46:21.957 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@736048ed{/db/data,null,AVAILABLE}
05:46:22.061 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /browser, did not find org.apache.jasper.servlet.JspServlet
05:46:22.078 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@64693226{/browser,jar:file:/Users/brianchase/.m2/repository/org/neo4j/app/neo4j-browser/2.1.4/neo4j-browser-2.1.4.jar!/browser,AVAILABLE}
Mar 23, 2015 5:46:22 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
05:46:22.191 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@29314cc9{/,null,AVAILABLE}
05:46:22.251 [main] WARN o.e.j.u.component.AbstractLifeCycle - FAILED ServerConnector@3f985a86{HTTP/1.1}{localhost:7474}: java.net.BindException: Address already in use
java.net.BindException: Address already in use

端口调查(7474 neo4j 服务器监听):

Computer:~ user$ lsof -i:7474
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 421 user 137u IPv6 0x4c075845f5b86ccd 0t0 TCP localhost:7474 (LISTEN)

网络统计:

Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.44.208.49303 65.115.96.238.80 SYN_SENT
tcp4 0 0 192.168.44.208.49301 209.197.20.103.80 ESTABLISHED
tcp4 0 0 192.168.44.208.49300 4.31.28.74.80 ESTABLISHED
tcp4 164 0 192.168.44.208.49276 52.0.233.188.80 CLOSE_WAIT
tcp4 0 0 192.168.44.208.49208 108.160.170.34.80 ESTABLISHED
tcp4 37 0 192.168.44.208.49186 108.160.165.211.443 CLOSE_WAIT
tcp4 37 0 192.168.44.208.49185 108.160.165.211.443 CLOSE_WAIT
tcp4 37 0 192.168.44.208.49184 108.160.165.211.443 CLOSE_WAIT
tcp4 37 0 192.168.44.208.49183 108.160.165.211.443 CLOSE_WAIT
tcp4 0 0 192.168.44.208.49178 17.172.233.120.5223 ESTABLISHED
tcp4 0 0 192.168.44.208.49177 17.110.227.101.5223 ESTABLISHED
tcp4 37 0 192.168.44.208.49170 108.160.166.141.443 CLOSE_WAIT
udp4 0 0 *.58920 *.*
udp4 0 0 *.17500 *.*
udp4 0 0 *.53249 *.*
udp4 0 0 192.168.44.208.123 *.*
udp6 0 0 fe80::2ef0:eeff:.123 *.*
udp6 0 0 fe80::8402:97ff:.123 *.*
udp6 0 0 fe80::1%lo0.123 *.*
udp4 0 0 127.0.0.1.123 *.*
udp6 0 0 ::1.123 *.*
udp6 0 0 *.123 *.*
udp4 0 0 *.123 *.*
udp6 0 0 *.5353 *.*
udp4 0 0 *.5353 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.58003 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp6 0 0 *.5353 *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp6 0 0 *.5353 *.*
udp4 0 0 *.5353 *.*
udp46 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp46 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.* *.*
udp4 0 0 *.137 *.*
udp4 0 0 *.138 *.*

最佳答案

运行 Maven 测试时,您似乎正在运行一个 Neo4j 实例。确保在运行 Maven 之前关闭它。

在运行 mvn 之前,使用 jps 列出所有正在运行的 java 进程。 neo4j 进程在 jps list 中被称为 Bootstrapper。确保没有这样的过程。

关于java - neo4j 服务器扩展示例 -- java.net.BindException : Address already in use,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29219451/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com