<div>I am having some issues when trying to delete a vhost.&nbsp;</div><div><br></div><div>I'm using the latest version of rabbitmq 3.0.2 and my set up has two clusters (2 machines in each) with a federation for pub/sub messages.&nbsp;</div><div><br></div><div>When trying to remove the vhost via the web interface I get the error :</div><div><br></div><div>Internal Server Error</div><div><br></div><div>The server encountered an error while processing this request:</div><div>{throw,</div><div>&nbsp; &nbsp; {error,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {{badmatch,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{error_string,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"Validation failed\n\nname not recognised: undefined\n"}},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[{rabbit_vhost,'-internal_delete/1-lc$^1/1-1-',2},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {rabbit_vhost,internal_delete,1},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {rabbit_vhost,'-delete/1-fun-0-',1},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {mnesia_tm,apply_fun,3},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {mnesia_tm,execute_transaction,5},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {rabbit_misc,'-execute_mnesia_transaction/1-fun-0-',1},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {worker_pool_worker,handle_call,3},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {gen_server2,handle_msg,2}]}},</div><div>&nbsp; &nbsp; [{rabbit_misc,execute_mnesia_transaction,1},</div><div>&nbsp; &nbsp; &nbsp;{rabbit_mgmt_wm_vhost,delete_resource,2},</div><div>&nbsp; &nbsp; &nbsp;{webmachine_resource,resource_call,3},</div><div>&nbsp; &nbsp; &nbsp;{webmachine_resource,do,3},</div><div>&nbsp; &nbsp; &nbsp;{webmachine_decision_core,resource_call,1},</div><div>&nbsp; &nbsp; &nbsp;{webmachine_decision_core,decision,1},</div><div>&nbsp; &nbsp; &nbsp;{webmachine_decision_core,handle_request,2},</div><div>&nbsp; &nbsp; &nbsp;{rabbit_webmachine,'-makeloop/1-fun-0-',2}]}</div><div><br></div><div>When trying to remove the vhost from the command line I get something similar :</div><div><br></div><div>[rabbitmq@chi-sc-cget-m-rabbitmq-001 ~]$ rabbitmqctl delete_vhost v4e73843117c745bb8c1796c2a423b177</div><div>Deleting vhost "v4e73843117c745bb8c1796c2a423b177" ...</div><div>Error: {{badmatch,{error_string,"Validation failed\n\nname not recognised: undefined\n"}},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; [{rabbit_vhost,'-internal_delete/1-lc$^1/1-1-',2},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{rabbit_vhost,internal_delete,1},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{rabbit_vhost,'-delete/1-fun-0-',1},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{mnesia_tm,apply_fun,3},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{mnesia_tm,execute_transaction,5},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{rabbit_misc,'-execute_mnesia_transaction/1-fun-0-',1},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{worker_pool_worker,handle_call,3},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{gen_server2,handle_msg,2}]}</div><div><br></div><div><br></div><div>Here are the commands to initially set up the vhost via a script (the hosts used here are vips which are load balanced across both nodes in the cluster) :</div><div><br></div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare vhost name=v46997afd74174f1ea120fbeae38877b9 2&gt;&amp;1</div><div>vhost declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare vhost name=v46997afd74174f1ea120fbeae38877b9 2&gt;&amp;1</div><div>vhost declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare user name=aumh4l0SBFJBe3 password=***** tags= 2&gt;&amp;1</div><div>user declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare user name=aumh4l0SBFJBe3 password=***** tags= 2&gt;&amp;1</div><div>user declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=aumh4l0SBFJBe3 configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=aumh4l0SBFJBe3 configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=admin configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=admin configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare policy name=federate-me pattern="^ps." 'definition={"federation-upstream-set":"all"}' 2&gt;&amp;1</div><div>policy declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare policy name=federate-me pattern="^ps." 'definition={"federation-upstream-set":"all"}' 2&gt;&amp;1</div><div>policy declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare policy name=ha-all pattern="^ha." 'definition={"ha-mode":"all"}' 2&gt;&amp;1</div><div>policy declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare policy name=ha-all pattern="^ha." 'definition={"ha-mode":"all"}' 2&gt;&amp;1</div><div>policy declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare parameter component=federation-upstream name=my-upstream value='{"uri":"amqp://aumh4l0SBFJBe3:*****@stage-rabbitmq.onx-sc.cg.company.com","expires":3600000}'</div><div>parameter declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare parameter component=federation name=local-username value='"aumh4l0SBFJBe3"'</div><div>parameter declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare parameter component=federation-upstream name=my-upstream value='{"uri":"amqp://aumh4l0SBFJBe3:*****@stage-rabbitmq.chi-sc.cg.company.com","expires":3600000}'</div><div>parameter declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 declare parameter component=federation name=local-username value='"aumh4l0SBFJBe3"'</div><div>parameter declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare user name=urFZ5xudDA1Sk password=***** tags= 2&gt;&amp;1</div><div>user declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare user name=urFZ5xudDA1Sk password=***** tags= 2&gt;&amp;1</div><div>user declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=urFZ5xudDA1Sk configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=urFZ5xudDA1Sk configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=admin configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** declare permission vhost=v46997afd74174f1ea120fbeae38877b9 user=admin configure=.* read=.* write=.* 2&gt;&amp;1</div><div>permission declared</div><div><br></div><div>Here are the commands used to clean away this vhost :</div><div><br></div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** delete user name=urFZ5xudDA1Sk 2&gt;&amp;1</div><div>user deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** delete user name=urFZ5xudDA1Sk 2&gt;&amp;1</div><div>user deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete parameter component=federation-upstream name=my-upstream 2&gt;&amp;1</div><div>parameter deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete parameter component=federation-upstream name=my-upstream 2&gt;&amp;1</div><div>parameter deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete parameter component=federation name=local-username 2&gt;&amp;1</div><div>parameter deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete parameter component=federation name=local-username 2&gt;&amp;1</div><div>parameter deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete policy name=federate-me 2&gt;&amp;1</div><div>policy deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete policy name=federate-me 2&gt;&amp;1</div><div>policy deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete policy name=ha-all 2&gt;&amp;1</div><div>policy deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** --vhost=v46997afd74174f1ea120fbeae38877b9 delete policy name=ha-all 2&gt;&amp;1</div><div>policy deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** delete vhost name=v46997afd74174f1ea120fbeae38877b9 2&gt;&amp;1</div><div>Traceback (most recent call last):\n &nbsp;File "/apps/nimbus/built/rabbitmq/3.0.0/sbin/rabbitmqadmin", line 889, in &lt;module&gt;\n &nbsp; &nbsp;main()\n &nbsp;File "/apps/nimbus/built/rabbitmq/3.0.0/sbin/rabbitmqadmin", line 354, in main\n &nbsp; &nbsp;method()\n &nbsp;File "/apps/nimbus/built/rabbitmq/3.0.0/sbin/rabbitmqadmin", line 534, in invoke_delete\n &nbsp; &nbsp;self.delete(uri)\n &nbsp;File "/apps/nimbus/built/rabbitmq/3.0.0/sbin/rabbitmqadmin", line 386, in delete\n &nbsp; &nbsp;return self.http("DELETE", "/api%s" % path, "")\n &nbsp;File "/apps/nimbus/built/rabbitmq/3.0.0/sbin/rabbitmqadmin", line 421, in http\n &nbsp; &nbsp;% (resp.status, resp.reason, path, resp.read()))\nException: Received 500 Internal Server Error for path /api/vhosts/v46997afd74174f1ea120fbeae38877b9\n&lt;html&gt;&lt;head&gt;&lt;title&gt;500 Internal Server Error&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;Internal Server Error&lt;/h1&gt;The server encountered an error while processing this request:&lt;br&gt;&lt;pre&gt;{throw,\n &nbsp; &nbsp;{error,\n &nbsp; &nbsp; &nbsp; &nbsp;{{badmatch,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {error_string,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Validation failed\n\nname not recognised: undefined\n"}},\n &nbsp; &nbsp; &nbsp; &nbsp; [{rabbit_vhost,'-internal_delete/1-lc$^1/1-1-',2},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{rabbit_vhost,internal_delete,1},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{rabbit_vhost,'-delete/1-fun-0-',1},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{mnesia_tm,apply_fun,3},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{mnesia_tm,execute_transaction,5},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{rabbit_misc,'-execute_mnesia_transaction/1-fun-0-',1},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{worker_pool_worker,handle_call,3},\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{gen_server2,handle_msg,2}]}},\n &nbsp; &nbsp;[{rabbit_misc,execute_mnesia_transaction,1},\n &nbsp; &nbsp; {rabbit_mgmt_wm_vhost,delete_resource,2},\n &nbsp; &nbsp; {webmachine_resource,resource_call,3},\n &nbsp; &nbsp; {webmachine_resource,do,3},\n &nbsp; &nbsp; {webmachine_decision_core,resource_call,1},\n &nbsp; &nbsp; {webmachine_decision_core,decision,1},\n &nbsp; &nbsp; {webmachine_decision_core,handle_request,2},\n &nbsp; &nbsp; {rabbit_webmachine,'-makeloop/1-fun-0-',2}]}&lt;/pre&gt;&lt;P&gt;&lt;HR&gt;&lt;ADDRESS&gt;mochiweb+webmachine web server&lt;/ADDRESS&gt;&lt;/body&gt;&lt;/html&gt;\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.chi-sc.cg.company.com --port=80 --username=admin --password=***** delete user name=aumh4l0SBFJBe3 2&gt;&amp;1</div><div>user deleted\n</div><div>Running ... rabbitmqadmin --host=stage-rabbitmq.onx-sc.cg.company.com --port=80 --username=admin --password=***** delete user name=aumh4l0SBFJBe3 2&gt;&amp;1</div><div>user deleted\n</div><div><br></div><div>Anyone got any ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div>Ben.</div>