immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2015-11-20T13:15:43.000064Z

@jaen: i've had a little success

2015-11-20T13:16:46.000065Z

it seems having the alpn-boot jar on the bootclasspath is a fundamental requirement

2015-11-20T13:17:53.000066Z

so this does the trick for me...

2015-11-20T13:18:04.000067Z

java -Xbootclasspath/p:/tmp/alpn.jar -jar target/immutant-repro-0.1.0-SNAPSHOT-standalone.jar

2015-11-20T13:18:55.000068Z

that alpn.jar is a copy of [org.mortbay.jetty.alpn/alpn-boot "8.1.5.v20150921"] from my local .m2 repo

2015-11-20T13:19:24.000069Z

yay!

2015-11-20T14:47:09.000070Z

@jaen: i just pushed changes to my fork that fix both 'lein run' and invoking core/start! from a REPL. the :prepend true option is critical in that :boot-dependencies vector

2015-11-20T14:54:42.000071Z

still wish i could get the less-awful-ssl stuff working, but i guess like it's name implies, "less awful" is still awful 😉

2015-11-20T14:54:51.000072Z

its*

jaen 2015-11-20T16:35:24.000073Z

@jcrossley3: nice, I'll check it out with a while; I made the reproduction with lein for your convenience, but I usually use boot, so I'll have to figure out how to do it there. I assume AOT and genclass something that is required and this won't work without it?

2015-11-20T16:43:26.000074Z

@jaen: no, aot/genclass only required for uberjar creation, which isn't relevant. i only put it in there to make sure all 3 worked (lein run, repl, and uberjar)

2015-11-20T16:44:12.000075Z

that bootclasspath plugin is pretty simple -- it just adds jvm options -- so should be straightforward in boot

jaen 2015-11-20T16:45:21.000077Z

I see. When I tried to use boot-immutantand did it like (comp (aot) (immutant-war)) I ended up with a war that didn't contain sources and wouldn't boot in Wildfly, so just wanted to know if it's necessary to AOT.

jaen 2015-11-20T16:45:29.000078Z

(or I might have been doing something else wrong)

jaen 2015-11-20T16:45:48.000080Z

I'll let you know when I try it out.

2015-11-20T16:46:37.000081Z

our own @tcrawley is the boot-immutant expert, but i wouldn't think any aot stuff would be required for an immutant-war

jaen 2015-11-20T16:48:22.000082Z

Yeah, it seems to require just sources.

2015-11-20T16:48:27.000083Z

jaen: that sounds like it might be a bug. would you mind filing an issue at https://github.com/immutant/boot-immutant/issues

jaen 2015-11-20T16:48:51.000085Z

Sure, I will.

jaen 2015-11-20T16:49:23.000086Z

@jcrossley3: so you say lein run works for your repo when you connect with a browser, yes?

2015-11-20T16:49:38.000088Z

@jaen: yes

2015-11-20T16:50:04.000089Z

jaen: thanks!

jaen 2015-11-20T16:50:11.000090Z

I'm just trying it as-is for now and I get this - https://gist.github.com/jaen/48e4f17644bdaa4bf279

2015-11-20T16:52:10.000091Z

huh

2015-11-20T16:52:19.000092Z

i'm using java "1.8.0_66"

jaen 2015-11-20T16:52:42.000093Z

Tried with curl, Open SSL, Chrome 47.0.2526.35 and Firefox 38.0a1 (2015-02-18) and they all just hang there waiting for a reply.

jaen 2015-11-20T16:52:43.000094Z

Hmm

jaen 2015-11-20T16:52:59.000095Z

1.8.0_40 over here.

jaen 2015-11-20T16:53:09.000096Z

I can try upgrading

jaen 2015-11-20T16:53:19.000097Z

Oh

2015-11-20T16:53:20.000098Z

or try downgrading to [org.mortbay.jetty.alpn/alpn-boot "8.1.2.v20141202"]

jaen 2015-11-20T16:53:22.000099Z

Wait

jaen 2015-11-20T16:53:23.000100Z

Yeah

jaen 2015-11-20T16:53:29.000101Z

Just wanted to say that

jaen 2015-11-20T16:53:37.000102Z

That I remembered it's locked to JVM version

2015-11-20T16:54:12.000103Z

i actually tried a few alpn versions in my noodlings and they all worked for me

2015-11-20T16:55:27.000104Z

