metosin / compojure-api

Sweet web apis with Compojure & Swagger
http://metosin.github.io/compojure-api/doc/
Eclipse Public License 1.0
1.11k stars 149 forks source link

Client/Server mode has not yet been set #421

Closed micahasmith closed 4 years ago

micahasmith commented 5 years ago

Library Version(s)

1.1.11 on Ubuntu 18.04 openjdk-11

Problem

Recently got this error when receiving any POST message through compojure. All POSTs would then hang indefinitely.

Apr 29 14:38:22 gooten-ppml-4 java[4966]: Mon Apr 29 14:38:22 UTC 2019 [client-loop] ERROR - select exception, should not happen
Apr 29 14:38:22 gooten-ppml-4 java[4966]: java.lang.IllegalStateException: Client/Server mode has not yet been set.
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at java.base/sun.security.ssl.SSLEngineImpl.beginHandshake(SSLEngineImpl.java:98)
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at org.httpkit.client.HttpClient.finishConnect(HttpClient.java:347)
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at org.httpkit.client.HttpClient.run(HttpClient.java:424)
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at java.base/java.lang.Thread.run(Thread.java:834)
Apr 29 14:38:22 gooten-ppml-4 java[4966]: Mon Apr 29 14:38:22 UTC 2019 [client-loop] ERROR - select exception, should not happen
Apr 29 14:38:22 gooten-ppml-4 java[4966]: java.lang.IllegalStateException: Client/Server mode has not yet been set.
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at java.base/sun.security.ssl.SSLEngineImpl.beginHandshake(SSLEngineImpl.java:98)
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at org.httpkit.client.HttpClient.finishConnect(HttpClient.java:347)
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at org.httpkit.client.HttpClient.run(HttpClient.java:424)
Apr 29 14:38:22 gooten-ppml-4 java[4966]:         at java.base/java.lang.Thread.run(Thread.java:834)

So it turns out it was https://github.com/http-kit/http-kit/issues/388. The solution was for me to start using JDK-8 instead of JDK-11.

I'm posting this in here to get your feedback and to give a heads up, I would think that since you're on http-kit 2.3 it would still be an issue even with your new alpha?

miikka commented 4 years ago

I think upgrading http-kit should solve this.

anghene commented 4 years ago

this still happens on post with http-kit 2.4.0-alpha4. on openjdk version "11.0.4" 2019-07-16 anyone else got this error ?

Bost commented 4 years ago

this still happens on post with http-kit 2.4.0-alpha4. on openjdk version "11.0.4" 2019-07-16 anyone else got this error ?

[http-kit "2.4.0-alpha6"] seems to work.

harold commented 2 years ago

[http-kit "2.6.0"] working here, today. Thanks!