You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by vinh <vi...@faa.gov> on 2010/08/31 20:03:41 UTC

Unrecognized Windows Sockets error: 0: JVM_Bind for duplicate ports using https

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.InternalEndpointWrapper@9d109a24 with
properties
{javax.jbi.servicedesc.ServiceEndpoint=org.apache.servicemix.common.ExternalEndpoint@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
CXFJettySslSocketConnector@0.0.0.0: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 Server@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.

Re: Unrecognized Windows Sockets error: 0: JVM_Bind for duplicate ports using https

Posted by Stan Lewis <ga...@gmail.com>.
Hi Vinh,

Components in 4.3 are configured on a per-component basis, have a look at the migration guide here:

http://fusesource.com/docs/esb/4.3/esb_migration/ESBMigrationConfig-JBI.html

Not sure what you're looking for in terms of example CXF configuration files, but there's some on this page:

http://cxf.apache.org/docs/configuration.html

Have a look under "Enabling message logging using plain Spring bean elements" and some of the subsequent sections, the last one using the cxf:features is the best way to go.

On Sep 1, 2010, at 2:35 PM, vinh wrote:

> 
> Hi,
> I using Fuse ESB 4.2 and can't seem to find components.properties file
> anywhere.  Do I need to create one? Also is there an example of the a busCfg
> for the cxf bc component, since all I've found during my searches were
> configs for https and a http:destination?  
> 
> Thanks,
> Vinh
> -- 
> View this message in context: http://servicemix.396122.n5.nabble.com/Unrecognized-Windows-Sockets-error-0-JVM-Bind-for-duplicate-ports-using-https-tp2798475p2799730.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Unrecognized Windows Sockets error: 0: JVM_Bind for duplicate ports using https

Posted by vinh <vi...@faa.gov>.
Hi,
I using Fuse ESB 4.2 and can't seem to find components.properties file
anywhere.  Do I need to create one? Also is there an example of the a busCfg
for the cxf bc component, since all I've found during my searches were
configs for https and a http:destination?  

Thanks,
Vinh
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/Unrecognized-Windows-Sockets-error-0-JVM-Bind-for-duplicate-ports-using-https-tp2798475p2799730.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Unrecognized Windows Sockets error: 0: JVM_Bind for duplicate ports using https

Posted by vinh <vi...@faa.gov>.
I'm running FUSE ESB 4.2, so all of my configs are in etc, but still I don't
have a components.properties file anywhere.  Do I create one? And is there
an example of a busCfg for the cxf bc component? I've tried searching but
all I've found was a busCfg for https and http:destination config.  


Thanks,
Vinh
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/Unrecognized-Windows-Sockets-error-0-JVM-Bind-for-duplicate-ports-using-https-tp2798475p2799726.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Unrecognized Windows Sockets error: 0: JVM_Bind for duplicate ports using https

Posted by Freeman Fang <fr...@gmail.com>.
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.InternalEndpointWrapper@9d109a24 with
> properties
> {javax 
> .jbi 
> .servicedesc 
> .ServiceEndpoint=org.apache.servicemix.common.ExternalEndpoint@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
> CXFJettySslSocketConnector@0.0.0.0: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 Server@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