In the second case, could the runbundles contain duplicate felix jetty
bundles (like of different versions)?

- Ray

On Sat, Mar 23, 2019 at 9:58 AM jhrayburn--- via osgi-dev <
osgi-dev@mail.osgi.org> wrote:

> I have multiple sets of bundles for different capabilities.
>
>
>
> AuthApp
>
> AuthProvider
>
> AuthProviderApi
>
> AuthPersistence
>
> AuthPersistenceApi
>
> AuthRestService
>
>
>
> ResApp
>
> RestProvider
>
> RestProviderApi
>
> RestPersistence
>
> RestPersistenceApi
>
> ResRestService
>
>
>
> The Auth bundles are independent of the Res bundles. When I Run the
> AuthApp,
>
>
>
> *-runfw*: org.apache.felix.framework;version='[6.0.0,6.0.0]'
>
> *-runee*: JavaSE-1.8
>
> *-runprovidedcapabilities*: ${native_capability}
>
>
>
> -resolve.effective: active
>
>
>
> *-runvm*: -ea, -Xms10m, -Dlogback.configurationFile=resources/logback.xml
>
>
>
> *-runproperties*: org.osgi.service.http.port=8080
>
>
>
> *-runrequires*: \
>
>        bnd.identity;id='AuthApp'
>
> ...
>
>
>
> The runs without any issue and connection can be made to the rest endpoints
>
>
>
> When I run the ResApp, with the following source
>
>
>
> *-runfw*: org.apache.felix.framework;version='[6.0.0,6.0.0]'
>
> *-runee*: JavaSE-1.8
>
> *-runprovidedcapabilities*: ${native_capability}
>
>
>
> -resolve.effective: active
>
>
>
> *-runvm*: -ea, -Xms10m, -Dlogback.configurationFile=resources/logback.xml
>
>
>
> *-runproperties*: org.osgi.service.http.port=8080
>
>
>
> *-runrequires*: \
>
>        bnd.identity;id='ResApp',\
>
>        bnd.identity;id='AuthApp'
>
> ...
>
>
>
> The OSGi is bound to 0.0.0.0:8080 and listening. In addition I am seeing
> the following lines and exception.
>
>
>
> 03/23/2019 09:41:58.645|INFO |main|Started ServerConnector@77a074b4
> {HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
>
> [INFO] Started Jetty 9.4.9.v20180320 at port(s) HTTP:8080 on context path
> / [minThreads=8,maxThreads=200,acceptors=1,selectors=6]
>
> 03/23/2019 09:41:58.799|INFO |main|created whiteboard from configuration:
> {service.pid=org.apache.aries.jax.rs.whiteboard.default}
>
> Mar 23, 2019 9:41:58 AM org.apache.cxf.endpoint.ServerImpl initDestination
>
> INFO: Setting the server's publish address to be /
>
> [DEBUG] [ServiceReference 34 from bundle 35 :
> org.apache.aries.jax.rs.whiteboard:1.0.1
> ref=[org.osgi.service.http.context.ServletContextHelper]
> properties={objectClass=[org.osgi.service.http.context.ServletContextHelper],
> original.service.bundleid=35, original.service.id=33,
> osgi.http.whiteboard.context.name=default,
> osgi.http.whiteboard.context.path=,
> osgi.http.whiteboard.target=(osgi.http.endpoint=*),
> osgi.jaxrs.application.base=/, osgi.jaxrs.name=.default,
> osgi.jaxrs.whiteboard.target=(service.pid=org.apache.aries.jax.rs.whiteboard.default),
> service.bundleid=35, service.id=34,
> service.pid=org.apache.aries.jax.rs.whiteboard.default,
> service.ranking=-2147483648, service.scope=singleton}] Ignoring invalid
> ServletContextHelper service
>
> [DEBUG] Adding bundle org.apache.felix.http.jetty:4.0.0 (48) : active
>
> [DEBUG] Adding bundle org.apache.felix.http.jetty:4.0.6 (49) : starting
>
> 03/23/2019 09:41:59.029|INFO |main|jetty-9.4.14.v20181114; built:
> 2018-11-14T21:20:31.478Z; git: c4550056e785fb5665914545889f21dc136ad9e6;
> jvm 1.8.0_192-b12
>
> 03/23/2019 09:41:59.031|INFO |main|DefaultSessionIdManager workerName=node0
>
> 03/23/2019 09:41:59.032|INFO |main|No SessionScavenger set, using defaults
>
> 03/23/2019 09:41:59.032|INFO |main|node0 Scavenging every 660000ms
>
> 03/23/2019 09:41:59.036|INFO |main|Started
> o.e.j.s.ServletContextHandler@2a39aa2b{/,null,AVAILABLE}
>
> 03/23/2019 09:41:59.036|INFO |main|Started @2828ms
>
> 03/23/2019 09:41:59.036|INFO |main|node0 Scavenging every 660000ms
>
> [ERROR] Failed to start Connector: ServerConnector@3b7eac14
> {HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
>
> *java.io.IOException*: Failed to bind to 0.0.0.0/0.0.0.0:8080
>
>        at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(
> *ServerConnector.java:346*)
>
>        at org.eclipse.jetty.server.ServerConnector.open(
> *ServerConnector.java:308*)
>
>        at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(
> *AbstractNetworkConnector.java:80*)
>
>        at org.eclipse.jetty.server.ServerConnector.doStart(
> *ServerConnector.java:236*)
>
>        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
> *AbstractLifeCycle.java:68*)
>
>        at org.apache.felix.http.jetty.internal.JettyService.startConnector(
> *JettyService.java:695*)
>
>        at org.apache.felix.http.jetty.internal.JettyService.initializeHttp(
> *JettyService.java:546*)
>
>        at
> org.apache.felix.http.jetty.internal.JettyService.initializeJetty(
> *JettyService.java:444*)
>
>        at org.apache.felix.http.jetty.internal.JettyService.startJetty(
> *JettyService.java:305*)
>
>        at org.apache.felix.http.jetty.internal.JettyService.start(
> *JettyService.java:148*)
>
>        at org.apache.felix.http.jetty.internal.JettyActivator.doStart(
> *JettyActivator.java:66*)
>
>        at org.apache.felix.http.base.internal.AbstractActivator.start(
> *AbstractActivator.java:39*)
>
>        at org.apache.felix.framework.util.SecureAction.startActivator(
> *SecureAction.java:697*)
>
>        at org.apache.felix.framework.Felix.activateBundle(
> *Felix.java:2398*)
>
>        at org.apache.felix.framework.Felix.startBundle(*Felix.java:2304*)
>
>        at org.apache.felix.framework.BundleImpl.start(
> *BundleImpl.java:998*)
>
>        at aQute.launcher.Launcher.startBundles(*Launcher.java:519*)
>
>        at aQute.launcher.Launcher.activate(*Launcher.java:425*)
>
>        at aQute.launcher.Launcher.run(*Launcher.java:303*)
>
>        at aQute.launcher.Launcher.main(*Launcher.java:149*)
>
> Caused by: *java.net.BindException*: Address already in use: bind
>
>        at sun.nio.ch.Net.bind0(*Native Method*)
>
>        at sun.nio.ch.Net.bind(Unknown Source)
>
>        at sun.nio.ch.Net.bind(Unknown Source)
>
>        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
>
>        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
>
>        at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(
> *ServerConnector.java:342*)
>
>        ... 19 more
>
>
>
>
>
> I can still access the rest endpoints defined in AuthRestService. Some of
> my ResRestService endpoints are returning with a 404 so I don’t know if
> they all are not accessible. What should I look for to identify why port
> 8080 is attempting to be bound to again?
>
>
>
> Also on a second question, what is the best tool for felix to identify all
> available rest endpoints?
>
>
>
> Thank you,
>
> Jim
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to