java連接neo4j出錯(cuò)提示:Unable to process request: General SSLEngine problem

報(bào)錯(cuò):
Exception in thread "main" org.neo4j.driver.v1.exceptions.ClientException: Unable to process request: General SSLEngine problem

at org.neo4j.driver.internal.connector.socket.SocketClient.start(SocketClient.java:87)

at org.neo4j.driver.internal.connector.socket.SocketConnection.(SocketConnection.java:63)

at org.neo4j.driver.internal.connector.socket.SocketConnector.connect(SocketConnector.java:52)

at org.neo4j.driver.internal.pool.InternalConnectionPool$1.allocate(InternalConnectionPool.java:191)

at org.neo4j.driver.internal.pool.InternalConnectionPool$1.allocate(InternalConnectionPool.java:180)

at org.neo4j.driver.internal.pool.ThreadCachingPool.allocate(ThreadCachingPool.java:212)

at org.neo4j.driver.internal.pool.ThreadCachingPool.acquireFromGlobal(ThreadCachingPool.java:164)

at org.neo4j.driver.internal.pool.ThreadCachingPool.acquire(ThreadCachingPool.java:118)

at org.neo4j.driver.internal.pool.InternalConnectionPool.acquire(InternalConnectionPool.java:109)

at org.neo4j.driver.internal.InternalDriver.session(InternalDriver.java:53)

at iie.ac.cn.neo4jBolt.App.main(App.java:13)

Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem

at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1362)

at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:513)

at sun.security.ssl.SSLEngineImpl.writeAppRecord(SSLEngineImpl.java:1177)

at sun.security.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:1149)

at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:469)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.wrap(TLSSocketChannel.java:270)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.runHandshake(TLSSocketChannel.java:131)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.(TLSSocketChannel.java:95)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.(TLSSocketChannel.java:77)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.(TLSSocketChannel.java:70)

at org.neo4j.driver.internal.connector.socket.SocketClient$ChannelFactory.create(SocketClient.java:235)

at org.neo4j.driver.internal.connector.socket.SocketClient.start(SocketClient.java:74)

... 10 more

Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem

at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)

at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1683)

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:278)

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:270)

at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1341)

at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:153)

at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)

at sun.security.ssl.Handshaker$1.run(Handshaker.java:808)

at sun.security.ssl.Handshaker$1.run(Handshaker.java:806)

at java.security.AccessController.doPrivileged(Native Method)

at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1299)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.runDelegatedTasks(TLSSocketChannel.java:142)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.unwrap(TLSSocketChannel.java:203)

at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.runHandshake(TLSSocketChannel.java:127)

... 15 more

Caused by: java.security.cert.CertificateException: Unable to connect to neo4j at `localhost:7687`, because the certificate the server uses has changed. This is a security feature to protect against man-in-the-middle attacks.

If you trust the certificate the server uses now, simply remove the line that starts with `localhost:7687` in the file `C:\Users\Frank\.neo4j\known_hosts`.

The old certificate saved in file is:

-----BEGIN CERTIFICATE-----

2bbc81688243fcb25943f8928f455c5bba6f3e623e9d8616d5be95051c96dffe

3f0eb70a6a7474985f2b00ed1d3240d064f920d68a52d90a62eca4eb59fc83b

-----END CERTIFICATE-----

The New certificate received is:

-----BEGIN CERTIFICATE-----

2bbc81688243fcb25943f8928f455c5bba6f3e623e9d8616d5be95051c96dffe

3f0eb70a6a7474985f2b00ed1d3240d064f920d68a52d90a62eca4eb59fc83b5

-----END CERTIFICATE-----

at org.neo4j.driver.internal.connector.socket.TrustOnFirstUseTrustManager.checkServerTrusted(TrustOnFirstUseTrustManager.java:153)

at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:827)

at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1328)


解決辦法:

1.修改C:\Users\XXX\.neo4j\known_hosts文件內(nèi)容(每個(gè)人的User名不一樣)如下:

localhost:7687 2bbc81688243fcb25943f8928f455c5bba6f3e623e9d8616d5be95051c96dffe3f0eb70a6a7474985f2b00ed1d3240d064f920d68a52d90a62eca4eb59fc83b5

2.重新啟動(dòng)neo4j

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末歧胁,一起剝皮案震驚了整個(gè)濱河市滋饲,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌喊巍,老刑警劉巖屠缭,帶你破解...
    沈念sama閱讀 206,378評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異崭参,居然都是意外死亡呵曹,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,356評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門何暮,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)奄喂,“玉大人,你說(shuō)我怎么就攤上這事海洼】缧拢” “怎么了?”我有些...
    開封第一講書人閱讀 152,702評(píng)論 0 342
  • 文/不壞的土叔 我叫張陵坏逢,是天一觀的道長(zhǎng)域帐。 經(jīng)常有香客問我赘被,道長(zhǎng),這世上最難降的妖魔是什么肖揣? 我笑而不...
    開封第一講書人閱讀 55,259評(píng)論 1 279
  • 正文 為了忘掉前任民假,我火速辦了婚禮,結(jié)果婚禮上龙优,老公的妹妹穿的比我還像新娘羊异。我一直安慰自己,他們只是感情好陋率,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,263評(píng)論 5 371
  • 文/花漫 我一把揭開白布球化。 她就那樣靜靜地躺著秽晚,像睡著了一般瓦糟。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上赴蝇,一...
    開封第一講書人閱讀 49,036評(píng)論 1 285
  • 那天菩浙,我揣著相機(jī)與錄音,去河邊找鬼句伶。 笑死劲蜻,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的考余。 我是一名探鬼主播先嬉,決...
    沈念sama閱讀 38,349評(píng)論 3 400
  • 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼楚堤!你這毒婦竟也來(lái)了疫蔓?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 36,979評(píng)論 0 259
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤停忿,失蹤者是張志新(化名)和其女友劉穎范抓,沒想到半個(gè)月后银锻,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,469評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡滚躯,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,938評(píng)論 2 323
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了嘿歌。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片掸掏。...
    茶點(diǎn)故事閱讀 38,059評(píng)論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖宙帝,靈堂內(nèi)的尸體忽然破棺而出丧凤,到底是詐尸還是另有隱情,我是刑警寧澤茄唐,帶...
    沈念sama閱讀 33,703評(píng)論 4 323
  • 正文 年R本政府宣布息裸,位于F島的核電站蝇更,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏呼盆。R本人自食惡果不足惜年扩,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,257評(píng)論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望访圃。 院中可真熱鬧厨幻,春花似錦、人聲如沸腿时。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,262評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)批糟。三九已至格了,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間徽鼎,已是汗流浹背盛末。 一陣腳步聲響...
    開封第一講書人閱讀 31,485評(píng)論 1 262
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留否淤,地道東北人悄但。 一個(gè)月前我還...
    沈念sama閱讀 45,501評(píng)論 2 354
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像石抡,于是被迫代替她去往敵國(guó)和親檐嚣。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,792評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容