Hi, I wonder if anyone can point me in the direction of a solution for my problem. It seems that in some cases, when I unload a plugin I’'ve written myself, the server stops responding properly. These are a few characteristics:
Messages are still being passed between users.
No-one is able to login anymore. If one tries, a “Connect Socket[addr=/123.45.67.89,port=4385,localport=5222]” entry appears in the debug log, but that’'s about it.
There’'s no apparant related error in any of the logs. The server just… stops, partially.
The particular plugin disappears from the plugin list. It doesn’‘t reload anymore. The plugin directory remains in target/wildfire/plugins/. I haven’'t tried one of the other plugins yet.
I’'ve found no other way than to restart Wildfire to get it back up again.
I’‘m hoping that one of these characteristics trigger some sort of ‘‘Ah, have a look at that’’ response. It seems pretty likely that I’‘m doing something weird in my plugin - the lack of service occurs only (but not all the time) when I’‘m working (unloading) that plugin. I’'m currently running a SVN pulled version that reports as 2.5.1.
I’‘ve been running the statistics plugin trial by v2software. My memory consumption didn’‘t go above 10% of my available memory the last few days. I didn’‘t have any out of memory errors either, so I guess its something else. I’'ll have a look at the threads the plugin uses tomorrow - I indeed do use one.
I would guess that you’'re not completely cleaning up all your resources in the destroyPlugin() method, i.e. removing/nulling all listeners and class variables.
Are there any messages in your log files that repeatedly state that Wildfire failed to unload your plugin and will try again momentarily?
I’‘ve got those messages under Windows, not under Linux, but you’‘re at least partially right: I forgot to unregister the plugin as a propertyEventListener. I haven’‘t found a way to reproduce my original error, so I’'m still unsure if unregistering the plugin as a propertyEvenListener solves my original problem.
I’'m now making sure that all non-primitive, non-String and non constant attributes of my class are being closed and nulled - I still get the ‘‘failed to unload, will try again momentarily’’ messages though.
It’‘s strange that you’‘re seeing different results on different platforms. Are you running the same version of the JDK/JRE on both platforms? Any chance you’‘re using threads and they’'re not being completely shutdown?