GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Discard example broken · Issue #14499 · netty/netty

Discard example broken #14499

New issue
Copy link
New issue
Copy link
Closed
#16724
Closed
Discard example broken#14499
#16724
Copy link

Description

@lasse42
lasse42
opened on Nov 25, 2024
Issue body actions

Expected behavior

Run the discard example in two terminals:
./run-example discard-server / ./run-example discard-client

should work

Actual behavior

Crash with:

Error: Could not find or load main class
Caused by: java.lang.ClassNotFoundException:

Tracked this down to example/pom.xml where the last part where the example is run has a argument ${argLine.alpnAgent}.
This argument is empty and java do not like an empty arg. It works if it is removed.

Then the ssl part is broken.
Running the commands (with the alpnAgent removed)

./run-example -Dssl discard-server / ./run-example -Dssl discard-client
The example just hangs until the handshake times out.

Tracked this down to the DiscardClient.java. It uses ServerUtil.buildSslContext(), but this is a server setup.

The client can be changed to:

private static final boolean SSL = System.getProperty("ssl") != null;

public static void main(String[] args) throws Exception {
    // Configure SSL.
    final SslContext sslCtx = SSL ? SslContextBuilder
        .forClient()
        .trustManager(InsecureTrustManagerFactory.INSTANCE)
        .build() : null;

Steps to reproduce

Just build and run the example.

Minimal yet complete reproducer code (or URL to code)

N/A

Netty version

4.1.115

JVM version (e.g. java -version)

N/A

OS version (e.g. uname -a)

Linux fedora 6.9.7-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 27 18:11:45 UTC 2024 x86_64 GNU/Linux

Activity

  1. daguimu
    added a commit that references this issue on Apr 29, 2026

    Fix DiscardClient hang under -Dssl by using a client SSL context

    This issue will close once commit 3b28ee5 is merged into the '4.1' branch.
    3b28ee5
  2. normanmaurer
    added a commit that references this issue on Apr 29, 2026

    Fix DiscardClient hang under -Dssl by using a client SSL context (#16717

    This issue will close once commit b55fabc is merged into the '4.2' branch.
    b55fabc
  3. normanmaurer
    closed this as completedin #16724on Apr 29, 2026
  4. normanmaurer
    added a commit that references this issue on Apr 29, 2026

    Auto-port 4.2: Fix DiscardClient hang under -Dssl by using a client S…

    This issue will close once commit 6ecb63d is merged into the '4.2' branch.
    6ecb63d
  5. chrisvest
    added a commit that references this issue on Apr 29, 2026

    Fix DiscardClient hang under -Dssl by using a client SSL context (#16717

    This issue will close once commit b2fecb8 is merged into the '4.2' branch.
    b2fecb8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.