Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher fails at startup (Linux) #349

Closed
ipa-big opened this issue May 17, 2024 · 8 comments
Closed

Launcher fails at startup (Linux) #349

ipa-big opened this issue May 17, 2024 · 8 comments
Labels
triage all new issues awaiting classification

Comments

@ipa-big
Copy link

ipa-big commented May 17, 2024

Bug Report

Describe the Bug

The launcher of the identity hub (launchers/build/lib/identity-hub.jar) fails at startup.

Expected Behavior

The launcher should start an instance of the identity hub Service

Observed Behavior

The launcher starts and shows the following error message:

WARNING 2024-05-17T13:22:29.7499566 The runtime is configured as an anonymous participant. DO NOT DO THIS IN PRODUCTION.
WARNING 2024-05-17T13:22:29.7926102 edc.runtime.id is not configured so a random UUID is used. It is recommended to provide a static one.
INFO 2024-05-17T13:22:29.9925952 Initialized Boot Services
INFO 2024-05-17T13:22:30.0060131 Initialized Core Default Services
INFO 2024-05-17T13:22:30.0842989 HTTPS enforcement it not enabled, please enable it in a production environment
INFO 2024-05-17T13:22:30.294865 HTTPS enforcement it not enabled, please enable it in a production environment
INFO 2024-05-17T13:22:30.297334 Initialized Core Services
WARNING 2024-05-17T13:22:30.5098056 Settings: No setting found for key 'edc.hostname'. Using default value 'localhost'
INFO 2024-05-17T13:22:30.5206728 Initialized JSON-LD Extension
WARNING 2024-05-17T13:22:30.6181582 Error caching context URL 'https://w3id.org/dspace/2024/1/context.json' for URI 'jar:file:/ih/launcher/build/libs/identity-hub.jar!/document/dspace.jsonld'. Subsequent attempts to expand this context URL may fail.
INFO 2024-05-17T13:22:30.6215857 Initialized org.eclipse.edc.token.TokenServicesExtension
INFO 2024-05-17T13:22:30.6245318 Initialized IdentityHub Default Services Extension
WARNING 2024-05-17T13:22:30.6263265 Using the InMemoryVault is not suitable for production scenarios and should be replaced with an actual Vault!
INFO 2024-05-17T13:22:30.6268517 Initialized KeyPair Service Extension
INFO 2024-05-17T13:22:30.6302952 Initialized org.eclipse.edc.connector.core.SecurityDefaultServicesExtension
INFO 2024-05-17T13:22:30.6434644 Initialized Identity Did Core
WARNING 2024-05-17T13:22:30.6443286 Using the default EdcScopeToCriterionTransformer. This is not intended for production use and should be replaced with a specialized implementation for your dataspace
INFO 2024-05-17T13:22:30.6582375 Initialized IdentityHub Core Services Extension
SEVERE 2024-05-17T13:22:30.6620049 Error booting runtime: java.lang.reflect.InvocationTargetException
org.eclipse.edc.boot.system.injection.EdcInjectionException: java.lang.reflect.InvocationTargetException
        at org.eclipse.edc.boot.system.injection.ProviderMethod.invoke(ProviderMethod.java:66)
        at org.eclipse.edc.boot.system.injection.lifecycle.RegistrationPhase.invokeAndRegister(RegistrationPhase.java:51)
        at org.eclipse.edc.boot.system.injection.lifecycle.RegistrationPhase.lambda$invokeProviderMethods$0(RegistrationPhase.java:45)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.eclipse.edc.boot.system.injection.lifecycle.RegistrationPhase.invokeProviderMethods(RegistrationPhase.java:45)
        at org.eclipse.edc.boot.system.injection.lifecycle.ExtensionLifecycleManager.provide(ExtensionLifecycleManager.java:70)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
        at org.eclipse.edc.boot.system.ExtensionLoader.bootServiceExtensions(ExtensionLoader.java:68)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.bootExtensions(BaseRuntime.java:135)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:179)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:84)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.main(BaseRuntime.java:76)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.eclipse.edc.boot.system.injection.ProviderMethod.invoke(ProviderMethod.java:61)
        ... 20 more
Caused by: org.eclipse.edc.spi.EdcException: No public key was configured! Please either configure 'edc.ih.iam.publickey.alias', 'edc.ih.iam.publickey.path' or 'edc.ih.iam.publickey.alias'.
        at org.eclipse.edc.identityhub.core.LocalPublicKeySupplier$Builder.build(LocalPublicKeySupplier.java:140)
        at org.eclipse.edc.identityhub.core.CoreServicesExtension.createPublicKey(CoreServicesExtension.java:197)
        at org.eclipse.edc.identityhub.core.CoreServicesExtension.createAccessTokenVerifier(CoreServicesExtension.java:140)
        ... 25 more
