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.

bin/kc.sh start-dev fails with banner issue

See original GitHub issue

Describe the bug

I downloaded keycloak 17.0.1 tar.gz and ran kc.sh start-dev. It failed with the following error:

ERROR: Failed to run 'build' command.
ERROR: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.steps.BannerProcessor#recordBanner threw an exception: java.lang.IllegalArgumentException: Bad escape
        at java.base/sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:87)
        at java.base/sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:103)
        at java.base/java.nio.file.Path.of(Path.java:203)
        at java.base/java.nio.file.Paths.get(Paths.java:97)
        at io.quarkus.deployment.steps.BannerProcessor.isQuarkusCoreBanner(BannerProcessor.java:117)
        at io.quarkus.deployment.steps.BannerProcessor.getBanner(BannerProcessor.java:93)
        at io.quarkus.deployment.steps.BannerProcessor.readBannerFile(BannerProcessor.java:48)
        at io.quarkus.deployment.steps.BannerProcessor.recordBanner(BannerProcessor.java:37)
        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.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:882)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

ERROR: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.steps.BannerProcessor#recordBanner threw an exception: java.lang.IllegalArgumentException: Bad escape
        at java.base/sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:87)
        at java.base/sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:103)
        at java.base/java.nio.file.Path.of(Path.java:203)
        at java.base/java.nio.file.Paths.get(Paths.java:97)
        at io.quarkus.deployment.steps.BannerProcessor.isQuarkusCoreBanner(BannerProcessor.java:117)
        at io.quarkus.deployment.steps.BannerProcessor.getBanner(BannerProcessor.java:93)
        at io.quarkus.deployment.steps.BannerProcessor.readBannerFile(BannerProcessor.java:48)
        at io.quarkus.deployment.steps.BannerProcessor.recordBanner(BannerProcessor.java:37)
        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.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:882)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

ERROR: Bad escape
For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

Version

17.0.1

Expected behavior

Have keycloak running

Actual behavior

Failed with error

How to Reproduce?

Download keycloak tar.gz or zip. Unpack and cd. run ./bin/kc.sh start-dev

Anything else?

Debian 11 on amd64 using openjdk 11

openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment 18.9 (build 11.0.12+7)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7, mixed mode)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andreaTPcommented, Mar 29, 2022

Hi @ieugen , thanks for opening this issue, unfortunately I’m not able to reproduce, those are the steps that I attempted:

  • write a Dockerfile with the following content:
FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-debian AS build-env

ENV KEYCLOAK_VERSION 17.0.1
ARG KEYCLOAK_DIST=https://github.com/keycloak/keycloak/releases/download/$KEYCLOAK_VERSION/keycloak-$KEYCLOAK_VERSION.tar.gz

RUN apt-get install -y tar gzip

ADD $KEYCLOAK_DIST /tmp/keycloak/

RUN (cd /tmp/keycloak && \
    tar -xvf /tmp/keycloak/keycloak-*.tar.gz && \
    rm /tmp/keycloak/keycloak-*.tar.gz) || true

RUN mv /tmp/keycloak/keycloak-* /opt/keycloak && mkdir -p /opt/keycloak/data

RUN chmod -R g+rwX /opt/keycloak

FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-debian

COPY --from=build-env --chown=1000:0 /opt/keycloak /opt/keycloak

RUN echo "keycloak:x:0:root" >> /etc/group && \
    echo "keycloak:x:1000:0:keycloak user:/opt/keycloak:/sbin/nologin" >> /etc/passwd

USER 1000

EXPOSE 8080
EXPOSE 8443

ENTRYPOINT [ "/opt/keycloak/bin/kc.sh" ]
  • build it with:
docker build . -t kc-debian
  • run it with:
docker run --rm -it kc-debian start-dev

and this is the output, that is pretty much the expected one:

Updating the configuration and installing your custom providers, if any. Please wait.
2022-03-29 11:04:24,923 INFO  [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 7524ms
2022-03-29 11:04:30,597 INFO  [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: <request>, Strict HTTPS: false, Path: <request>, Strict BackChannel: false, Admin: <request>, Port: -1, Proxied: false
2022-03-29 11:04:32,011 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2022-03-29 11:04:32,033 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2022-03-29 11:04:32,130 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2022-03-29 11:04:32,444 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.6.Final
2022-03-29 11:04:33,154 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: node_943178, Site name: null
2022-03-29 11:04:35,674 INFO  [org.keycloak.quarkus.runtime.storage.database.liquibase.QuarkusJpaUpdaterProvider] (main) Initializing database schema. Using changelog META-INF/jpa-changelog-master.xml
2022-03-29 11:04:38,635 INFO  [org.keycloak.services] (main) KC-SERVICES0050: Initializing master realm
2022-03-29 11:04:40,737 INFO  [io.quarkus] (main) Keycloak 17.0.1 on JVM (powered by Quarkus 2.7.5.Final) started in 15.402s. Listening on: http://0.0.0.0:8080
2022-03-29 11:04:40,737 INFO  [io.quarkus] (main) Profile dev activated. 
2022-03-29 11:04:40,738 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, narayana-jta, reactive-routes, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vault, vertx]
2022-03-29 11:04:40,743 WARN  [org.keycloak.quarkus.runtime.KeycloakMain] (main) Running the server in development mode. DO NOT use this configuration in production.

Are you passing any extra argument? Can you share the complete command line options passed to start-dev and/or the relevant environment variables?

Thanks in advance!

0reactions
andreaTPcommented, Apr 1, 2022

Sounds good to me, thanks for the report @ieugen !

Read more comments on GitHub >

github_iconTop Results From Across the Web

NCM 7.0.2 Fails to login due to presence of "Authorized users ...
It appears SolarWinds Orion NCM 7.0.2 cannot cope with presence of “Authorized users please note:” in Cisco banner. Has anyone diagnosed and resolved...
Read more >
43, Failed getting banner" Error when Trying to Upload a File ...
Symptoms. SFTP File Attachment is failing while using username/password authentication and getting below error in the log files. Error Messages:.
Read more >
Paramiko : Error reading SSH protocol banner - Stack Overflow
I've just got the issue on one server. Openssh client connects fine, Paramiko fails. If I telnet the server, it doesn't write the...
Read more >
crypto/ssh: banner support update breaks connectivity #22359
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Milestone.
Read more >
SSH client option to suppress server banners?
It silences the banner but you're still able to receive errors: $ ssh -o LogLevel=error localhost Permission denied (publickey). Share.
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