Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-10-2006
lifejoy lifejoy is offline
Registered User
 
Name: lifejoy
Organization: klmt
Project: 1919&secondplat
 
Join Date: Nov 2005
Posts: 6
Question ICECS error in in Windows XP Sp2

I use ICE 3.10 to delvolop a test service with C#,
Under windows 2003 standard all is ok,But in Windows XP SP2 run error!
Some Message in Follow:
--------------------------------------------------------------------------
Ice.SocketException: Cannot bind
error = 0
在 IceInternal.Network.doBind(Socket socket, EndPoint addr) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\Network.cs:行号 312
在 IceInternal.TcpAcceptor..ctor(Instance instance, String host, Int32 port) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\TcpAcceptor.cs:行号 129
在 IceInternal.TcpEndpointI.acceptor(EndpointI& endpoint, String adapterName) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\TcpEndpointI.cs:行号 363
在 IceInternal.IncomingConnectionFactory..ctor(Instan ce instance, EndpointI endpoint, ObjectAdapter adapter, String adapterName) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ConnectionFactory.cs:行号 971
在 Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, ObjectAdapterFactory objectAdapterFactory, String name, String endpointInfo, RouterPrx router) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ObjectAdapterI.cs:行号 848
在 IceInternal.ObjectAdapterFactory.createObjectAdapt er(String name, String endpoints, RouterPrx router) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ObjectAdapterFactory.cs:行号 122
在 Ice.CommunicatorI.createObjectAdapterWithEndpoints (String name, String endpoints) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\CommunicatorI.cs:行号 57
在 UcsServer.Program.Main(String[] args) 位置 F:\Work\自有业务查询\LianTongCodec\UcsServer\Program.cs: 行号 16
Caused by: System.Net.Sockets.SocketException: 使用了与请求的协议不兼容的地址。
在 System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.Sockets.Socket.Bind(EndPoint localEP)
在 IceInternal.Network.doBind(Socket socket, EndPoint addr) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\Network.cs:行号 306
Ice.SocketException: Cannot bind
error = 0
在 IceInternal.Network.doBind(Socket socket, EndPoint addr) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\Network.cs:行号 312
在 IceInternal.TcpAcceptor..ctor(Instance instance, String host, Int32 port) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\TcpAcceptor.cs:行号 129
在 IceInternal.TcpEndpointI.acceptor(EndpointI& endpoint, String adapterName) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\TcpEndpointI.cs:行号 363
在 IceInternal.IncomingConnectionFactory..ctor(Instan ce instance, EndpointI endpoint, ObjectAdapter adapter, String adapterName) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ConnectionFactory.cs:行号 971
在 Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, ObjectAdapterFactory objectAdapterFactory, String name, String endpointInfo, RouterPrx router) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ObjectAdapterI.cs:行号 848
在 IceInternal.ObjectAdapterFactory.createObjectAdapt er(String name, String endpoints, RouterPrx router) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ObjectAdapterFactory.cs:行号 122
在 Ice.CommunicatorI.createObjectAdapterWithEndpoints (String name, String endpoints) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\CommunicatorI.cs:行号 57
在 UcsServer.Program.Main(String[] args) 位置 F:\Work\自有业务查询\LianTongCodec\UcsServer\Program.cs: 行号 16
Caused by: System.Net.Sockets.SocketException: 使用了与请求的协议不兼容的地址。
在 System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.Sockets.Socket.Bind(EndPoint localEP)
在 IceInternal.Network.doBind(Socket socket, EndPoint addr) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\Network.cs:行号 306
__________________
dongpinglei
china kunlun mobile tech.
lifejoy@163.com
project :1919plat,www.1919.com.cn
Reply With Quote
  #2 (permalink)  
Old 08-23-2006
kennyyu kennyyu is offline
Registered User
 
 
Join Date: Aug 2006
Location: Beijing, China
Posts: 5
Send a message via MSN to kennyyu
-->
I have the same question, does anyone know why?
thanks
Reply With Quote
  #3 (permalink)  
Old 08-23-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
I recommend to switch on network tracing with Ice.Trace.Network=2 to see what's going on. The most likely problem is that the port you are trying to bind to is already in use by some other server.
Reply With Quote
  #4 (permalink)  
Old 08-23-2006
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 931
Quote:
Originally Posted by lifejoy
I use ICE 3.10 to delvolop a test service with C#,
Under windows 2003 standard all is ok,But in Windows XP SP2 run error!
It would be most helpful if you could provide that test case that demonstrates the problem. For the stack trace, all I can see is that the call to bind() fails but, without more information, I basically have no chance of tracking down the reason for this.

Thanks,

Michi.
Reply With Quote
  #5 (permalink)  
Old 08-23-2006
kennyyu kennyyu is offline
Registered User
 
 
Join Date: Aug 2006
Location: Beijing, China
Posts: 5
Send a message via MSN to kennyyu
-->
I modified configfile, added an IP address into endpoints string "-h ***.***.***.***", and then it's working now, I don't know why, my PC has more than one network cards, and not all avalible, I just use the one which's connected, should I must do this if PC has more than one NICs?
Reply With Quote
  #6 (permalink)  
Old 08-23-2006
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
Can you be a little more specific please? By not available what do you mean? Do you mean that the network interface has been disabled? In this case if you use "tcp -p 12000" and not "tcp -h <whatever-ip-address> -p 12000" you get the "cannot bind" error?
Reply With Quote
  #7 (permalink)  
