Skip to content

Enable HTTP/2 on GlassFish 7 (HTTPS 8443) – ERR_HTTP2_PROTOCOL_ERROR in Chrome with Self-Signed Cert #25954

@RY9901

Description

@RY9901

GlassFish Version (and build number)

7.025

JDK version

17

OS

Linux

Database

MySQL

Problem Description

What I'm trying to do
I am running a Java EE application on GlassFish 7 and want to enable HTTPS on port 8443 using a self-signed certificate with proper Subject Alternative Names (SAN) set for my server IPs and localhost.

What I observed

Firefox: Works perfectly — all assets load successfully over HTTPS
Chrome: Fails with ERR_HTTP2_PROTOCOL_ERROR on every static file after the initial HTML
curl with --http2: Returns HTTP/2 200 for individual files
curl with --http1.1: Works fine for all files
The issue is specific to Chrome's HTTP/2 implementation against GlassFish 7
Adding http2-enabled="false" to domain.xml fixes the issue but disables HTTP/2

Questions

Is this a known bug in GlassFish 7's HTTP/2 implementation with Chrome?
Is there any GlassFish 7 configuration to make HTTP/2 work correctly with Chrome and a self-signed cert without disabling HTTP/2 or adding a reverse proxy?
Is there something specific about how Chrome handles HTTP/2 stream multiplexing that GlassFish 7 doesn't implement correctly?

Steps to reproduce

Steps to Reproduce

  1. Set up a GlassFish 7 server domain.
  2. Configure an HTTPS listener on port 8443 using a self-signed SSL certificate.
  3. Enable HTTP/2 on the HTTPS listener.
  4. Deploy a web application that includes static assets (e.g., JavaScript, CSS, images).
  5. Open the application in Google Chrome using the HTTPS URL (port 8443).
  6. Open Developer Tools → Network tab.
  7. Reload the page.
  8. Observe that while the main HTML may load, static assets fail with:
  9. ERR_HTTP2_PROTOCOL_ERROR

Impact of Issue

The Problem
After all the above steps, navigating to https://localhost:8443/VHIS/ in Chrome, the first HTML page loads but all subsequent static asset requests fail with:

GET https://localhost:8443/VHIS/assets/vendor/js/jquery.core.js net::ERR_HTTP2_PROTOCOL_ERROR
GET https://localhost:8443/VHIS/assets/vendor/js/bootstrap.min.js net::ERR_HTTP2_PROTOCOL_ERROR
GET https://localhost:8443/VHIS/assets/shared/js/vhis.js net::ERR_HTTP2_PROTOCOL_ERROR
... (all JS and CSS files fail with same error)

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions