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.

quarkus setup fails with error "quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source thus not running it automatically."

See original GitHub issue

Describe the bug

The Quarkus install fails and states that I am prompted to choose a 0/1 option but there is no prompt at all !

[jbang] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.1.Final/quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source thus not running it automatically.

If you trust the url to be safe to run you can do one of the following:
0) Trust once: Add no trust, just run this time
1) Trust limited url in future:
    jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/

Any other response will result in exit.

[jbang] Type in your choice (0 or 1) and hit enter. Times out after 10 seconds.
[jbang] [ERROR] Could not parse answer as a number. Aborting
[jbang] [ERROR] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.1.Final/quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source and user did not confirm trust thus aborting.    

Expected behavior

setup should run sucessfully as described at https://quarkus.io/get-started/

Actual behavior

the Quarkus setup through jbang fails

How to Reproduce?

Reproducer repo : https://github.com/ezYakaEagle442/azure-java-quarkus/blob/main/tools.md

steps :

  1. Install java
wget https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-linux-x64.tar.gz
tar -xvf microsoft-jdk-11.0.13.8.1-linux-x64.tar.gz

vim .profile
JAVA_HOME="$HOME/jdk-11.0.13+8"
PATH="$JAVA_HOME/bin:$PATH"

. .profile

java -version
whereis java
which java

  1. Quarkus setup
curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
quarkus@quarkusio

You get the here under error :

[jbang] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.1.Final/quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source thus not running it automatically.

If you trust the url to be safe to run you can do one of the following:
0) Trust once: Add no trust, just run this time
1) Trust limited url in future:
    jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/


Any other response will result in exit.

[jbang] Type in your choice (0 or 1) and hit enter. Times out after 10 seconds.
[jbang] [ERROR] Could not parse answer as a number. Aborting
[jbang] [ERROR] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.1.Final/quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source and user did not confirm trust thus aborting.
If you trust the url to be safe to run are here a few suggestions:
Limited trust:
     jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/
Trust all subdomains:
    jbang trust add *.repo1.maven.org
Trust all sources (WARNING! disables url protection):
    jbang trust add *

For more control edit ~/.jbang/trusted-sources.json
  1. Try to add certificates to trust Maven web site certificate
# jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli
# https://github.com/microsoft/WSL/issues/3161
# https://www.pmichaels.net/2020/12/29/add-certificate-into-wsl/

# export certificate from https://repo1.maven.org
echo -n | openssl s_client -showcerts -connect repo1.maven.org:443 -servername repo1.maven.org \
    | openssl x509 > /tmp/repo1.maven.org.cert

openssl x509 -in /tmp/repo1.maven.org.cert -text -noout

cp /tmp/repo1.maven.org.cert /usr/local/share/ca-certificates
sudo update-ca-certificates
# If it works, your certificate will be here below :
ll /etc/ssl/certs

Hit the same error message

  1. Try with --verbose option :
curl -Ls https://sh.jbang.dev --verbose | bash -s - app install --fresh --force quarkus@quarkusio
quarkus@quarkusio
@quarkusio*   Trying 104.26.10.211:443...
* TCP_NODELAY set
* Connected to sh.jbang.dev (104.26.10.211) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [2330 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [80 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Sep  6 00:00:00 2021 GMT
*  expire date: Sep  5 23:59:59 2022 GMT
*  subjectAltName: host "sh.jbang.dev" matched cert's "*.jbang.dev"
*  issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x55744517a880)
} [5 bytes data]
> GET / HTTP/2
> Host: sh.jbang.dev
> user-agent: curl/7.68.0
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
} [5 bytes data]
< HTTP/2 302
< date: Fri, 07 Jan 2022 11:00:41 GMT
< location: https://raw.githubusercontent.com/jbangdev/jbang/master/src/main/scripts/jbang
< cf-ray: 6c9caf0e0ba63aab-CDG
< cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< expires: Thu, 01 Jan 1970 00:00:01 GMT
< vary: Accept-Encoding
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=m3ESkRjHgsl%2FwRjDhdD84mCBn6Yc3Eo6%2BY5tdzpUUsX2KCuBAbRqg3OStHBw5OQpGKRs0E75tTmKhHw1ciGHCSQFiRoHI8aY7nc75EjOH09rsQsJKCmR1rKiF3oqNQ%3D%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
<
{ [0 bytes data]
* Connection #0 to host sh.jbang.dev left intact
* Issue another request to this URL: 'https://raw.githubusercontent.com/jbangdev/jbang/master/src/main/scripts/jbang'
*   Trying 185.199.109.133:443...
* TCP_NODELAY set
* Connected to raw.githubusercontent.com (185.199.109.133) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [3067 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=www.github.com
*  start date: May  6 00:00:00 2020 GMT
*  expire date: Apr 14 12:00:00 2022 GMT
*  subjectAltName: host "raw.githubusercontent.com" matched cert's "*.githubusercontent.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x55744517a880)
} [5 bytes data]
> GET /jbangdev/jbang/master/src/main/scripts/jbang HTTP/2
> Host: raw.githubusercontent.com
> user-agent: curl/7.68.0
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [193 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
} [5 bytes data]
< HTTP/2 200
< cache-control: max-age=300
< content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
< content-type: text/plain; charset=utf-8
< etag: "5592c5aa9cda499f474996ceabf7d569d5f83ea9c2961ce0c6f2b85f0d0542e2"
< strict-transport-security: max-age=31536000
< x-content-type-options: nosniff
< x-frame-options: deny
< x-xss-protection: 1; mode=block
< x-github-request-id: 6CE6:3FA0:2716AB:2A60AB:61D7FCE4
< accept-ranges: bytes
< date: Fri, 07 Jan 2022 11:00:41 GMT
< via: 1.1 varnish
< x-served-by: cache-cdg20741-CDG
< x-cache: HIT
< x-cache-hits: 1
< x-timer: S1641553242.596507,VS0,VE1
< vary: Authorization,Accept-Encoding,Origin
< access-control-allow-origin: *
< x-fastly-request-id: e7462a1ef94f02117a839c33aef5223b81e9809c
< expires: Fri, 07 Jan 2022 11:05:41 GMT
< source-age: 114
< content-length: 6302
<
{ [504 bytes data]
* Connection #1 to host raw.githubusercontent.com left intact
[jbang] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.1.Final/quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source thus not running it automatically.

If you trust the url to be safe to run you can do one of the following:
0) Trust once: Add no trust, just run this time
1) Trust limited url in future:
    jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/


