If you run the HTTP Proxy and you reload some other jmx file using the menue File->Open, then the running proxy server is still running in the background, but it vanished from the GUI. A newly created HTTP Proxy server has no effect (but you don't get an error message about a port being already in use). The only way to get rid of the proxy server is to kill Jmeter.
Same probably applies to the Mirror Server. Possible fixes: * kill the servers if a new test plan is loaded * prevent a new test plan from being loaded if servers are active
Created attachment 27485 [details] Stops Mirror or Proxy on Load, Reload or close of project Hello, 1) I added an Interface called IStopable implementer by HttpMirrorServer and Daemon. 2) ProxyControl and HttpMirrorControl register/unregister on start/stop 3) A new Action called StopStoppables which does the stopServer calls. 4) Action is called through ActionRouter.getInstance().doActionNow in Load, Close and LoadRecentProject (through Load inheritence) Test scenario is: - Create a new Test Plan - Add a mirror or proxy - Start it - Close project or Open a recent one or open a new one, - Proxy or mirror are stopped and bug is fixed Regards Philippe Mouawad
Thanks very much for the patch. I applied it with minor changes (renamed IStopable => Stoppable) and added check for null guiPackage in Mirror Server (which can be run non-Gui). URL: http://svn.apache.org/viewvc?rev=1170627&view=rev Log: Bug 39219 - HTTP Server: You can't stop it after File->Open Added: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/Stoppable.java (with props) jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/StopStoppables.java (with props) Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/Close.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorControl.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorServer.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java jakarta/jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1706