Exception in thread "main" org.eclipse.edc.spi.EdcException: org.eclipse.edc.boot.system.injection.EdcInjectionException: java.lang.reflect.InvocationTargetException
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.onError(BaseRuntime.java:125)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:197)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:84)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.main(BaseRuntime.java:76)
Caused by: org.eclipse.edc.boot.system.injection.EdcInjectionException: java.lang.reflect.InvocationTargetException
        at org.eclipse.edc.boot.system.injection.ProviderMethod.invoke(ProviderMethod.java:66)
        at org.eclipse.edc.boot.system.injection.lifecycle.RegistrationPhase.invokeAndRegister(RegistrationPhase.java:51)
        at org.eclipse.edc.boot.system.injection.lifecycle.RegistrationPhase.lambda$invokeProviderMethods$0(RegistrationPhase.java:45)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.eclipse.edc.boot.system.injection.lifecycle.RegistrationPhase.invokeProviderMethods(RegistrationPhase.java:45)
        at org.eclipse.edc.boot.system.injection.lifecycle.ExtensionLifecycleManager.provide(ExtensionLifecycleManager.java:70)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
        at org.eclipse.edc.boot.system.ExtensionLoader.bootServiceExtensions(ExtensionLoader.java:68)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.bootExtensions(BaseRuntime.java:135)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:179)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.eclipse.edc.boot.system.injection.ProviderMethod.invoke(ProviderMethod.java:61)
        ... 20 more
Caused by: org.eclipse.edc.spi.EdcException: No public key was configured! Please either configure 'edc.ih.iam.publickey.alias', 'edc.ih.iam.publickey.path' or 'edc.ih.iam.publickey.alias'.
        at org.eclipse.edc.identityhub.core.LocalPublicKeySupplier$Builder.build(LocalPublicKeySupplier.java:140)
        at org.eclipse.edc.identityhub.core.CoreServicesExtension.createPublicKey(CoreServicesExtension.java:197)
        at org.eclipse.edc.identityhub.core.CoreServicesExtension.createAccessTokenVerifier(CoreServicesExtension.java:140)
        ... 25 more

Steps to Reproduce

Steps to reproduce the behavior:

git clone https://github.com/eclipse-edc/IdentityHub
cd IdentityHub
./gradlew build
cd launcher
java -jar ./build/libs/identity-hub.jar

Context Information

  • EDC v0.6.4
  • Linux (amazoncorretto:17 container)

Possible Implementation

Working Run CMD

java -Dedc.ih.iam.id=consumer -Dedc.ih.iam.publickey.alias=test -Dedc.ih.iam.id=test-id -Dweb.http.resolution.port=10001 -Dweb.http.resolution.path=/api/v1/resolution -Dweb.http.default.port=10000 -jar ./build/libs/identity-hub.jar

Fix Readme.md / Dockerfile of launcher

  • Add appropriate "java -jar" command in README.md.
  • Fix Dockerfile by:
    • adding compose file with appropriate env vars
    • fixing command in entrypoint
@github-actions github-actions bot added the triage all new issues awaiting classification label May 17, 2024
Copy link

Thanks for your contribution 🔥 We will take a look asap 🚀

@paullatzelsperger
Copy link
Member

Can you please try again supplying the appropriate configuration values? The log clearly states that config is missing.

@ipa-big
Copy link
Author

ipa-big commented May 17, 2024

As mentioned in section "working cmd" of my inital post the shown cmd solves the problem.

It would help a lot if there would be a indication in the documentation that the params are needed and what the params are good for.

@paullatzelsperger
Copy link
Member

And eventually that will be the case but IH is not a production ready component yet. We do not advise anyone to use it in production systems nor expect it to be a well-rounded product.

@ipa-big
Copy link
Author

ipa-big commented May 17, 2024

I'm a beginner in the eclipse-edc ecosystem and I try to understand how everything works. We are using the edc components in a research project (=> no production system; => no well-rounded product is required).

With my issues I try to indicate where the barriers for a beginner are to get the components running and understanding them.

@paullatzelsperger
Copy link
Member

paullatzelsperger commented May 17, 2024

That is great, thank you. It's always good to collect these things. You can always generate documentation using autodoc:

./gradlew autodoc
./gradlew mergeManifests
./gradlew doc2md
# or: 
./gradlew doc2html

and then open build/identity-hub.md for the auto-generated documentation. It is very technical, but it will give an overview of required settings etc.

@ipa-big
Copy link
Author

ipa-big commented May 22, 2024

Thanks for the autodocs hint. I will add it to my debugging toolbox. But for sure I have to learn how to use the information from those docs.

@paullatzelsperger
Copy link
Member

closing as this is not a bug. a more focused feature request should be opened if desired.

@paullatzelsperger paullatzelsperger closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage all new issues awaiting classification
Projects
None yet
Development

No branches or pull requests

2 participants