zoukankan      html  css  js  c++  java
  • RabbitMQ的个人爬坑(一)

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Exception in thread "main" java.io.IOException
    	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
    	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
    	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
    	at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:403)
    	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64)
    	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1106)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1063)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1021)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1182)
    	at com.itheima.rabbitmq.simple.Producer.main(Producer.java:24)
    Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=530, reply-text=NOT_ALLOWED - vhost /itcast not found, class-id=10, method-id=40)
    	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
    	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
    	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
    	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
    	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
    	... 8 more
    
    

    报错。

    关键在于

    connection error; protocol method: #method<connection.close>(reply-code=530, reply-text=NOT_ALLOWED - vhost /itcast not found, class-id=10, method-id=40)
    

    意思是链接错误,后来发现是原来是virtual host没有设置。

    添加之后运行一切正常。

    你好啊,谢谢你来看我。
  • 相关阅读:
    Redis数据库概述
    分布式爬虫(一)------------------分布式爬虫概述
    Spark环境搭建(五)-----------Spark生态圈概述与Hadoop对比
    错误解决记录------------rhel安装Mysql软件包依赖 mariadb组件
    rhel 7安装Mysql
    Linux虚拟机搭建本地yum源
    rhel配置网络yum源
    Spark环境搭建(四)-----------数据仓库Hive环境搭建
    冲销会计凭证:FBRP与FB08的区别
    xk01创建供应商保存的时候,提示错误“科目800001已经存在”
  • 原文地址:https://www.cnblogs.com/sitr/p/13997573.html
Copyright © 2011-2022 走看看