-
Notifications
You must be signed in to change notification settings - Fork 664
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
javax.net.ssl.SSLException: handshake timed out #907
Comments
is it related to worker count ? some how the error as handshake time out is misleading. Created issue at netty project, got deferred to here, fyi, netty/netty#9792 |
@gurudatta11 Is it possible that you open too many connections? Look here #796 (comment) Try to switch to a |
SSLException with handshake time out is gone,
|
Weird thing is I don't think it's not handshake time out exception at all, it's connection pool or worker count problem. The way the error is propagated is wrong. |
@gurudatta11 Did you check the link to the issue above? Note that with version 0.9 the connection pool is fixed by default, but with version 0.8 it is elastic by default. |
@violetagg But not sure, if that's the actual fix, if connections are being queued internally in the thread pool after the max limit, what's the expected behavior ??
Also logging as warn, if connection pool reached maximum limit might be helpful. For my current setup: Since in my prod code, I used new connection, Also, Is it possible to update existing documentation with high level architecture diagram for reactor-netty. |
If you use the
If you use the
Once a connection is acquired/created, TLS handshake starts. If there are too many connections then it might be that 10s (the default TSL handshake timeout) is not enough.
Please create an enhancement issue for this
This provider does not use pooling. Which means we will create a connection every time and then this connection will be thrown after finishing. There is no
Please create an enhancement issue for this |
Feature requests: @violetagg Setting worker count to a higher number But when the required connections are more than the configured max connection, it's reporting as ssl handshake timeout. |
Even I had the same issue. Try this, it fixed my issue. The problem is not with connection timeout its with read timeout
|
@violetagg - We're receiving the SSL Handshake Timout Exception in our production environment. Captured few details for the reference those are mentioned below :
It would be a great help if we could know what's going wrong. |
@uvarajk Please open a new issue, with Reactor Netty version, Java, OS, the scenario. What component provides those properties?
You have |
@violetagg opened a new issue @ #1617 (comment) |
already has some solution for this issue? |
Hi, |
@santitigaga @arun-a-nayagam Please open a new issue with a reproducible example. |
Closing this issue as there is no enough information in order to proceed with the investigation |
Why not fix the problem? |
I have the same code, different servers, some servers will have a handshake timeout, some will not |
缓存下和配置中心的交互,不要一直去拿,那玩意有问题。
| |
***@***.***
|
|
***@***.***
|
…---- Replied Message ----
| From | ***@***.***> |
| Date | 12/04/2022 22:57 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [reactor/reactor-netty] javax.net.ssl.SSLException: handshake timed out (#907) |
I have the same code, different servers, some servers will have a handshake timeout, some will not
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
我们最后处理的是请求在处理时间不能太久,优化代码
At 2022-12-04 22:57:14, "fanwei" ***@***.***> wrote:
I have the same code, different servers, some servers will have a handshake timeout, some will not
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
upgrade jdk to 1.8.251 |
Our previous problem was when we shook hands, and did other things, to synchronize the registry, using CSE, and the CSE registry returned too slowly, and finally added an asynchronous cache here. Operational issues.
Upgrading jdk should not solve it, because we are using jdk8.
…---- 回复的原邮件 ----
| 发件人 | Teng Long ***@***.***> |
| 日期 | 2024年03月21日 23:54 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.***>***@***.***> |
| 主题 | Re: [reactor/reactor-netty] javax.net.ssl.SSLException: handshake timed out (#907) |
upgrade jdk to 1.8.251
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
System Architecture
We as client can communicate to different devices (servers) with different ip addresses.
All the servers share a common root certificate to expose it as TLS, but unique key/ keystore per device.
Expected Behavior
No Handshake time out should occur.
When making a call to few devices concurrently (let say less than some threshold 4) error will not occur, but if we invoke calls concurrently more than this threshold , getting to see handshake timeout issues.
Debugged with option -Djavax.net.debug=ssl , still no luck on figuring out why the issue is happening.
There is no problem with the server, when we try like one on one with a server, we never encountered handshake timeout issue, but when tried on multiple servers concurrently few error out and few get success in handshake.
I think there is some concurrency issues going on in reactor netty, unable to figure out where.
Please share architecture diagram if there is any for reactory netty .
Any pointers would be helpful to resolve this issue.
Actual Behavior
Getting Below error:
client make a call to server
gets HandshakeTimeout after around 1.15 min to 1.40 min
Since default HandshakeTimeout is 10 secs, also tried setting below system variable property , but still handshake timeout occurs.
-Dreactor.netty.tcp.sshHandshakeTimeout=120000
HandshakeTimeout didn't occur after 2 minutes are per above config, it occurred around same range 1.15 min to 1.40 min,
Even though error says handshakeTimeout, it feels like this call is being internally queued and tried after certain time and then handshakeTimeout occurs.
Steps to Reproduce
JdkSsl context being used by reactor netty.
Getting HttpClient as below:
Note: getting a newConnection (instead of HttpClient.create() ) else there is weird concurrency problem going on, instead of hitting one server it's hitting different server and also used to get reactor.netty.http.client.PrematureCloseException (Reference: https://projectreactor.io/docs/netty/release/reference/index.html#_connect) hence using newConnection.
Getting sslContext as below:
Minimal yet complete reproducer code (or URL to code)
This is difficult to reproduce without complete production setup.
Possible Solution
Your Environment
Reactor version(s) used:
reactor-netty :0.8.13:RELEASE
Other relevant libraries versions (eg.
netty
, ...):netty -> 4.1.43.FINAL
derived based on spring boot parent version given below
JVM version (e.g.
java -version
)openjdk version "1.8.0_222"
Also tried on java11.
OS version (e.g.
uname -a
)4.15.0-66-generic #75-Ubuntu
The text was updated successfully, but these errors were encountered: