注意:已经有类似的问题,但解决方案不适用于 jqassistant-maven-plugin。
我在一个新的客户端站点上遇到了一个问题,我想通过使用 jqassistant-maven-plugin (1.10.0) 查看 JQAssistant 扫描的 Neo4j 内容。
运行mvn jqassistant:scan jqassistant:analyze jqassistant:server
将启动并嵌入 Neo4j,扫描我的 Maven 项目的内容,并保持嵌入式实例打开,以便我可以通过 http://localhost:7474/ 访问它
尝试登录浏览器(使用螺栓协议)时,我遇到了连接问题。
ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver.
Please use your browsers development console to determine the root cause of the failure.
Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use.
WebSocket `readyState` is: 3
我以前从未见过这样的工具。我发现的唯一资源是这个文档说应该更改listenAddress。
基本上 JQAssistant 像往常一样配置,除了embeddedListenAddress
:
<plugin>
<groupId>com.buschmais.jqassistant</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>${jqassistant.version}</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>scan</goal>
<goal>analyze</goal>
</goals>
<configuration>
<warnOnSeverity>INFO</warnOnSeverity>
<failOnSeverity>MAJOR</failOnSeverity>
<embeddedListenAddress>0.0.0.0</embeddedListenAddress>
</configuration>
</execution>
</executions>
</plugin>
有没有人有类似的经历?在我看来,浏览器中的一些公司设置(所有这些都可用)正在阻止 websocket。有没有解决的办法。目前我唯一的解决方法是使用专用的 Neo4j 实例,这会使开发设置复杂化,我想避免这种情况。
进一步的分析:
检查浏览器端口,表明它正在侦听
netstat -a | findstr 7474
TCP 0.0.0.0:7474
TCP [::]:7474
另一方面,螺栓端口不可用
netstat -a | findstr 7687