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.

Keycloak 17 installation broken

See original GitHub issue

Describe the bug

After upgrading on Arch Linux from 16.1.0 to 17.x I can’t get past this error:

kc.sh --verbose build
Updating the configuration and installing your custom providers, if any. Please wait.
2022-04-14 12:48:03,819 INFO  [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 10814ms
ERROR: Failed to run 'build' command.
Error details:
picocli.CommandLine$ExecutionException: Failed to update server configuration.
	at org.keycloak.quarkus.runtime.Messages.cliExecutionError(Messages.java:51)
	at org.keycloak.quarkus.runtime.cli.command.AbstractCommand.executionError(AbstractCommand.java:36)
	at org.keycloak.quarkus.runtime.cli.command.Build.run(Build.java:81)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:84)
	at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:77)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31)
Caused by: java.lang.ExceptionInInitializerError
	at org.keycloak.quarkus.runtime.configuration.Configuration.getRawPersistedProperty(Configuration.java:73)
	at org.keycloak.quarkus.runtime.configuration.Configuration.getBuildTimeProperty(Configuration.java:53)
	at org.keycloak.quarkus.runtime.Environment.isDevMode(Environment.java:140)
	at org.keycloak.quarkus.runtime.cli.command.Build.run(Build.java:76)
	... 16 more
Caused by: java.lang.RuntimeException: Failed to load persisted properties from /usr/share/java/keycloak/bin/../lib/quarkus/generated-bytecode.jar
	at org.keycloak.quarkus.runtime.configuration.PersistedConfigSource.loadPersistedConfig(PersistedConfigSource.java:120)
	at org.keycloak.quarkus.runtime.configuration.PersistedConfigSource.readProperties(PersistedConfigSource.java:72)
	at org.keycloak.quarkus.runtime.configuration.PersistedConfigSource.<init>(PersistedConfigSource.java:47)
	at org.keycloak.quarkus.runtime.configuration.PersistedConfigSource.<clinit>(PersistedConfigSource.java:44)
	... 20 more
Caused by: java.util.zip.ZipException: invalid entry CRC (expected 0xa72a76eb but got 0xf9c4b42)
	at java.base/java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:410)
	at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:199)
	at java.base/java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:143)
	at java.base/java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:121)
	at org.keycloak.quarkus.runtime.configuration.PersistedConfigSource.loadPersistedConfig(PersistedConfigSource.java:114)
	... 23 more

Version

17.0.1

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RaitoBezariuscommented, Apr 28, 2022

@pedroigor If you have Nix in the hand: nix-build thisfile.nix -A postgres with this file: https://clbin.com/bMYYg ; it will try to build Keycloak with a specific configuration file and when kc.sh build is run, it will fail.

It seems like @EinarArnason succeeded to get this issue on Archlinux with a recent enough zlib, I assume it requires also a configuration file.

In the original NixOS automatic test, we tested with providing a snakeoil SSL certificate, and it passed, if I remove these, it fails. (As most deployments are using a reverse proxy + LE, Keycloak is unusable at the moment on our latest channels.)

To be precise, here’s our build phase: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/keycloak/default.nix#L25-L46 — the configuration we install is https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/keycloak/default.nix#L28 ; then we install plugins if any and run the build. We crash there: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/keycloak/default.nix#L43

So to summary:

  • A non-trivial configuration file in conf/keycloak.conf
  • kc.sh build
  • zlib ≥ 1.2.12

I mailed the zlib authors to ask if they had any idea on what could be going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keycloak 17 & FileMaker - Ubuntu & MySQL
Keycloak 17 & FileMaker: Installation & Configuration Tutorial Part 1: Ubuntu & MySQL. Lesson in Brief: Setting Up A Server With Ubuntu And...
Read more >
Keycloak 17 & FileMaker: Installation & Configuration Tutorial ...
So, we're going to navigate to the correct folder, build the server, set some environment variables with our initial Keycloak admin username and...
Read more >
installing keycloak version 17 powered by Quarkus on linux
installing keycloak version 17 on Quarkus. install keycloak 17 over quarkus. how to install keycloak 17 by quarkus. keycloak version 17.
Read more >
gocloak is broken for Keycloak v17.0 : need to remove /auth ...
Steps to reproduce the behavior: Keycloak Version 17.0.1; gocloak version 11.0.2; Hit the gocloak api (any method).
Read more >
Server Installation and Configuration Guide - Keycloak
These prerequisites exist for installing the Keycloak server: ... 17:33:58,605 ERROR [org.infinispan.client.hotrod.impl.operations.
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