为了别人,也是为了将来自己忘了,备忘一个问题
在实现Celery链接RabbitMQ的时候,感觉万事具备了,却报错:
CRITICAL/MainProcess] Frequent restarts detected: RestartFreqExceeded('5 in 1s',)
raceback (most recent call last):
File "d:\virtualenv\env\lib\site-packages\celery\worker\consumer.py", line 276, in start
self._restart_state.step()
File "d:\virtualenv\env\lib\site-packages\billiard\common.py", line 130, in step
raise self.RestartFreqExceeded("%r in %rs" % (R, self.maxT))
RestartFreqExceeded: 5 in 1s
网友说是因为broker在amqp的协议末端不应该加'/',否则连不上RabbitQM,也是一个道理,反正这个错就是RabbitMQ连不上...
其实我是忘了赋予权限了,只要这句话即可:
sudo rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"结束