Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] connections/threads are not cleaned up after failing importService call

Hi,

we encountered a problem while trying to import services exported from a process running in a local VM (_not_ JVM). The VM forwards the necessary port to the host machine.

As for the problem: RemoteAdminService#importService causes a RemoteAdminServiceEvent.IMPORT_ERROR to be signalled and the connections/threads opened due to the importService call do not get closed, even though we call ImportRegistration#close() on failed attempts. The latter does not happen, if there is no one listening on the port at all. Since, we have code that regularly calls importService again for services, that should be, but are not currently imported (according to RemoteAdminService#getImportedEndpoints), we slowly accumulate more and more threads.

The tcp connection to the local VM seems to be successful, but due to issues regarding requested hostname and actual hostname ECF (correctly) does not "connect the services" (see https://dev.eclipse.org/mhonarc/lists//ecf-dev/msg07259.html for a discussion of the "hostname problem - localhost != getCanonicalHostname()" in EndPointDescriptions; in this case it is host::getCanonicalHostname() != VM::getCanonicalHostname())

So importService creates threads/connections, fails to import, and even with a call to ImportRegistration#close() does not clean up the threads/connections.

Any suggestions on how to solve this issue or more generally handle this reconnect use-case are more than welcome!

Best regards,

Bye Peter


PS: we use the ecf generic provider on the latest ecf release



Back to the top