This forum has been archived. Please start a new discussion on GitHub.

why many TCP ports opened for listening

Hi, I found that my ICE server opened extra 6 TCP ports listening.
These ports are continuous.
And seems every one have already build a local connection.

Is this ports opened by ICE?
If it is , is it caused by loging,tracing and debugging print?
Could them be closed?



  • How many object adapters with how many endpoints does your application create? And what Ice version (C++, Java, C#?) and what operating system is this?
  • Sorry for my unclear describe.

    My ICE Servers of JAVA and C++ running in Windows 2000 advanced server all have only one object adapters and endpoints.

    Java version:
    create two local connections <---> <---->

    C++ version:
    create two local connections <---> <--->

    And I found my another Java server with 2 endpoints, each one with one object adapters create 4 local connections: <---> <----> <---> <---->

    My endpoints listening in other port 6672,6682.
    My server is also have SQL server connections, the SQL Server's port is 1433.
    So, I want to know whether those local connections is build by Ice.

  • On Windows, Ice creates one connection for each thread pool for internal purposes. With two thread pools by default, this means that Ice creates two internal connections by default. In addition to that, Java's nio stuff creates some internal connections (depending on the platform).

    However, these are connections only, not ports that listen to connections. You should ignore these connections, they have no impact on your application.

    The purpose of these connections is to interrupt select(). Under Linux, it's possible to use a simple pipe. Windows does not have pipes that are select-able, so an internal TCP connection is used.
  • OK, I see.
    We also use tcp connection to wake up select in other projects.

    I made a mistake
    because when using tcpview to view the port status,it shows listening.
    I try to telnet the "listening" port, connect failed.
    So you are right, it's only a connection. TcpView is wrong.