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

No portMapping for context management after 0.11.0 update #4760

Closed
fvolz opened this issue Jan 27, 2025 · 4 comments
Closed

No portMapping for context management after 0.11.0 update #4760

fvolz opened this issue Jan 27, 2025 · 4 comments
Labels
triage all new issues awaiting classification

Comments

@fvolz
Copy link

fvolz commented Jan 27, 2025

Bug Report

Describe the Bug

After updating from 0.10.1 to 0.11.0, my configuration parameters for the Management API are not recognized:

web.http.management.port=8182
web.http.management.path=/management


Exception in thread "main" org.eclipse.edc.spi.EdcException: org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.onError(BaseRuntime.java:152)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:116)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.main(BaseRuntime.java:79)
Caused by: org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found

I am aware there were some breaking changes for the Management API, but the documentation here lists the same configuration parameters https://github.com/eclipse-edc/Connector/tree/main/extensions/common/api/management-api-configuration
Version 0.10.1 works fine with the same config file.

Expected Behavior

Normal startup as before or updated config parameters in all code instances (see dpf-selector launcher)

Observed Behavior

SEVERE 2025-01-27T17:04:12.5001656 Error booting runtime: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
        at org.eclipse.edc.web.jersey.JerseyRestService.start(JerseyRestService.java:88)
        at org.eclipse.edc.web.jersey.JerseyExtension.start(JerseyExtension.java:77)
        at org.eclipse.edc.boot.system.injection.lifecycle.ExtensionLifecycleManager.bootServiceExtensions(ExtensionLifecycleManager.java:73)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.bootExtensions(BaseRuntime.java:162)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:101)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.main(BaseRuntime.java:79)
Caused by: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
        at org.eclipse.edc.web.jetty.JettyService.lambda$registerServlet$3(JettyService.java:119)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at org.eclipse.edc.web.jetty.JettyService.registerServlet(JettyService.java:119)
        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)
        ... 5 more
Exception in thread "main" org.eclipse.edc.spi.EdcException: org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.onError(BaseRuntime.java:152)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:116)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.main(BaseRuntime.java:79)
Caused by: org.eclipse.edc.spi.EdcException: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
        at org.eclipse.edc.web.jersey.JerseyRestService.start(JerseyRestService.java:88)
        at org.eclipse.edc.web.jersey.JerseyExtension.start(JerseyExtension.java:77)
        at org.eclipse.edc.boot.system.injection.lifecycle.ExtensionLifecycleManager.bootServiceExtensions(ExtensionLifecycleManager.java:73)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.bootExtensions(BaseRuntime.java:162)
        at org.eclipse.edc.boot.system.runtime.BaseRuntime.boot(BaseRuntime.java:101)
        ... 1 more
Caused by: java.lang.IllegalArgumentException: No PortMapping for contextName 'management' found
        at org.eclipse.edc.web.jetty.JettyService.lambda$registerServlet$3(JettyService.java:119)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at org.eclipse.edc.web.jetty.JettyService.registerServlet(JettyService.java:119)
        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)
        ... 5 more

Steps to Reproduce

Steps to reproduce the behavior:

Test version 0.11.0 with my config:

# Port and path for custom http services such as SelfDescription
web.http.port=8281
web.http.path=/api
# This is for EDC to send status messages regarding data transfer
web.http.control.port=8181
web.http.control.path=/control
# Port and path for requesting an EDC to communicate with another EDC by DSP messages (consumer-provider)
web.http.management.port=8182
web.http.management.path=/management
# Port and path for IDS messages (from another EDC)
web.http.protocol.port=8282
web.http.protocol.path=/dsp
edc.dsp.callback.address=http://localhost:8282/dsp
edc.transfer.functions.enabled.protocols=http
# Connector hostname, which e.g. is used in referer urls
edc.hostname=localhost

I am using this in an extension so the issue might be not directly linked with EDC.

Context Information

Add any other context about the problem here.

  • Used version [e.g. EDC v0.11.0]
  • OS: [ Windows]

Detailed Description

If applicable, add screenshots and logs to help explain your problem.

Possible Implementation

0.10.1 was the last working version for me.

@github-actions github-actions bot added the triage all new issues awaiting classification label Jan 27, 2025
Copy link

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

@ndr-brt
Copy link
Member

ndr-brt commented Jan 28, 2025

have you added the management-api-configuration module to your runtime? because it is mandatory now.

@fvolz
Copy link
Author

fvolz commented Jan 28, 2025

Adding the module fixed it, thank you very much. Saved me a lot of time debugging!

@fvolz fvolz closed this as completed Jan 28, 2025
@ndr-brt
Copy link
Member

ndr-brt commented Jan 28, 2025

@fvolz a good suggestion is to use the BOM modules (https://github.com/eclipse-edc/Connector/tree/main/dist/bom) instead of putting all the dependencies together by yourselves, this will save you from update issues

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