the 8.1.2 version is hardcoded in the undertow source examples

jaen 2015-11-20T16:56:30.000105Z

These docs here say it's locked to JDK version http://www.eclipse.org/jetty/documentation/9.2.8.v20150217/alpn-chapter.html

jaen 2015-11-20T16:56:48.000106Z

Though it says OpenJDK. I have Orcale JDK, so maybe that's the cause?

2015-11-20T16:57:20.000107Z

yeah, i'm just relaying what Mr. Empirical told me. :simple_smile:

2015-11-20T16:58:17.000108Z

i'm using oracle, fwiw

2015-11-20T16:59:18.000109Z

@jaen: you get that when lein run starts or when the browser connects?

jaen 2015-11-20T16:59:45.000110Z

When I connect

2015-11-20T17:02:49.000111Z

and this is using my latest fork?

jaen 2015-11-20T17:05:44.000112Z

Yes, just pulled

jaen 2015-11-20T17:06:45.000113Z

Updating JDK did the trick

2015-11-20T17:06:50.000114Z

@jaen: can you do this at a repl? (import 'sun.security.ssl.ServerHandshaker)

jaen 2015-11-20T17:06:52.000115Z

1.8.0_66 works perfectly

2015-11-20T17:06:56.000116Z

ah, cool

2015-11-20T17:07:07.000117Z

i guess that's a new class then

2015-11-20T17:07:18.000118Z

man this stuff is BRITTLE!

jaen 2015-11-20T17:07:45.000119Z

That's interesting though, I think I read in some docs _40 was sufficient. Guess not.

jaen 2015-11-20T17:07:47.000120Z

Yeah, quite so.

jaen 2015-11-20T17:08:32.000121Z

I'll just see if this works with boot and I'll be set.

jaen 2015-11-20T17:08:47.000122Z

I imagine you have to do it differently if you run from Wildfly instead of standalone, right?

jaen 2015-11-20T17:09:57.000123Z

Config with some XMLs and whatnot.

2015-11-20T17:10:15.000124Z

yes, but the principles are the same. this just came out yesterday: http://blog.eisele.net/2015/11/http2-with-jboss-eap-7.html

2015-11-20T17:10:26.000125Z

should apply to wildfly as well as eap

jaen 2015-11-20T17:11:12.000126Z

Yeah, I've just googled this as well - http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html

2015-11-20T17:11:24.000128Z

yep, same idea

jaen 2015-11-20T17:12:30.000129Z

So I'll just have to figure what XML that maps to and modify the configuration of Wildfly accordingly.

jaen 2015-11-20T17:12:50.000130Z

Thanks for all the help. I'll file the boot-immutant issue when I get this figured out.

2015-11-20T17:14:36.000131Z

@jaen: thanks for driving us to figure this stuff out! :simple_smile:

2015-11-20T17:15:03.000132Z

people underestimate the value of bug reports

jaen 2015-11-20T17:15:31.000133Z

Incidentally, I imagine it's of less interest since you can config that in Wildfly and I guess it's the more "proper" way to deploy than standalone Immutant, but do you know whether you can config cipher suites and TLS levels programmatically for undertow?

jaen 2015-11-20T17:16:49.000134Z

Because it's in the XMLs, but I'm not sure how that maps to the config builder.

2015-11-20T17:17:22.000135Z

maybe? i guess that's what JAAS is for? but probably involves the use of keytool or some openssl tool? i dunno really.

2015-11-20T17:18:21.000136Z

@jaen: i think your changes through the cli will persist in the xml files, so you can copy/paste from them afterwards

jaen 2015-11-20T17:19:00.000137Z

I figured that maybe you know of some resource that explains how <https-listener name="https-2" socket-binding="https-2" security-realm="UndertowRealm" enabled-cipher-suites="ALL:!MD5:!DHA" enabled-protocols="SSLv3, TLSv1.2"/> maps to Undertow config builder, but then maybe again I'm expecting too much documentation ; F

2015-11-20T17:19:26.000138Z

yeah, that's a lot to expect :simple_smile:

jaen 2015-11-20T17:20:47.000139Z

Yeah, it's all fresh stuff so no surprise there's not all that much docs (and in general Java libs documentation seems somewhat lacking at times).

jaen 2015-11-20T17:20:58.000140Z

I'll just dig around then, maybe something will come up.