[JAVA-4446] can't connect to server Created: 20/Jan/22 Updated: 04/May/22 Resolved: 01/Feb/22 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Reactive Streams |
| Affects Version/s: | 4.4.0, 4.4.1 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Unknown |
| Reporter: | 夕 一 | Assignee: | Ross Lawley |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | external-user | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
Summaryi'm using mongodb-driver-reactivestreams to connect to my mongodb server, the version is 4.4.0, i have receive warn alarm some times, i found the alarm interface are connect to the mongodb. my project throw error
and i found the netty info is here
the server version is:
the mongo server is cluster mode, the program connect to the load balance proxy.
my application is reform from a block system to a reactive system, from spring mvc to spring webflux, using kotlin and kotlin coroutines, when i work with the block driver, the issure dosn't appear, when i upgrade to reactive stream version, the error appear occasionally, i have read some code, the driver dosn't log any error message. Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).i have wrote a mongo adapter to work with mongo server, the mongo adapter inject an mongoClient instance which product by spring
mmy code is here
my prog log is here:
Steps to reproduce. If possible, please include a Short, Self Contained, Correct (Compilable), Example. Additional BackgroundPlease provide any additional background information that may be helpful in diagnosing the bug. |
| Comments |
| Comment by Ross Lawley [ 01/Feb/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please follow up on one of the support channels previously mentioned. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 24/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
the business error and the netty info are 30 days. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 24/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
thanks very much,i have read the driver source, and debug into it. i found the netty report connect timeout much more then business code report error, the timeout info logger appear 7111 times and business code report error 7 times, which indicate the network may is ok when netty report network traffic, when the poll has connected connection, the bussiness code work well. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ross Lawley [ 21/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
As jeff.yemin mentions there is no evidence of a bug, this is expected behaviour of the driver when it cannot connect to a server. The error message:
Shows that the application cannot connect to the MongoDB at that address. The reasons why it can't connect are likely either:
I hope that helps, As jeff.yemin mentioned please reach out to one of the support options:
Just in case you have already opened a support case and are not receiving sufficient help, please let me know and I can facilitate escalating your issue. All the best, Ross | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
it only throw an error, but the error may wrap many times, so the origin error may lost, the error is print by netty, which indicate that it can't connect to the server due to the endpoint is empty. , caused by {io.netty.channel.StacklessClosedChannelException}}]}. Waiting for 30000 ms before timing out" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
because the driver dosn't print any log, so i can't provider any evidence | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
i'm using reactive stream driver from 4.0.1 to 4.4.1 the error log always print, proof the issure is always exist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi there, thank you for reaching out. From your initial description, I don't see any evidence of a bug in the driver. As this seems more like a support issue, I wanted to give you some resources to get this question answered more quickly:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
i found the screenshot is part of my code. so i comment my source code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 夕 一 [ 20/Jan/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|