Error deleting vhost

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error deleting vhost

austinnichols
Using RMQ 3.0.2 / Erlang R14B04

I'm having difficulty deleting a specific vhost.  When attempting to delete I receive the message below.  Other vhosts do not appear to have this same issue.

Would appreciate any guidance on where to start troubleshooting ...


Delete this vhost

HTTP APICommand LineUpdate  
Last update: 2013-06-19 14:41:20

Got response code 500 with body
Internal Server Error

The server encountered an error while processing this request:
{throw,
    {error,
        {{badmatch,
             {error_string,
                 "Validation failed\n\nname not recognised: undefined\n"}},
         [{rabbit_vhost,'-internal_delete/1-lc$^1/1-1-',2},
          {rabbit_vhost,internal_delete,1},
          {rabbit_vhost,'-delete/1-fun-0-',1},
          {mnesia_tm,apply_fun,3},
          {mnesia_tm,execute_transaction,5},
          {rabbit_misc,'-execute_mnesia_transaction/1-fun-0-',1},
          {worker_pool_worker,handle_call,3},
          {gen_server2,handle_msg,2}]}},
    [{rabbit_misc,execute_mnesia_transaction,1},
     {rabbit_mgmt_wm_vhost,delete_resource,2},
     {webmachine_resource,resource_call,3},
     {webmachine_resource,do,3},
     {webmachine_decision_core,resource_call,1},
     {webmachine_decision_core,decision,1},
     {webmachine_decision_core,handle_request,2},
     {rabbit_webmachine,'-makeloop/1-fun-0-',2}]}
mochiweb+webmachine web server

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Error deleting vhost

austinnichols
OK - I was able to figure this one out.  The solution wasn't easy, but may help someone in the future.

I believe the core problem was a partially/mis-configured federation setup. 

I exported my config to json, stopped RMQ then deleted (renamed .bad) the mnesia folder.  

When I restarted I re-imported my config and found that I had the same problem as before.  OK - it's something in the config...

I then went through the config json and CAREFULLY removed any references to my 'bad' vhost.  There were a few problem areas:

1.  Parameters node - several entries pertained to federation and when I went through the admin gui I couldn't remove the settings.  Deleted from the .json
2.  There were a couple of admin users with rights to the vHost that remained after the vhost was deleted.

I cleared out mnesia again, restarted, imported my json and I'm now up and running.

I was also having a problem turning on tracing (rabbitmqctl trace_on -p myVhost) which would hang on this specific vhost.  Once I uploaded my clean config I was able to enable trace without issues.



On Wednesday, June 19, 2013 2:51:42 PM UTC-4, austinnichols wrote:
Using RMQ 3.0.2 / Erlang R14B04

I'm having difficulty deleting a specific vhost.  When attempting to delete I receive the message below.  Other vhosts do not appear to have this same issue.

Would appreciate any guidance on where to start troubleshooting ...


Delete this vhost

HTTP APICommand LineUpdate  
Last update: 2013-06-19 14:41:20

Got response code 500 with body
Internal Server Error

The server encountered an error while processing this request:
{throw,
    {error,
        {{badmatch,
             {error_string,
                 "Validation failed\n\nname not recognised: undefined\n"}},
         [{rabbit_vhost,'-internal_delete/1-lc$^1/1-1-',2},
          {rabbit_vhost,internal_delete,1},
          {rabbit_vhost,'-delete/1-fun-0-',1},
          {mnesia_tm,apply_fun,3},
          {mnesia_tm,execute_transaction,5},
          {rabbit_misc,'-execute_mnesia_transaction/1-fun-0-',1},
          {worker_pool_worker,handle_call,3},
          {gen_server2,handle_msg,2}]}},
    [{rabbit_misc,execute_mnesia_transaction,1},
     {rabbit_mgmt_wm_vhost,delete_resource,2},
     {webmachine_resource,resource_call,3},
     {webmachine_resource,do,3},
     {webmachine_decision_core,resource_call,1},
     {webmachine_decision_core,decision,1},
     {webmachine_decision_core,handle_request,2},
     {rabbit_webmachine,'-makeloop/1-fun-0-',2}]}
mochiweb+webmachine web server

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Error deleting vhost

