{"action":"opened","issue":{"url":"https://api.github.com/repos/sunng87/ring-jetty9-adapter/issues/36","repository_url":"https://api.github.com/repos/sunng87/ring-jetty9-adapter","labels_url":"https://api.github.com/repos/sunng87/ring-jetty9-adapter/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/sunng87/ring-jetty9-adapter/issues/36/comments","events_url":"https://api.github.com/repos/sunng87/ring-jetty9-adapter/issues/36/events","html_url":"https://github.com/sunng87/ring-jetty9-adapter/issues/36","id":343524605,"node_id":"MDU6SXNzdWUzNDM1MjQ2MDU=","number":36,"title":"example-http2 doesn't work","user":{"login":"hukka","id":119247,"node_id":"MDQ6VXNlcjExOTI0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/119247?v=4","gravatar_id":"","url":"https://api.github.com/users/hukka","html_url":"https://github.com/hukka","followers_url":"https://api.github.com/users/hukka/followers","following_url":"https://api.github.com/users/hukka/following{/other_user}","gists_url":"https://api.github.com/users/hukka/gists{/gist_id}","starred_url":"https://api.github.com/users/hukka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hukka/subscriptions","organizations_url":"https://api.github.com/users/hukka/orgs","repos_url":"https://api.github.com/users/hukka/repos","events_url":"https://api.github.com/users/hukka/events{/privacy}","received_events_url":"https://api.github.com/users/hukka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-23T07:51:34Z","updated_at":"2018-07-23T07:51:34Z","closed_at":null,"author_association":"NONE","body":"```\r\n$ lein with-profile default,example-http2 run\r\nReflection warning, clojure/tools/nrepl/middleware/load_file.clj:87:38 - reference to field recv on java.lang.Object can't be resolved.\r\nReflection warning, clojure/tools/nrepl/middleware/load_file.clj:88:46 - call to method recv on java.lang.Object can't be resolved (no such method).\r\nReflection warning, clojure/tools/nrepl/middleware/load_file.clj:93:27 - call to method send on java.lang.Object can't be resolved (no such method).\r\nReflection warning, clojure/tools/nrepl/server.clj:142:21 - call to java.net.InetSocketAddress ctor can't be resolved.\r\nReflection warning, /tmp/form-init3411137679930513902.clj:1:1027 - call to static method invokeStaticMethod on clojure.lang.Reflector can't be resolved (argument types: unknown, java.lang.String, unknown).\r\nReflection warning, ring/adapter/jetty9/websocket.clj:170:17 - reference to field getWebSocketFactory can't be resolved.\r\nReflection warning, ring/adapter/jetty9/websocket.clj:171:13 - call to method isUpgradeRequest can't be resolved (target class is unknown).\r\nReflection warning, ring/adapter/jetty9/websocket.clj:172:15 - call to method acceptWebSocket can't be resolved (target class is unknown).\r\nReflection warning, ring/adapter/jetty9/websocket.clj:174:19 - reference to field isCommitted can't be resolved.\r\nReflection warning, ring/adapter/jetty9/websocket.clj:176:11 - call to method handle can't be resolved (target class is unknown).\r\n2018-07-23 10:39:08.341:INFO::main: Logging initialized @2629ms to org.eclipse.jetty.util.log.StdErrLog\r\nReflection warning, ring/adapter/jetty9.clj:60:35 - reference to field startAsync can't be resolved.\r\nReflection warning, ring/adapter/jetty9.clj:67:12 - call to method sendError can't be resolved (target class is unknown).\r\nReflection warning, ring/adapter/jetty9.clj:125:11 - call to org.eclipse.jetty.server.ServerConnector ctor can't be resolved.\r\nReflection warning, ring/adapter/jetty9.clj:137:11 - call to org.eclipse.jetty.server.ServerConnector ctor can't be resolved.\r\nException in thread \"main\" java.lang.IllegalStateException: No Server ALPNProcessors!, compiling:(/tmp/form-init3411137679930513902.clj:1:73)\r\n\tat clojure.lang.Compiler.load(Compiler.java:7526)\r\n\tat clojure.lang.Compiler.loadFile(Compiler.java:7452)\r\n\tat clojure.main$load_script.invokeStatic(main.clj:278)\r\n\tat clojure.main$init_opt.invokeStatic(main.clj:280)\r\n\tat clojure.main$init_opt.invoke(main.clj:280)\r\n\tat clojure.main$initialize.invokeStatic(main.clj:311)\r\n\tat clojure.main$null_opt.invokeStatic(main.clj:345)\r\n\tat clojure.main$null_opt.invoke(main.clj:342)\r\n\tat clojure.main$main.invokeStatic(main.clj:424)\r\n\tat clojure.main$main.doInvoke(main.clj:387)\r\n\tat clojure.lang.RestFn.applyTo(RestFn.java:137)\r\n\tat clojure.lang.Var.applyTo(Var.java:702)\r\n\tat clojure.main.main(main.java:37)\r\nCaused by: java.lang.IllegalStateException: No Server ALPNProcessors!\r\n\tat org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:53)\r\n\tat org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:46)\r\n\tat ring.adapter.jetty9$https_connector.invokeStatic(jetty9.clj:123)\r\n\tat ring.adapter.jetty9$https_connector.invoke(jetty9.clj:121)\r\n\tat ring.adapter.jetty9$create_server.invokeStatic(jetty9.clj:170)\r\n\tat ring.adapter.jetty9$create_server.invoke(jetty9.clj:144)\r\n\tat ring.adapter.jetty9$run_jetty.invokeStatic(jetty9.clj:219)\r\n\tat ring.adapter.jetty9$run_jetty.invoke(jetty9.clj:176)\r\n\tat rj9a.http2$_main.invokeStatic(http2.clj:8)\r\n\tat rj9a.http2$_main.doInvoke(http2.clj:7)\r\n\tat clojure.lang.RestFn.invoke(RestFn.java:397)\r\n\tat clojure.lang.Var.invoke(Var.java:377)\r\n\tat user$eval3112.invokeStatic(form-init3411137679930513902.clj:1)\r\n\tat user$eval3112.invoke(form-init3411137679930513902.clj:1)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:7062)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:7052)\r\n\tat clojure.lang.Compiler.load(Compiler.java:7514)\r\n\t... 12 more\r\nError encountered performing task 'run' with profile(s): 'base,system,user,provided,dev,example-http2'\r\nSuppressed exit\r\n$ java -version\r\nopenjdk version \"1.8.0_171\"\r\nOpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)\r\nOpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)\r\n```\r\n\r\nUpdating the alpn-boot to match the exact JDK version according to https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html doesn't help either:\r\n\r\n```\r\n$ grep alpn-boot project.clj \r\n                             :boot-dependencies [[org.mortbay.jetty.alpn/alpn-boot \"8.1.12.v20180117\"\r\n```\r\n\r\nSo far I haven't managed to get Jetty working via jetty9 no matter what I put in the project.clj (I've tried using conscrypt too), so a working example would be great!\r\n\r\nTo get jetty start I've needed either org.eclipse.jetty/jetty-alpn-openjdk-server or both org.eclipse.jetty/jetty-alpn-conscrypt-server and org.conscrypt/conscrypt-openjdk-uber. Then jetty claims it's starting h2 on the TLS port.\r\n```\r\n2018-07-23 10:48:14.145:INFO:oejs.AbstractConnector:main: Started ServerConnector@6f96dd64{SSL,[ssl, http/1.1, alpn, h2]}{0.0.0.0:5443}\r\n2018-07-23 10:48:14.146:INFO:oejs.AbstractConnector:main: Started ServerConnector@4d7cac24{HTTP/1.1,[http/1.1, h2c]}{0.0.0.0:5000}\r\n2018-07-23 10:48:14.146:INFO:oejs.Server:main: Started @2742ms\r\n```\r\n\r\nBut only the h2 on the unencrypted port works (with curl). Neither curl nor chrome can get the ALPN work \r\nwith my jetty config (though they work with google, so the client side should be ok).\r\n\r\n```\r\n$ curl -v -I --http2 http://localhost:5000\r\n* Rebuilt URL to: http://localhost:5000/\r\n*   Trying 127.0.0.1...\r\n* TCP_NODELAY set\r\n* Connected to localhost (127.0.0.1) port 5000 (#0)\r\n> HEAD / HTTP/1.1\r\n> Host: localhost:5000\r\n> User-Agent: curl/7.58.0\r\n> Accept: */*\r\n> Connection: Upgrade, HTTP2-Settings\r\n> Upgrade: h2c\r\n> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA\r\n> \r\n< HTTP/1.1 101 Switching Protocols\r\nHTTP/1.1 101 Switching Protocols\r\n* Received 101\r\n* Using HTTP2, server supports multi-use\r\n* Connection state changed (HTTP/2 confirmed)\r\n* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0\r\n\r\n* Connection state changed (MAX_CONCURRENT_STREAMS updated)!\r\n< HTTP/2 200 \r\nHTTP/2 200 \r\n< server: Jetty(9.4.11.v20180605)\r\nserver: Jetty(9.4.11.v20180605)\r\n\r\n< \r\n* Connection #0 to host localhost left intact\r\n\r\n$ curl --insecure -v -I --http2 https://localhost:5443\r\n* Rebuilt URL to: https://localhost:5443/\r\n*   Trying 127.0.0.1...\r\n* TCP_NODELAY set\r\n* Connected to localhost (127.0.0.1) port 5443 (#0)\r\n* ALPN, offering h2\r\n* ALPN, offering http/1.1\r\n* successfully set certificate verify locations:\r\n*   CAfile: /etc/ssl/certs/ca-certificates.crt\r\n  CApath: /etc/ssl/certs\r\n* TLSv1.2 (OUT), TLS handshake, Client hello (1):\r\n* TLSv1.2 (IN), TLS handshake, Server hello (2):\r\n* TLSv1.2 (IN), TLS handshake, Certificate (11):\r\n* TLSv1.2 (IN), TLS handshake, Server key exchange (12):\r\n* TLSv1.2 (IN), TLS handshake, Server finished (14):\r\n* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):\r\n* TLSv1.2 (OUT), TLS change cipher, Client hello (1):\r\n* TLSv1.2 (OUT), TLS handshake, Finished (20):\r\n* TLSv1.2 (IN), TLS handshake, Finished (20):\r\n* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384\r\n* ALPN, server did not agree to a protocol\r\n* Server certificate:\r\n*  subject: C=Unknown; ST=Unknown; L=Unknown; O=Unknown; OU=Unknown; CN=Unknown\r\n*  start date: Jul 15 13:45:28 2015 GMT\r\n*  expire date: Oct 13 13:45:28 2015 GMT\r\n*  issuer: C=Unknown; ST=Unknown; L=Unknown; O=Unknown; OU=Unknown; CN=Unknown\r\n*  SSL certificate verify result: self signed certificate (18), continuing anyway.\r\n> HEAD / HTTP/1.1\r\n> Host: localhost:5443\r\n> User-Agent: curl/7.58.0\r\n> Accept: */*\r\n> \r\n< HTTP/1.1 200 OK\r\nHTTP/1.1 200 OK\r\n< Content-Length: 8\r\nContent-Length: 8\r\n< Server: Jetty(9.4.11.v20180605)\r\nServer: Jetty(9.4.11.v20180605)\r\n\r\n< \r\n* Connection #0 to host localhost left intact\r\n```"}}
{"actor":{"display_login":"hukka"}}