{
  "id": "communication/amqp-connection-530-not-allowed",
  "signature": "AMQPConnectionError: connection closed by server (530) NOT_ALLOWED",
  "signature_zh": "AMQP 连接错误：服务器关闭连接 (530) 不允许",
  "regex": "530.*NOT_ALLOWED|connection closed by server.*530",
  "domain": "communication",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The AMQP client attempted to connect with insufficient permissions or an invalid virtual host (vhost) on the RabbitMQ broker.",
  "root_cause_type": "generic",
  "root_cause_zh": "AMQP 客户端尝试连接时权限不足或虚拟主机（vhost）无效，导致 RabbitMQ 代理拒绝。",
  "versions": [
    {
      "version": "RabbitMQ 3.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pika 1.3.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "amqplib 0.10.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Reinstall RabbitMQ server to reset permissions",
      "why_fails": "Reinstalling is overkill; the issue is typically a misconfigured vhost or user permissions, not a corrupt installation.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the default guest/guest credentials with default vhost '/'",
      "why_fails": "RabbitMQ disables guest user access from non-localhost by default; this fails for remote clients.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the connection timeout in the client",
      "why_fails": "The error is a rejection, not a timeout; increasing timeout doesn't change permission checks.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify and grant correct permissions for the user on the target vhost using RabbitMQ CLI: `rabbitmqctl set_permissions -p my_vhost my_user \"^.*\" \"^.*\" \"^.*\"` and ensure the vhost exists with `rabbitmqctl add_vhost my_vhost`.",
      "success_rate": 0.9,
      "how": "Verify and grant correct permissions for the user on the target vhost using RabbitMQ CLI: `rabbitmqctl set_permissions -p my_vhost my_user \"^.*\" \"^.*\" \"^.*\"` and ensure the vhost exists with `rabbitmqctl add_vhost my_vhost`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure the client connection string to explicitly specify the vhost: In Python with pika, use `pika.URLParameters('amqp://user:pass@host:5672/my_vhost')`.",
      "success_rate": 0.85,
      "how": "Configure the client connection string to explicitly specify the vhost: In Python with pika, use `pika.URLParameters('amqp://user:pass@host:5672/my_vhost')`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check RabbitMQ logs for detailed rejection reason: `tail -f /var/log/rabbitmq/rabbit@host.log` to see if the error is due to vhost mismatch or user permissions.",
      "success_rate": 0.8,
      "how": "Check RabbitMQ logs for detailed rejection reason: `tail -f /var/log/rabbitmq/rabbit@host.log` to see if the error is due to vhost mismatch or user permissions.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify and grant correct permissions for the user on the target vhost using RabbitMQ CLI: `rabbitmqctl set_permissions -p my_vhost my_user \"^.*\" \"^.*\" \"^.*\"` and ensure the vhost exists with `rabbitmqctl add_vhost my_vhost`.",
    "Configure the client connection string to explicitly specify the vhost: In Python with pika, use `pika.URLParameters('amqp://user:pass@host:5672/my_vhost')`.",
    "Check RabbitMQ logs for detailed rejection reason: `tail -f /var/log/rabbitmq/rabbit@host.log` to see if the error is due to vhost mismatch or user permissions."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.rabbitmq.com/amqp-0-9-1-reference.html#connection.close",
  "official_doc_section": null,
  "error_code": "530",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}