Re: [osgi-dev] Multiple bind attempts to 8080

2019-03-25 Thread Tim Ward via osgi-dev
There are definitely two different versions of Jetty trying to start up in your 
runtime:

This one:

> 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]
> 

And this one:
> [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
> 




> On 23 Mar 2019, at 14:34, Raymond Auge via osgi-dev  
> wrote:
> 
> 
> 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 
> mailto: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 66ms
> 
> 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 66ms
> 
> [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 
> 

Re: [osgi-dev] Multiple bind attempts to 8080

2019-03-23 Thread Raymond Auge via osgi-dev
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 66ms
>
> 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 66ms
>
> [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 

[osgi-dev] Multiple bind attempts to 8080

2019-03-23 Thread jhrayburn--- via osgi-dev
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 66ms

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 66ms

[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.j
ava:346)

   at
org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:308)

   at
org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkCon
nector.java:80)

   at
org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)

   at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.j
ava:68)

   at
org.apache.felix.http.jetty.internal.JettyService.startConnector(JettyServic
e.java:695)

   at
org.apache.felix.http.jetty.internal.JettyService.initializeHttp(JettyServic
e.java:546)

   at
org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyServi
ce.java:444)

   at
org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.ja
va:305)

   at
org.apache.felix.http.jetty.internal.JettyService.start(JettyService.java:14
8)

   at
org.apache.felix.http.jetty.internal.JettyActivator.doStart(JettyActivator.j
ava:66)

   at
org.apache.felix.http.base.internal.AbstractActivator.start(AbstractActivato
r.java:39)

   at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
a: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)