我已经在我的neo4j服务器上禁用了身份验证,所以我可以使用cypher shell进行连接,而不需要任何凭证,因为它可以正常工作。

$ ./bin/cypher-shell -a 192.168.0.89

这就是我声明我的驱动程序和会话的方式,我还尝试使用ne4j://*而不是bolt://*

driver, err := neo4j.NewDriver("bolt://192.168.0.89:7687", neo4j.NoAuth())
if err != nil {
    return "", err
}
defer driver.Close()

session, _ := driver.NewSession(neo4j.SessionConfig{AccessMode: neo4j.AccessModeWrite})
defer session.Close()

但这也不起作用。从neo4j olang驱动程序页面https://neo4j.com/developer/go/运行hello world时,我收到此错误

TLS error: Remote end closed the connection, check that TLS is enabled on the server

以下是服务器启动时的日志:

2021-03-07 23:17:23.227+0000 INFO  ======== Neo4j 4.2.3 ========
2021-03-07 23:17:24.119+0000 INFO  Performing postInitialization step for component 'security-users' with version 2 and status CURRENT
2021-03-07 23:17:24.119+0000 INFO  Updating the initial password in component 'security-users'  
2021-03-07 23:17:24.243+0000 INFO  Bolt enabled on 192.168.0.89:7687.
2021-03-07 23:17:25.139+0000 INFO  Remote interface available at http://192.168.0.89:7474/
2021-03-07 23:17:25.140+0000 INFO  Started.

以下是我的所有配置设置:

dbms.connector.bolt.advertised_address=192.168.0.89:7687
dbms.connector.bolt.enabled=true                                                                
dbms.connector.bolt.listen_address=192.168.0.89:7687                                                                
dbms.connector.bolt.tls_level=DISABLED                                                                
dbms.connector.http.advertised_address=192.168.0.89:7474
dbms.connector.http.enabled=true                                                 
dbms.connector.http.listen_address=192.168.0.89:7474                                                               
dbms.connector.https.enabled=false                                                             
dbms.default_advertised_address=192.168.0.89
dbms.default_database=neo4j                                                               
dbms.default_listen_address=192.168.0.89                                                      
dbms.directories.import=/home/eduardo/NEO4J/import                                                       
dbms.directories.neo4j_home=/home/eduardo/NEO4J
dbms.jvm.additional=-Dlog4j2.disable.jmx=true
dbms.security.auth_enabled=false
dbms.tx_log.rotation.retention_policy=1 days                                                          
dbms.tx_state.memory_allocation=ON_HEAP
dbms.windows_service_name=neo4j

同样,我可以连接到相同的主机,并且浏览器也工作正常:

提前感谢您的帮助:)