Home Help Center

ICECS error in in Windows XP Sp2

lifejoylifejoy Member lifejoyOrganization: klmtProject: 1919&secondplat
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(Instance 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.createObjectAdapter(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(Instance 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.createObjectAdapter(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

Comments

  • kennyyukennyyu Member
    I have the same question, does anyone know why?
    thanks
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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.
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    lifejoy wrote:
    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.
  • kennyyukennyyu Member
    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?
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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?
  • kennyyukennyyu Member
    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(Instance 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.createObjectAdapter(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
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    I suspect the problem is the ipv6 interface you have. Did you try to disable this and see whether the server works?
  • kennyyukennyyu Member
    matthew wrote:
    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.
  • kennyyukennyyu Member
    matthew wrote:
    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
Sign In or Register to comment.