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

Api contexts without explicit config value throw exception on startup #4669

Open
ndr-brt opened this issue Dec 11, 2024 · 0 comments · May be fixed by #4671
Open

Api contexts without explicit config value throw exception on startup #4669

ndr-brt opened this issue Dec 11, 2024 · 0 comments · May be fixed by #4671
Assignees
Labels
enhancement New feature or request

Comments

@ndr-brt
Copy link
Member

ndr-brt commented Dec 11, 2024

Feature Request

It would be good to have the connector starting up using api contexts default values (for port and path) in case they are not explicitly defined by configuration.

Currently, a runtime with the management-api module, when is missing the web.http.management.port/path settings is throwing:

Failed to start EDC runtime
org.eclipse.edc.spi.EdcException: Failed to start EDC runtime
	at app//org.eclipse.edc.junit.extensions.EmbeddedRuntime.boot(EmbeddedRuntime.java:97)
	at app//eu.mobility_dataspace.connector.tests.ConnectorTest.shouldStartup(ConnectorTest.java:54)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1597)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: org.eclipse.edc.spi.EdcException: org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
	at app//org.eclipse.edc.boot.system.runtime.BaseRuntime.onError(BaseRuntime.java:143)
	at app//org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:106)
	at app//org.eclipse.edc.junit.extensions.EmbeddedRuntime.lambda$boot$0(EmbeddedRuntime.java:87)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at [email protected]/java.lang.Thread.run(Thread.java:1575)
Caused by: org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
	at app//org.eclipse.edc.web.jersey.JerseyRestService.start(JerseyRestService.java:88)
	at app//org.eclipse.edc.web.jersey.JerseyExtension.start(JerseyExtension.java:77)
	at app//org.eclipse.edc.boot.system.injection.lifecycle.StartPhase.start(StartPhase.java:34)
	at app//org.eclipse.edc.boot.system.injection.lifecycle.ExtensionLifecycleManager.start(ExtensionLifecycleManager.java:78)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1597)
	at app//org.eclipse.edc.boot.system.ExtensionLoader.bootServiceExtensions(ExtensionLoader.java:76)
	at app//org.eclipse.edc.boot.system.runtime.BaseRuntime.bootExtensions(BaseRuntime.java:153)
	at app//org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:92)
	... 4 more
Caused by: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
	at org.eclipse.edc.web.jetty.JettyService.lambda$registerServlet$4(JettyService.java:136)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at org.eclipse.edc.web.jetty.JettyService.registerServlet(JettyService.java:136)
	at org.eclipse.edc.web.jersey.JerseyRestService.registerContext(JerseyRestService.java:117)
	at java.base/java.util.HashMap.forEach(HashMap.java:1430)
	at org.eclipse.edc.web.jersey.JerseyRestService.start(JerseyRestService.java:86)
	... 11 more

Why Is the Feature Desired?

Are there any requirements?

Solution Proposal

If possible, provide a (brief!) solution proposal.

@ndr-brt ndr-brt added feature_request New feature request, awaiting triage triage all new issues awaiting classification enhancement New feature or request and removed triage all new issues awaiting classification feature_request New feature request, awaiting triage labels Dec 11, 2024
@ndr-brt ndr-brt linked a pull request Dec 12, 2024 that will close this issue
@ndr-brt ndr-brt self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant