我有django,celery和rabbitmq docker容器。在celery容器中,我正在使用sshuttle程序创建代理。但是当我连接时,芹菜不能再连接到Rabbitmq了。
<div class="product-contant clearfix">
<div class="product-block clearfix">
<div class="tab-content">
<?php $category = $cat->id;
$sql = "select * from sub_category where cat_id='$category' order by subcategory_name asc";
$subcategory = Subcategory::find_by_sql($sql);
foreach($subcategory as $subcat){
?>
<div class="tab-pane fade active in" id="<?php echo $subcat->cat_id; ?>">
<div class="item-block clearfix">
<div class="product-item">
<ul class="products-row">
<li class="image-block">
<a href="#"><span><img src="images/products/women/clothing/products-img-6.jpg" alt="" /></span></a>
</li>
<li class="products-details">
<a href="#"> <?php echo $subcat->subcategory_name; ?> </a>
<span>$1600</span>
</li>
</ul>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
芹菜容器无法再连接到Rabbitmq。我将这两个链接在docker-compose文件中。在穿梭之前,我可以从芹菜容器中ping到rabbitmq容器,但是在穿梭之后,我得到了错误
kombu.exceptions.OperationalError: failed to resolve broker hostname
t20-rabbit是Rabbitmq容器的名称。
我正在使用以下命令运行shuttle:
ping: t20-rabbit: Name or service not known.