Simon MacMullen-2
Hi. There are a couple of bugs in config json vs policies and parameters
vs vhosts. Some have been fixed already, and some will be fixed in the
next release.

Cheers, Simon

On 19/06/13 21:24, austinnichols wrote:

> OK - I was able to figure this one out.  The solution wasn't easy, but
> may help someone in the future.
>
> I believe the core problem was a partially/mis-configured federation setup.
>
> I exported my config to json, stopped RMQ then deleted (renamed .bad)
> the mnesia folder.
>
> When I restarted I re-imported my config and found that I had the same
> problem as before.  OK - it's something in the config...
>
> I then went through the config json and CAREFULLY removed any references
> to my 'bad' vhost.  There were a few problem areas:
>
> 1.  Parameters node - several entries pertained to federation and when I
> went through the admin gui I couldn't remove the settings.  Deleted from
> the .json
> 2.  There were a couple of admin users with rights to the vHost that
> remained after the vhost was deleted.
>
> I cleared out mnesia again, restarted, imported my json and I'm now up
> and running.
>
> I was also having a problem turning on tracing (rabbitmqctl trace_on -p
> myVhost) which would hang on this specific vhost.  Once I uploaded my
> clean config I was able to enable trace without issues.
>
>
>
> On Wednesday, June 19, 2013 2:51:42 PM UTC-4, austinnichols wrote:
>
>     Using RMQ 3.0.2 / Erlang R14B04
>
>     I'm having difficulty deleting a specific vhost.  When attempting to
>     delete I receive the message below.  Other vhosts do not appear to
>     have this same issue.
>
>     Would appreciate any guidance on where to start troubleshooting ...
>
>
>     Delete this vhost
>
>     HTTP APICommand LineUpdate
>     Last update: 2013-06-19 14:41:20
>
>     Got response code 500 with body
>     Internal Server Error
>
>     The server encountered an error while processing this request:
>     {throw,
>          {error,
>              {{badmatch,
>                   {error_string,
>                       "Validation failed\n\nname not recognised:
>     undefined\n"}},
>               [{rabbit_vhost,'-internal_delete/1-lc$^1/1-1-',2},
>                {rabbit_vhost,internal_delete,1},
>                {rabbit_vhost,'-delete/1-fun-0-',1},
>                {mnesia_tm,apply_fun,3},
>                {mnesia_tm,execute_transaction,5},
>                {rabbit_misc,'-execute_mnesia_transaction/1-fun-0-',1},
>                {worker_pool_worker,handle_call,3},
>                {gen_server2,handle_msg,2}]}},
>          [{rabbit_misc,execute_mnesia_transaction,1},
>           {rabbit_mgmt_wm_vhost,delete_resource,2},
>           {webmachine_resource,resource_call,3},
>           {webmachine_resource,do,3},
>           {webmachine_decision_core,resource_call,1},
>           {webmachine_decision_core,decision,1},
>           {webmachine_decision_core,handle_request,2},
>           {rabbit_webmachine,'-makeloop/1-fun-0-',2}]}
>     mochiweb+webmachine web server
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


--
Simon MacMullen
RabbitMQ, Pivotal
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

PHP AMQP Extension Connection Timeout

Umutcan
Hi,

I am using AMQP extension of PHP in order to publish messages. I want my
application to run whether it publish messages or not. So it must not
wait too long to send messages to RabbitMQ server. setTimeout() method
is working fine when server is running even if any of the alarms is
true. But, it is not working if RabbitMQ server is stopped. Publisher
can connect to the machine that hosts the server due to security
settings,  but connection hangs for a long time until it throws an
exception which gives an socket error message.

How can I solve this problem? Is there any idea?

Umutcan Onal
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: PHP AMQP Extension Connection Timeout

michaelklishin

2013/6/20 Umutcan <[hidden email]>
But, it is not working if RabbitMQ server is stopped. Publisher can connect to the machine that hosts the server due to security settings,  but connection hangs for a long time until it throws an exception which gives an socket error message.

Clients should make socket timeouts configurable. If the PHP client you're using does not,
file an issue with it.

Alternatively, try to see if you can obtain a reference to the socket and set socket options on it
yourself.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss