RabbitMQ出错

rabbitmq中点击admin报错

img

img


其他都是好的,但是就是admin报错,火狐和edge都是这样,为什么啊,求帮助

不知道你这个问题是否已经解决, 如果还没有解决的话:
  • 你可以参考下这个问题的回答, 看看是否对你有帮助, 链接: https://ask.csdn.net/questions/757968
  • 这篇博客也不错, 你可以看下解决RabbitMQ admin账号登陆失败的问题
  • 除此之外, 这篇博客: RabbitMQ 重启后,为啥消费者也要重启中的 RabbitMQ 重启后,为啥消费者也要重启 部分也许能够解决你的问题, 你可以仔细阅读以下内容或者直接跳转源博客中阅读:

     

     

    xml 配置

    
        <bean id="xxxx"  class="org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer">  
            <property name="queueNames" value="xxxx"></property> 
            <property name="connectionFactory" ref="jyMqConnectionFactory4Common"></property>  
            <property name="messageListener" ref="xxxx"></property>
            <property name="maxConcurrentConsumers" value="100" />
            <property name="concurrentConsumers" value="20" />
            <property name="adviceChain">
                <array>
                    <ref bean="retryInterceptor" />
                </array>
            </property>
            <property name="autoStartup" value="false" />
        </bean>

    BlockingQueueConsumer

    public void start() throws AmqpException {
    		if (logger.isDebugEnabled()) {
    			logger.debug("Starting consumer " + this);
    		}
    		try {
    			this.resourceHolder = ConnectionFactoryUtils.getTransactionalResourceHolder(connectionFactory, transactional);
    			this.channel = resourceHolder.getChannel();
    		}
    		catch (AmqpAuthenticationException e) {
    			throw new FatalListenerStartupException("Authentication failure", e);
    		}
    		this.consumer = new InternalConsumer(channel);
    		this.deliveryTags.clear();
    		this.activeObjectCounter.add(this);
    
    		// mirrored queue might be being moved
    		int passiveDeclareTries = 3;
    		do {
    			try {
    				attemptPassiveDeclarations();
    				if (passiveDeclareTries < 3 && logger.isInfoEnabled()) {
    					logger.info("Queue declaration succeeded after retrying");
    				}
    				passiveDeclareTries = 0;
    			}
    			catch (DeclarationException e) {
    				if (passiveDeclareTries > 0 && channel.isOpen()) {
    					if (logger.isWarnEnabled()) {
    						logger.warn("Queue declaration failed; retries left=" + (passiveDeclareTries-1), e);
    						try {
    							Thread.sleep(5000);
    						}
    						catch (InterruptedException e1) {
    							Thread.currentThread().interrupt();
    						}
    					}
    				}
    				else if (e.getFailedQueues().size() < this.queues.length) {
    					if (logger.isWarnEnabled()) {
    						logger.warn("Not all queues are available; only listening on those that are - configured: "
    								+ Arrays.asList(this.queues) + "; not available: " + e.getFailedQueues());
    					}
    					this.missingQueues.addAll(e.getFailedQueues());
    					this.lastRetryDeclaration = System.currentTimeMillis();
    				}
    				else {
    					this.activeObjectCounter.release(this);
    					throw new QueuesNotAvailableException("Cannot prepare queue for listener. "
    							+ "Either the queue doesn't exist or the broker will not allow us to use it.", e);
    				}
    			}
    		}
    		while (passiveDeclareTries-- > 0);
    
    		if (!acknowledgeMode.isAutoAck()) {
    			// Set basicQos before calling basicConsume (otherwise if we are not acking the broker
    			// will send blocks of 100 messages)
    			try {
    				channel.basicQos(prefetchCount);
    			}
    			catch (IOException e) {
    				this.activeObjectCounter.release(this);
    				throw new FatalListenerStartupException("Cannot set basicQos.", e);
    			}
    		}
    
    
    		try {
    			for (String queueName : queues) {
    				if (!this.missingQueues.contains(queueName)) {
    					consumeFromQueue(queueName);
    				}
    			}
    		}
    		catch (IOException e) {
    			throw RabbitExceptionTranslator.convertRabbitAccessException(e);
    		}
    	}
    

    中最重要的

     

    try {
    			for (String queueName : queues) {
    				if (!this.missingQueues.contains(queueName)) {
    					consumeFromQueue(queueName);
    				}
    			}
    		}
    		catch (IOException e) {
    			throw RabbitExceptionTranslator.convertRabbitAccessException(e);
    		}

     


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^