[NETCONF-516] netconf.restconf-nb-bierman02 bundle does not start Created: 26/Feb/18 Updated: 02/Mar/18 Resolved: 02/Mar/18 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | Oxygen |
| Fix Version/s: | Oxygen |
| Type: | Bug | Priority: | High |
| Reporter: | Jamo Luhrsen | Assignee: | Michael Vorburger |
| Resolution: | Done | Votes: | 0 |
| Labels: | patch_merged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
In the process of double checking I don't know any of the ramifications. I was using a recent Oxygen distribution. opendaylight-user@root>feature:install odl-mdsal-trace opendaylight-user@root>feature:install --no-auto-refresh odl-infrautils-ready odl-netvirt-openstack Error executing command: Error restarting bundles: Could not resolve module: org.opendaylight.netconf.restconf-nb-bierman02 [381] Here is more from opendaylight-user@root>feature:install --no-auto-refresh odl-infrautils-ready odl-netvirt-openstack
Error executing command: Error restarting bundles:
Could not resolve module: org.opendaylight.netconf.restconf-nb-bierman02 [381]
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.7.0.SNAPSHOT"] because it is exposed to package 'javax.annotation' from resources javax.annotation-api [osgi.identity; osgi.identity="javax.annotation-api"; type="osgi.bundle"; version:Version="1.2.0"] and org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.11.3.v20170209-1843"; singleton:="true"] via two dependency chains.
Chain 1:
org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.7.0.SNAPSHOT"]
import: (osgi.wiring.package=javax.annotation)
|
export: osgi.wiring.package: javax.annotation
javax.annotation-api [osgi.identity; osgi.identity="javax.annotation-api"; type="osgi.bundle"; version:Version="1.2.0"]
Chain 2:
org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.7.0.SNAPSHOT"]
import: (&(osgi.wiring.package=com.google.common.base)(&(version>=23.3.0)(!(version>=24.0.0))))
|
export: osgi.wiring.package=com.google.common.base; uses:=javax.annotation
com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="23.3.0.jre"]
import: (osgi.wiring.package=javax.annotation)
|
export: osgi.wiring.package: javax.annotation
org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.11.3.v20170209-1843"; singleton:="true"]
opendaylight-user@root>Unsatisfied Requirements:
osgi.wiring.package; filter:="(osgi.wiring.package=org.opendaylight.netconf.sal.rest.api)"
osgi.wiring.package; filter:="(osgi.wiring.package=org.opendaylight.netconf.sal.restconf.api)"
Unsatisfied Requirements:
osgi.wiring.package; filter:="(osgi.wiring.package=org.opendaylight.netconf.sal.rest.api)"
osgi.wiring.package; filter:="(osgi.wiring.package=org.opendaylight.netconf.sal.restconf.api)"
Unsatisfied Requirements:
these above lines with osgi.wiring.package keep repeating for a while. |
| Comments |
| Comment by Anton Ivanov [ 27/Feb/18 ] |
|
It occasionally fails dependencies on load. One of the recent gerrits in jsorpc has an example: Have a look at the jenkins failures on https://git.opendaylight.org/gerrit/#/c/68672/ if it is the same issue. |
| Comment by Anton Ivanov [ 27/Feb/18 ] |
|
Looking at the trace Michael posted it is the same issue. Tom Pantelis has observed it as well. |
| Comment by Michael Vorburger [ 27/Feb/18 ] |
aivanov yup, this is the same issue.. it was also reported by an end-user on https://stackoverflow.com/questions/48976008/opendaylight-listen-for-flow-updates yesterday. jluhrsen just FYI AFAIK this one probably actually has nothing at all to do with any of odl-mdsal-trace or odl-infrautils-ready odl-netvirt-openstack nor feature:install --no-auto-refresh (i.e. you can ignore it in the context of NETVIRT-878). This was previously discussed on the https://lists.opendaylight.org/pipermail/netconf-dev/2018-February/001643.html thread. tpantelis will you finish up https://git.opendaylight.org/gerrit/#/c/68255/ ? Or shall we restore and see if https://git.opendaylight.org/gerrit/#/c/68199/ helps after all? BTW rovarga & skitt you may want to chime in here, adding you as watchers. Edited to remove "Or do we need an urgent odlparent release and bumps including https://git.opendaylight.org/gerrit/#/c/67184/?" because while that could help for similar issues elsehwere in the future, I won't fix this particular issue (because netconf/restconf/restconf-nb-bierman02 does not use enunciate). |
| Comment by Anton Ivanov [ 27/Feb/18 ] |
|
IMHO this is a release blocker so if there is no alive developer or PTL on this project we will have to ask TSC to intervene. While the fact that it cannot do leaf-lists and other key data elements in RFC8040 mode has the archaeological workaround of using draft02 this has no known workarounds. |
| Comment by Michael Vorburger [ 27/Feb/18 ] |
|
As per https://lists.opendaylight.org/pipermail/netconf-dev/2018-February/001675.html, I would propose that we merge https://git.opendaylight.org/gerrit/#/c/68199/ and at least see if that helps. |
| Comment by Tom Pantelis [ 27/Feb/18 ] |
|
https://git.opendaylight.org/gerrit/#/c/68199/ doesn't help as per my comments as the jersey dependency still needs javax.annotation. https://git.opendaylight.org/gerrit/#/c/68255/ does fix it, at least locally for me for the tsdr features. However the dist-check still failed with the same error which makes no sense. I'll try rebasing it. |
| Comment by Michael Vorburger [ 27/Feb/18 ] |
|
tpantelis oups you are absolutely right, my initial attemps with *,!javax.annotation,... did not work! |
| Comment by Michael Vorburger [ 27/Feb/18 ] |
|
> I'm just trying to see if flipping this causes any other side effects - diff MANIFEST.MF is a PITA! Using https://robinst.github.io/jar-manifest-formatter/, I can confirm that https://git.opendaylight.org/gerrit/#/c/68199/4/restconf/restconf-nb-bierman02/pom.xml removes the Import-Package for javax.annotation, as well as removes it from the uses of the Export-Package, but does not change anything else of that MANIFEST.MF - see attached 4 MANIFEST* files and their diff.txt. |
| Comment by Tom Pantelis [ 27/Feb/18 ] |
|
!javax.annotation does need to be before * - I ran into similar with my patch. I tested again with odl-tsdr-hbase - it does get by the javax.annotation conflict b/c we're omitting it and don't need it at runtime. However it then runs into a similar problem with javax.ws.rs-api which we do need at runtime and the version that jersey uses. Robert found the same issue when he removed the use of javax.annotation in the code. With my patch that adds "javax.ws.rs;version="[1.1.0,2.0.0)"", odl-tsdr-hbase succeeds, at least locally. I just rebased my patch - let's see if it succeeds on jenkins. |
| Comment by Tom Pantelis [ 27/Feb/18 ] |
|
BTW - the javax.ws.rs error is: org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.8.0.SNAPSHOT"] because it is exposed to package 'javax.ws.rs' from resources javax.ws.rs-api [osgi.identity; osgi.identity="javax.ws.rs-api"; type="osgi.bundle"; version:Version="2.0.1"] and com.sun.jersey.core [osgi.identity; osgi.identity="com.sun.jersey.core"; type="osgi.bundle"; version:Version="1.17.0"] via two dependency chains.
Chain 1:
org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.8.0.SNAPSHOT"]
import: (osgi.wiring.package=javax.ws.rs)
|
export: osgi.wiring.package: javax.ws.rs
javax.ws.rs-api [osgi.identity; osgi.identity="javax.ws.rs-api"; type="osgi.bundle"; version:Version="2.0.1"]
Chain 2:
org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.8.0.SNAPSHOT"]
import: (osgi.wiring.package=com.sun.jersey.spi.container.servlet)
|
export: osgi.wiring.package=com.sun.jersey.spi.container.servlet; uses:=com.sun.jersey.api.container
com.sun.jersey.servlet [osgi.identity; osgi.identity="com.sun.jersey.servlet"; type="osgi.bundle"; version:Version="1.17.0"]
import: (&(osgi.wiring.package=com.sun.jersey.api.container)(&(version>=1.17.0)(!(version>=2.0.0))))
|
export: osgi.wiring.package=com.sun.jersey.api.container; uses:=javax.ws.rs.core
com.sun.jersey.jersey-server [osgi.identity; osgi.identity="com.sun.jersey.jersey-server"; type="osgi.bundle"; version:Version="1.17.0"]
import: (&(osgi.wiring.package=javax.ws.rs.core)(&(version>=1.1.0)(!(version>=2.0.0))))
|
export: osgi.wiring.package: javax.ws.rs.core; uses:=javax.ws.rs
export: osgi.wiring.package=javax.ws.rs
|
| Comment by Tom Pantelis [ 27/Feb/18 ] |
|
Getting a bit farther but now javax.ws.rs 2.0.1 is creeping in from restconf-common: Chain 2: 18:06:04 org.opendaylight.netconf.restconf-nb-bierman02 [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-nb-bierman02"; type="osgi.bundle"; version:Version="1.8.0.SNAPSHOT"] 18:06:04 import: (&(osgi.wiring.package=org.opendaylight.restconf.common.errors)(&(version>=1.8.0)(!(version>=2.0.0)))) 18:06:04 | 18:06:04 export: osgi.wiring.package=org.opendaylight.restconf.common.errors; uses:=javax.ws.rs 18:06:04 org.opendaylight.netconf.restconf-common [osgi.identity; osgi.identity="org.opendaylight.netconf.restconf-common"; type="osgi.bundle"; version:Version="1.8.0.SNAPSHOT"] 18:06:04 import: (osgi.wiring.package=javax.ws.rs) 18:06:04 | 18:06:04 export: osgi.wiring.package: javax.ws.rs 18:06:04 javax.ws.rs-api [osgi.identity; osgi.identity="javax.ws.rs-api"; type="osgi.bundle"; version:Version="2.0.1"] Adding the same version constraint to that pom.... |
| Comment by Tom Pantelis [ 27/Feb/18 ] |
|
dist-check passed! I think we're good to go. |
| Comment by Jamo Luhrsen [ 27/Feb/18 ] |
tpantelis, which patch? I'll pull the distro created from that and test locally. |
| Comment by Michael Vorburger [ 27/Feb/18 ] |
|
jluhrsen https://git.opendaylight.org/gerrit/#/c/68255/ is the (combined..) solution! |
| Comment by Jamo Luhrsen [ 28/Feb/18 ] |
I pulled the distro from that patch and used the feature install steps above and didn't see the same 2018-02-28T00:57:24,865 | ERROR | features-1-thread-1 | OsgiRegistry | 62 - com.sun.jersey.core - 1.17.0 | Unable to create RuntimeDelegate instance.
java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl cannot be found by com.sun.jersey.core_1.17.0
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461) ~[?:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) ~[?:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) ~[?:?]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]
at com.sun.jersey.core.osgi.OsgiRegistry.hookUp(OsgiRegistry.java:387) ~[?:?]
at com.sun.jersey.core.osgi.OsgiRegistry.getInstance(OsgiRegistry.java:119) ~[?:?]
at com.sun.jersey.core.osgi.Activator.start(Activator.java:55) ~[?:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774) ~[?:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767) ~[?:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309) ~[?:?]
at org.eclipse.osgi.container.Module.doStart(Module.java:581) ~[?:?]
at org.eclipse.osgi.container.Module.start(Module.java:449) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1361) ~[?:?]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:888) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
AND 2018-02-28T01:00:04,271 | ERROR | features-1-thread-1 | osgi | 319 - org.jolokia.osgi - 1.3.7 | Namespace Exception: org.osgi.service.http.NamespaceException: alias: '/jolokia' is already in use in this or another context org.osgi.service.http.NamespaceException: alias: '/jolokia' is already in use in this or another context at org.ops4j.pax.web.service.spi.model.ServerModel.addServletModel(ServerModel.java:124) ~[?:?] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:241) ~[?:?] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:221) ~[?:?] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:205) ~[?:?] at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:65) ~[?:?] at org.jolokia.osgi.JolokiaActivator$HttpServiceCustomizer.addingService(JolokiaActivator.java:315) ~[?:?] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?] at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?] at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183) ~[?:?] at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318) ~[?:?] at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261) ~[?:?] at org.jolokia.osgi.JolokiaActivator.start(JolokiaActivator.java:102) ~[?:?] at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774) ~[?:?] at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) ~[?:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767) ~[?:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724) ~[?:?] at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932) ~[?:?] at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309) ~[?:?] at org.eclipse.osgi.container.Module.doStart(Module.java:581) ~[?:?] at org.eclipse.osgi.container.Module.start(Module.java:449) ~[?:?] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402) ~[?:?] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1361) ~[?:?] at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:888) ~[?:?] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248) ~[?:?] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] But as far as the ugliness with netconf.restconf-nb-bierman02, that seems fixed. |
| Comment by Jamo Luhrsen [ 28/Feb/18 ] |
|
btw, this jira was filed against Oxygen, but the patch is in master. are we cherry picking down? |
| Comment by Tom Pantelis [ 28/Feb/18 ] |
|
yes - once it's merged in master. I see the jolokia error too - not sure why it occurs or if it's significant but it's not related to this bug. I haven't seen the other error. I assume restconf works fine? |
| Comment by Jamo Luhrsen [ 28/Feb/18 ] |
|
quick check on restconf seems ok. $ curl -I -u "admin:admin" http://127.0.0.1:8181/restconf/streams HTTP/1.1 200 OK Set-Cookie: JSESSIONID=2u8j2rukhafvw4r25exb0z27;Path=/restconf Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/restconf; Max-Age=0; Expires=Tue, 27-Feb-2018 02:33:55 GMT Content-Type: application/yang.api+json Content-Length: 0 |
| Comment by Michael Vorburger [ 28/Feb/18 ] |
|
> btw, this jira was filed against Oxygen, but the patch is in master. are we cherry picking down? https://lists.opendaylight.org/pipermail/netconf-dev/2018-February/001676.html > I see the jolokia error too - not sure why it occurs or if it's significant but it's not related to this bug. jluhrsen can you open a new JIRA for that? Against controller, for now. And a another 3rd separate new JIRA for the java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl cannot be found by com.sun.jersey.core_1.17.0 ... not even sure where, but let's start against netconf, for now. |
| Comment by Jamo Luhrsen [ 01/Mar/18 ] |
what I was asking is if we are going to put the fix in to Oxygen, not why NETCONF
https://jira.opendaylight.org/browse/CONTROLLER-1815
|
| Comment by Michael Vorburger [ 01/Mar/18 ] |
|
https://git.opendaylight.org/gerrit/#/c/68894/ still needs some TLC... |
| Comment by Michael Vorburger [ 02/Mar/18 ] |
|
JakubToth can you +2 https://git.opendaylight.org/gerrit/#/c/68894/ ? klou can you get https://git.opendaylight.org/gerrit/#/c/68894/ merged into Oxygen? https://lists.opendaylight.org/pipermail/netconf-dev/2018-March/001683.html |
| Comment by Kit Lou [ 02/Mar/18 ] |
|
vorburger: Patch has been merged by Thanh. Thank you! |