Old 08-23-2006
kennyyu kennyyu is offline
Registered User
 
 
Join Date: Aug 2006
Location: Beijing, China
Posts: 5
Send a message via MSN to kennyyu
-->
I have two NICs, one is "Local Network" and the other one is Wireless, at that time I haven't a cable 100BastT, so only Wireless is avalible.
I also tried another port without IP address indicated, I 'm sure that the problem is not the port 10000 busy. below is my ipconfig:

C:\>ipconfig

Windows IP Configuration


Ethernet adapter wireless network connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.10
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : fe80::216:6fff:fe68:72a4%4
Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter local connection:

Media State . . . . . . . . . . . : Media disconnected

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 3ffe:831f:4136:e37a:8000:8fab:2471:2
487
IP Address. . . . . . . . . . . . : fe80::5445:5245:444f%6
Default Gateway . . . . . . . . . : ::

Tunnel adapter Automatic Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : fe80::5efe:192.168.1.10%2
Default Gateway . . . . . . . . . :

if I config the configfile.server like this:
Hello.Endpoints=tcp -h 192.168.1.10 -p 10000:udp -h 192.168.1.10 -c -p 10000:ssl -h 192.168.1.10 -p 10001
the server.exe run properly, and if I don't change that line and keep it original:
Hello.Endpoints=tcp -p 10000:udp -c -p 10000:ssl -p 10001

server.exe doesn't work and show error message as below:

D:\Ice\democs\Ice\hello>server
server.exe: Ice.SocketException: Cannot bind
error = 0
在 IceInternal.Network.doBind(Socket socket, EndPoint addr) 位置 c:\src\vc80\
stage\IceCS-3.1.0\src\Ice\Network.cs:行号 312
在 IceInternal.TcpAcceptor..ctor(Instance instance, String host, Int32 port)
位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\TcpAcceptor.cs:行号 129
在 IceInternal.TcpEndpointI.acceptor(EndpointI& endpoint, String adapterName)
位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\TcpEndpointI.cs:行号 363
在 IceInternal.IncomingConnectionFactory..ctor(Instan ce instance, EndpointI e
ndpoint, ObjectAdapter adapter, String adapterName) 位置 c:\src\vc80\stage\IceCS
-3.1.0\src\Ice\ConnectionFactory.cs:行号 971
在 Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, Obj
ectAdapterFactory objectAdapterFactory, String name, String endpointInfo, Router
Prx router) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ObjectAdapterI.cs:行号 84
8
在 IceInternal.ObjectAdapterFactory.createObjectAdapt er(String name, String e
ndpoints, RouterPrx router) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\ObjectAda
pterFactory.cs:行号 122
在 Ice.CommunicatorI.createObjectAdapterWithEndpoints (String name, String end
points) 位置 c:\src\vc80\stage\IceCS-3.1.0\src\Ice\CommunicatorI.cs:行号 57
在 Ice.CommunicatorI.createObjectAdapter(String name) 位置 c:\src\vc80\stage\
IceCS-3.1.0\src\Ice\CommunicatorI.cs:行号 52
在 Server.run(String[] args) 位置 D:\Ice\democs\Ice\hello\Server.cs:行号 14
在 Ice.Application.main(String[] args, InitializationData initData) 位置 c:\s
rc\vc80\stage\IceCS-3.1.0\src\Ice\Application.cs:行号 116
Caused by: System.Net.Sockets.SocketException: 使用了与请求的协议不兼容的地址。
在 System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress
socketAddress)
在 System.Net.Sockets.Socket.Bind(EndPoint localEP)
在 IceInternal.Network.doBind(Socket socket, EndPoint addr) 位置 c:\src\vc80\
stage\IceCS-3.1.0\src\Ice\Network.cs:行号 306

D:\Ice\democs\Ice\hello>



"使用了与请求的协议不兼容的地址" I think it means: used a different address with request protocol.


Thanks
Reply With Quote
  #8 (permalink)  
Old 08-24-2006
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
I suspect the problem is the ipv6 interface you have. Did you try to disable this and see whether the server works?
Reply With Quote
  #9 (permalink)  
Old 08-24-2006
kennyyu kennyyu is offline
Registered User
 
 
Join Date: Aug 2006
Location: Beijing, China
Posts: 5
Send a message via MSN to kennyyu
-->
Quote:
Originally Posted by matthew
I suspect the problem is the ipv6 interface you have. Did you try to disable this and see whether the server works?
do you mean disable the NIC of Local Network? I did, didn't work.
Reply With Quote
  #10 (permalink)  
Old 08-24-2006
kennyyu kennyyu is offline
Registered User
 
 
Join Date: Aug 2006
Location: Beijing, China
Posts: 5
Send a message via MSN to kennyyu
-->
Quote:
Originally Posted by matthew
I suspect the problem is the ipv6 interface you have. Did you try to disable this and see whether the server works?
just tried to disable ipv6 use this:
netsh interface ipv6 6to4 set state disabled

still not work
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Build issue with ICECS 3.1.0 lkw Bug Reports 2 07-18-2006 11:19 PM
fatal error C1189: #error : WINDOWS.H already included delloby Help Center 1 02-05-2006 02:58 AM
IcePatch2 error in windows? dhlong Help Center 4 01-16-2006 10:46 PM
Error when stopping an Ice-based Windows service dwolfe5272 Help Center 14 06-30-2005 04:45 PM
Question about the IceCS generate.exe damingyipai Help Center 3 08-12-2004 10:18 PM


All times are GMT -4. The time now is 11:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.