Any other response will result in exit.

[jbang] Type in your choice (0 or 1) and hit enter. Times out after 10 seconds.
[jbang] [ERROR] Could not parse answer as a number. Aborting
[jbang] [ERROR] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.1.Final/quarkus-cli-2.6.1.Final-runner.jar is not from a trusted source and user did not confirm trust thus aborting.
If you trust the url to be safe to run are here a few suggestions:
Limited trust:
     jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/
Trust all subdomains:
    jbang trust add *.repo1.maven.org
Trust all sources (WARNING! disables url protection):
    jbang trust add *

For more control edit ~/.jbang/trusted-sources.json

[jbang] Run with --verbose for more details

Output of uname -a or ver

Linux MININT-279OPT8 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version “11.0.13” 2021-10-19 LTS OpenJDK Runtime Environment Microsoft-27990 (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM Microsoft-27990 (build 11.0.13+8-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: /mnt/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.4 Java version: 11.0.13, vendor: Microsoft, runtime: /home/pinpin/jdk-11.0.13+8 Default locale: en, platform encoding: UTF-8 OS name: “linux”, version: “5.10.60.1-microsoft-standard-wsl2”, arch: “amd64”, family: “unix”

Additional information

I run WSL2/Ubuntu 20.04 on Windows 11

I have found related issues at :

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Snijdercommented, Jan 12, 2022

Same happens for me on ubuntu 21.10 openjdk version “1.8.0_312” (Not running in WSL)

$ curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
[jbang] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.2.Final/quarkus-cli-2.6.2.Final-runner.jar is not from a trusted source thus not running it automatically.

If you trust the url to be safe to run you can do one of the following:
0) Trust once: Add no trust, just run this time
1) Trust limited url in future:
    jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/


Any other response will result in exit.

[jbang] Type in your choice (0 or 1) and hit enter. Times out after 10 seconds.
[jbang] [ERROR] Could not parse answer as a number. Aborting
[jbang] [ERROR] https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/2.6.2.Final/quarkus-cli-2.6.2.Final-runner.jar is not from a trusted source and user did not confirm trust thus aborting.
If you trust the url to be safe to run are here a few suggestions:
Limited trust:
     jbang trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/
Trust all subdomains:
    jbang trust add *.repo1.maven.org
Trust all sources (WARNING! disables url protection):
    jbang trust add *

For more control edit ~/.jbang/trusted-sources.json

[jbang] Run with --verbose for more details
```
0reactions
maxandersencommented, Jan 24, 2022

okey, figured out why I missed the actual issue - I had a ~/.jbang/trusted-sources.json when running it thus I did not see those issue of getting the message but no wait as originally reported. Sorry for missing that!

So I’ve submitted https://github.com/quarkusio/quarkus/pull/23134 and https://github.com/quarkusio/quarkusio.github.io/pull/1307 to have the docs document the needed trust call.

I’ll still keep the change of jbang app install check the alias is trusted so users don’t get asked at first run.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while running Quarkus Production Jar - Stack Overflow
Looks like you're running it with a JRE instead of JDK. Try running java --version and add its output to the question. See...
Read more >
Issue with running @QuarkusTest - Google Groups
I am using JDK 11, Quarkus 2.3. While using @QuarkusTest I am facing RunTimeException as shown below: java.lang.RuntimeException: java.lang.
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