Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error detected in bolt session #11972

Closed
zhizh opened this Issue Jul 13, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@zhizh
Copy link

zhizh commented Jul 13, 2018

Unexpected error detected in bolt session

  • Neo4j version: 3.4.0, 3.4.1, 3.4.4 Enterpsise&Community
  • This bug is not reproduced in the 3.3.6 and previous versions
  • Operating system: Windows 10

Steps to reproduce

  1. neo4j console`
  2. http://localhost:7474

Expected behavior

No error message

Actual behavior

D:\poc\neo4j-enterprise-3.4.1\bin>neo4j.bat console
2018-07-12 16:43:12.187+0000 INFO ======== Neo4j 3.4.1 ========
2018-07-12 16:43:12.219+0000 INFO Starting...
2018-07-12 16:43:14.520+0000 INFO Initiating metrics...
2018-07-12 16:43:15.744+0000 INFO Sending metrics to CSV file at D:\poc\neo4j-enterprise-3.4.1\metrics
2018-07-12 16:43:16.106+0000 INFO Bolt enabled on 127.0.0.1:7687.
2018-07-12 16:43:16.589+0000 ERROR Unexpected error detected in bolt session '00000000000000e0-00002720-00000001-9866b6dd06c41549-97099f79'. The client is unauthorized due to authentication failure.
org.neo4j.bolt.v1.runtime.BoltConnectionFatality: The client is unauthorized due to authentication failure.
at org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine.java:742)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine.java:728)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.access$500(BoltStateMachine.java:62)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$1.init(BoltStateMachine.java:435)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.init(BoltStateMachine.java:145)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onInit$0(BoltMessageRouter.java:70)
at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue$0(MetricsReportingBoltConnection.java:69)
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:195)
at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.processNextBatch(MetricsReportingBoltConnection.java:87)
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:143)
at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:170)
at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError$2(ExecutorBoltScheduler.java:153)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

@lutovich

This comment has been minimized.

Copy link
Contributor

lutovich commented Jul 13, 2018

Hi @zhizh,

I think this error is logged because neo4j-browser tries to log in using credentials stored in browser's local storage. Username-password box is shown when credentials to not match and this error is logged. Local storage is per-page scheme, host an port. Auth information from local storage can thus clash if multiple different neo4j databases are started on the same machine with same HTTP listen address settings.

This error is completely harmless in such scenario. It can only pollute the log a bit. I guess we could clean the local storage on an unsuccessful auth attempt. This will make the error appear only once in the log.

What do you think @oskarhane?

@zhizh

This comment has been minimized.

Copy link
Author

zhizh commented Jul 14, 2018

Hi @oskarhane

Thank you for the prompt reply. I was finally relieved. I thought it was a big problem for the new version.

Many thanks @oskarhane

@zhizh zhizh closed this Jul 14, 2018

@donatelloOo

This comment has been minimized.

Copy link

donatelloOo commented Aug 13, 2018

Instead of closing the issue, and scaring the users that encounter this error in logs, don't you think that:

org.neo4j.bolt.security.auth.AuthenticationException should be handled as a org.neo4j.bolt.v1.runtime.BoltConnectionAuthFatality in org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine, Throwable, Neo4jError)

?

@calebebrim

This comment has been minimized.

Copy link

calebebrim commented Aug 15, 2018

Hi Guys...
Here the app stops to work when the error is shown on console.

Here is the log:
2018-08-15 00:29:32.949+0000 INFO Started. 2018-08-15 00:29:33.259+0000 INFO Mounted REST API at: /db/manage 2018-08-15 00:29:33.375+0000 INFO Server thread metrics has been registered successfully 2018-08-15 00:29:34.354+0000 INFO Remote interface available at http://localhost:7474/ 2018-08-15 00:29:43.936+0000 ERROR Unexpected error detected in bolt session '28cfe9fffe1df93f-000095a7-00000006-fa05003f4027005b-8f576a4c'. Failed to process a bolt message org.neo4j.bolt.v1.runtime.BoltConnectionFatality: Failed to process a bolt message at org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine.java:742) at org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine.java:728) at org.neo4j.bolt.v1.runtime.BoltStateMachine.access$500(BoltStateMachine.java:62) at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$1.init(BoltStateMachine.java:435) at org.neo4j.bolt.v1.runtime.BoltStateMachine.init(BoltStateMachine.java:145) at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onInit$0(BoltMessageRouter.java:70) at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue$0(MetricsReportingBoltConnection.java:69) at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:195) at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.processNextBatch(MetricsReportingBoltConnection.java:87) at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:143) at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:170) at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError$2(ExecutorBoltScheduler.java:153) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: org.neo4j.bolt.security.auth.AuthenticationException: The client is unauthorized due to authentication failure. at org.neo4j.bolt.security.auth.BasicAuthentication.doAuthenticate(BasicAuthentication.java:78) at org.neo4j.bolt.security.auth.BasicAuthentication.authenticate(BasicAuthentication.java:60) at org.neo4j.bolt.v1.runtime.BoltStateMachineSPI.authenticate(BoltStateMachineSPI.java:93) at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$1.init(BoltStateMachine.java:412) ... 12 more 2018-08-15 00:30:10.456+0000 ERROR Unexpected error detected in bolt session '28cfe9fffe1df93f-000095a7-00000014-24bb42c41c2767da-17c34835'. Failed to process a bolt message org.neo4j.bolt.v1.runtime.BoltConnectionFatality: Failed to process a bolt message at org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine.java:742) at org.neo4j.bolt.v1.runtime.BoltStateMachine.handleFailure(BoltStateMachine.java:728) at org.neo4j.bolt.v1.runtime.BoltStateMachine.access$500(BoltStateMachine.java:62) at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$1.init(BoltStateMachine.java:435) at org.neo4j.bolt.v1.runtime.BoltStateMachine.init(BoltStateMachine.java:145) at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onInit$0(BoltMessageRouter.java:70) at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.lambda$enqueue$0(MetricsReportingBoltConnection.java:69) at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:195) at org.neo4j.bolt.runtime.MetricsReportingBoltConnection.processNextBatch(MetricsReportingBoltConnection.java:87) at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:143) at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:170) at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError$2(ExecutorBoltScheduler.java:153) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: org.neo4j.bolt.security.auth.AuthenticationException: The client is unauthorized due to authentication failure. at org.neo4j.bolt.security.auth.BasicAuthentication.doAuthenticate(BasicAuthentication.java:78) at org.neo4j.bolt.security.auth.BasicAuthentication.authenticate(BasicAuthentication.java:60) at org.neo4j.bolt.v1.runtime.BoltStateMachineSPI.authenticate(BoltStateMachineSPI.java:93) at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$1.init(BoltStateMachine.java:412) ... 12 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.