Hi,
If you want to bind jetty to same port for different cxf bc endpoints,
you need configure cxf busCfg for cxf bc component but not for each
cxf bc endpoints separately.
Edit
SMX_HOME/conf/components.properties
add
servicemix-cxf-bc.busCfg=where_the_busCfg_is
Freeman
On 2010-9-1, at 上午2:03, vinh wrote:
Hi,
I running into a weird issue here, I have two distinct cxf-bc
configured to
use https, e.g. https://0.0.0.0:10000/Service1,
https://0.0.0.0:10000/Service2. I've only managed to get at any one
time
one of them to start and bind to a port. It seems Jetty doesn't
like them
binding on the same port. If I change it so that each service binds
to a
different port then it'll will all work. This seems also to be a
https
problem as when I configured the BC w/o https and w/ the same ports
both
works.
Is there a limitation with Jetty concerning https or am I not
configuring my
BC correctly?
Thanks,
Vinh
Here's a part of the stack trace i got:
13:41:49,228 | INFO | xtenderThread-54 |
ServerImpl |
g.apache.cxf.endpoint.ServerImpl 93 | Setting the server's publish
address
to be https://0.0.0.0:10000/PersonService2/
13:41:49,228 | INFO | xtenderThread-54 |
EndpointExporter |
mix.common.osgi.EndpointExporter 167 | All endpoints have been
deployed and
components initialized. Registering service assembly.
13:41:49,230 | INFO | xtenderThread-54 |
ServiceAssemblyImpl |
er.artifacts.ServiceAssemblyImpl 271 | Changing SA state to Stopped
13:41:49,234 | INFO | xtenderThread-54 |
ManagementEndpointRegistry |
ement.ManagementEndpointRegistry 56 | Registering endpoint:
org.apache.servicemix.nmr.core.internalendpointwrap...@9d109a24 with
properties
{javax
.jbi
.servicedesc
.serviceendpoint=org.apache.servicemix.common.externalendpo...@115ae0,
NAME={http://www.mycompany.com/ws-sec-
proto}OtherPersonService:Person2,
WSDL_URL=document:6, service.id=282, UNTARGETABLE=true,
objectClass=[Ljava.lang.String;@16564ae, ENDPOINT_NAME=Person2,
SERVICE_NAME={http://www.mycompany.com/ws-sec-
proto}OtherPersonService,
jbi.external=true}
13:41:49,239 | INFO | xtenderThread-54 |
ServiceAssemblyImpl |
er.artifacts.ServiceAssemblyImpl 271 | Changing SA state to Started
13:41:49,278 | INFO | xtenderThread-54 |
CXFJettySslSocketConnector |
ache.cxf.common.logging.LogUtils 365 | The cipher suites have not
been
configured, falling back to cipher suite filters.
13:41:49,280 | WARN | xtenderThread-54 |
jetty |
service.jetty.internal.JCLLogger 122 | failed
[email protected]:10000: java.net.SocketException:
Unrecognized Windows Sockets error: 0: JVM_Bind
13:41:49,281 | WARN | xtenderThread-54 |
jetty |
service.jetty.internal.JCLLogger 122 | failed ser...@108c497:
java.net.SocketException: Unrecognized Windows Sockets error: 0:
JVM_Bind
13:41:49,286 | ERROR | xtenderThread-54 |
JettyHTTPServerEngine |
http_jetty.JettyHTTPServerEngine 362 | START_UP_SERVER_FAILED_MSG
13:41:49,392 | ERROR | xtenderThread-54 |
ServiceAssemblyInstaller |
er.impl.ServiceAssemblyInstaller 100 | <component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>servicemix-cxf-bc</component-name>
<component-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg><msg-loc-info><loc-token/><loc-message>Unable to
start
service unit</loc-message></msg-loc-info></task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token />
<loc-message>Could not start Jetty server: Unrecognized Windows
Sockets
error: 0: JVM_Bind</loc-message>
<stack-trace><![CDATA[org.apache.cxf.interceptor.Fault: Could
not start
Jetty server: Unrecognized Windows Sockets error: 0: JVM_Bind
at
org
.apache
.cxf
.transport
.http_jetty
.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:371)
at
org
.apache
.cxf
.transport
.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:
167)
at
org
.apache
.cxf
.transport
.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:125)
at
org.apache.servicemix.cxfbc.CxfBcConsumer.start(CxfBcConsumer.java:
381)
at
org
.apache
.servicemix.common.DefaultServiceUnit.start(DefaultServiceUnit.java:
78)
at
org
.apache
.servicemix
.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:155)
at
org
.apache
.servicemix
.jbi.deployer.artifacts.ServiceUnitImpl.start(ServiceUnitImpl.java:
131)
at
org
.apache
.servicemix
.jbi
.deployer
.artifacts.ServiceAssemblyImpl.changeState(ServiceAssemblyImpl.java:
300)
at
org
.apache
.servicemix
.jbi
.deployer
.artifacts.ServiceAssemblyImpl.transition(ServiceAssemblyImpl.java:
276)
at
org
.apache
.servicemix
.jbi
.deployer
.artifacts.ServiceAssemblyImpl.init(ServiceAssemblyImpl.java:138)
at
org
.apache
.servicemix
.jbi.deployer.impl.Deployer.registerServiceAssembly(Deployer.java:455)
at
org
.apache
.servicemix
.jbi
.deployer
.impl.ServiceAssemblyInstaller.install(ServiceAssemblyInstaller.java:
97)
at
org
.apache
.servicemix
.jbi
.deployer
.impl.Deployer.registerDeployedServiceAssembly(Deployer.java:719)
at
org.apache.servicemix.jbi.deployer.impl.Deployer
$2.addingService(Deployer.java:256)
at
org.osgi.util.tracker.ServiceTracker
$Tracked.customizerAdding(ServiceTracker.java:896)
at
org
.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:
261)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:
233)
at
org.osgi.util.tracker.ServiceTracker
$Tracked.serviceChanged(ServiceTracker.java:840)
at
org
.eclipse
.osgi
.internal
.serviceregistry
.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:
104)
at
org
.eclipse
.osgi
.framework
.internal
.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Unrecognized-Windows-Sockets-error-0-JVM-Bind-for-duplicate-ports-using-https-tp2798475p2798475.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org