question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IPv6 listener support

See original GitHub issue

Description

Keycloak 17.0.0 defaults to listening on IPv4 addresses only (0.0.0.0). If I try to listen on IPv6, it says the protocol family is unavailable:

# sudo -u keycloak /opt/keycloak/bin/kc.sh start --http-host="[::]"
...
2022-02-25 14:50:38,518 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Unable to start HTTP server
2022-02-25 14:50:38,519 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: java.net.SocketException: Protocol family unavailable
2022-02-25 14:50:38,520 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Protocol family unavailable

Environment: Ubuntu 20.04, regular (not Wildfly) distribution.

Discussion

No response

Motivation

It is 2022, and it should be possible to run servers either in IPv6-only environments, or dual-stack where the service is accessible via both protocols.

Details

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
candlerbcommented, Feb 28, 2022

Confirmed here:

  • Setting JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m" in the environment (which overrides the default JAVA_OPTS set by kc.sh) enables dual stack listening. I don’t even need to set http-host. So this looks like a good workaround - thank you!
  • After changing front-end proxy to use IPv6 to talk to back-end Keycloak instances, admin console appears to work fine.
1reaction
ciphermenialcommented, Dec 9, 2022

@ciphermenial Thanks. We should probably update docs to mention JAVA_OPTS instead.

I’m not sure if we can do anything better without adding a bit more complexity for users or the script.

No worries. I am happy to edit the script as needed after a reinstall.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Configure a Listener for Both IPv6 and IPv4 Addresses
ora file to listen for both IPv4 and IPv6 addresses. Solution. Sign In. To view full details, sign in with your My Oracle...
Read more >
Configuring an IPv6 Listener | Axigen Documentation
Adding a IPv6 listener for a service is no different than adding a IPv4 listener. E.g. we identify the IP address that Axigen...
Read more >
IPv6 Support - Imperva Documentation Portal
Imperva provides IPv6 support of both client-side and server-side IPv6 traffic. This means that IPv6 is supported both for traffic between your end...
Read more >
IPv6 Support in EFT
The following areas of EFT support IPv6 addresses: ... A. You can choose a single listener IP address, all incoming IPv4 addresses, all...
Read more >
IPv6 support for Vault – HashiCorp Help Center
From Vault configuration, IPv6 can be used on Vault Configuration file listener TCP parameter localhost , cluster_addr and api_addr.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found