logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: mod_h2 – browsers getting confused?
Author
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 10:07    Post subject: mod_h2 – browsers getting confused? Reply with quote

So I've decided to try out this new HTTP/2 stuff on my server. 5 minutes of checking and I had to disable mod_h2. So here's the situation.

I have
www.domain.com, api.domain.com and static.domain.com

all sharing one IP and one multi-domain SSL at the moment.

When I try to load a page from www.domain.com that loads resources from static.domain.com and does some ajax stuff with api.domain.com, some of the requests fail with HTTP status 421, the page can even hang.

Quote:
Misdirected Request

The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) in use for this connection.


The server error log reads
Quote:
AH02032: Hostname static.domain.com provided via SNI and hostname www.domain.com provided via HTTP select a different server


Both Firefox and Chrome behave like this. So I guess HTTP/2 dreamland is closed for me right now Very Happy

Anything I can do apart from (supposedly) bringing api. and static. on another IP?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3056
Location: Hilversum, NL, EU

PostPosted: Tue 22 Sep '15 10:23    Post subject: Reply with quote

Did you download the latest zip ?

Date of mod_h2.so in the zip is 21 Sept 2015 13:36 (my time).
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 10:36    Post subject: Reply with quote

Yes, this one, 93 696 bytes.
MD5 CAFA02C4765BF209A0781F619DFA19CB

I must add that the www. page itself loads properly, as well as all the resources grabbed from www.

Another weird idea is to serve static. and api. from /static and /api, given that I don't need domain diversification with HTTP/2.
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 10:49    Post subject: Reply with quote

https://http2.github.io/http2-spec/#rfc.section.9.1.1

Not sure what to do about it though... I really want to solve the problem just by the web server configuration.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3056
Location: Hilversum, NL, EU

PostPosted: Tue 22 Sep '15 10:50    Post subject: Reply with quote

That's a diff check sum:

MD5-Checksum for: httpd-2.4.17-dev-win64-VC14.zip:
09400ABFDC7DECE7EE955ED46E92E80D

SHA1-Checksum for: httpd-2.4.17-dev-win64-VC14.zip:
4FE1B885A84757A37D4752D0DE9E22817DC51E80

All working fine with 2.4.16 ?
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 10:54    Post subject: Reply with quote

I checksum'd the module itself, I've already deleted the zip, so I'll never know. But I think it has to do with the protocol itself, because it's browser that makes a mistake (4XX status).

2.4.16 is working ok. As well as this latest version with h2 disabled.
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 11:07    Post subject: Reply with quote

https://github.com/icing/mod_h2

Quote:

Known Issues
When multiple vhosts share the same certificate, browsers will reuse an open connection for all those requests. mod_h2 currently only allows requests for the same host the connection was opened with. Some browsers throw then away the existing connection and open a new one. This can heavily impact performance.


My bad, too lazy to read it all Smile
So I guess serving from subfolders is my best bet here.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3056
Location: Hilversum, NL, EU

PostPosted: Tue 22 Sep '15 11:20    Post subject: Reply with quote

I reported it at the dev list, see http://apache-http-server.18135.x6.nabble.com/Apache-HTTP-Server-Dev-f4771363.html (accidentally two times)

Maybe you can also report there further or the dev are reply here.

Thanks for testing !
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 11:30    Post subject: Reply with quote

Thank you Steffen, but it is an already known issue, see my reply above.
Back to top
icing



Joined: 22 Sep 2015
Posts: 41
Location: Münster, Germany

PostPosted: Tue 22 Sep '15 12:43    Post subject: Reply with quote

CamaroSS already found the caveat. Most browsers are smart about this and will not degrade performance. They will see the 421 response once and then use a new connection, keeping the old connection for the other host.

So, it works and, most likely, this is what we will ship in 2.4.18 (fingers crossed).

For some future release, we need to address the TLS renegotiation issues. Hosts A and B might have different SSL configurations, so reusing a connection between them is not possible. That is why we prevent reuse for any other vhost.

In the future, we will check SSL configs for compatiblity, so reuse between vhosts will work if SSL params are the same.
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Tue 22 Sep '15 16:49    Post subject: Reply with quote

icing wrote:
CamaroSS already found the caveat. Most browsers are smart about this and will not degrade performance. They will see the 421 response once and then use a new connection, keeping the old connection for the other host.

Firefox is not, it worked on a small amount of subdomain requests and died on a chat page that loads lots of smilies, avatars from static., does frequent api. calls. Just got "Application not responding" for whole browser.
Back to top
Cy4n1d3



Joined: 22 Apr 2013
Posts: 17

PostPosted: Sat 27 Feb '16 16:40    Post subject: Reply with quote

I can't really find updated information about this issue.

I'm still getting the 421 Error while using Chromium, Firefox seems to be a bit more robust right now.

Strangely it's not happening all the time, but still I'm running into this error frequently.

Am I missing something here? Can I actually fix this myself or is it still a limitation of mod_h2?
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Tue 01 Mar '16 22:33    Post subject: Reply with quote

Why not issue 3 certificates using "letsencrypt" ?
Back to top


Reply to topic   Topic: mod_h2 – browsers getting confused? View previous topic :: View next topic
Post new topic   Forum Index -> Apache