gerritjvv / bigstreams

bigstreams big data kafka hadoop and file based imports
Eclipse Public License 1.0
3 stars 3 forks source link

agent hangs on shutdown during error #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the new un released version was introduced the following error:

Agent goes into infinite loop. not recovering even with kill signal

error desc: Agent hangs when error reporting to collector

Cause: 
 The AppStartCommand.shutdown() calls the AppLifeCycleManager.shutdown
 This method calls the FileSendService.shutdown()
 This calls the ClientResourceFactoryImpl.destroy()
 Calls the ClientConnectionFactory.close()
 Calls the org.jboss.netty.channel.socket.ClientSocketChannelFactory.destroyExternalResources() and hangs here.

Solution:
 Edit the method close() in org.streams.agent.send.impl.ClientConnectionFactoryImpl to just set the org.jboss.netty.channel.socket.ClientSocketChannelFactory
 instance to null and never call destroyExternalResources
 Add a ThreadResourceService that implements the ApplicationService interface and add it to the ApplicationLifeCycleManager.
 On shutdown the ThreadResourceService will ensure that all threads are shutdown.

Original issue reported on code.google.com by gerritjvv@gmail.com on 25 Nov 2010 at 1:35

GoogleCodeExporter commented 8 years ago

Original comment by gerritjvv@gmail.com on 25 Nov 2010 at 1:36