Описание проблемы:
Не запускается сервис SisyphusWorker и журнал событий содержит следующие ошибки:
pgs-sisyphus_sisyphusworker.1.hvjracizck85@ | etcd
pgs-sisyphus_sisyphusworker.1.hvjracizck85@ | 2379
pgs-sisyphus_sisyphusworker.1.hvjracizck85@ | 2023/11/13 16:58:24 can't get arango config with error: client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint http://etcd:2379 exceeded header timeout
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | etcd
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | 2379
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | level=error ts=2023-11-13T16:58:31Z type=rabbit_wrapper err="dial tcp 10.0.1.14:5672: connect: connection refused"
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | panic: Can't create rabbit wrapper
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ |
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | goroutine 1 [running]:
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | main.main()
pgs-sisyphus_sisyphusworker.1.r7xptti1p7an@ | /go/src/cmd/worker/main.go:29 +0x80a
pgs-sisyphus_sisyphusworker.1.kry1r9x8vcdg@ | etcd
pgs-sisyphus_sisyphusworker.1.kry1r9x8vcdg@ | 2379
Необходимо проверить статус работы сервиса RabbitMQ с помощью команды:
docker service ps pgsrabbitmq_rabbitmq --format \
'table {{.Name}}\t{{.DesiredState}}'
Пример ответа:
NAME DESIRED STATE
pgs-rabbitmq_rabbitmq.1 Running
Проверить, что журнал событий RabbitMQ содержит следующие сообщения:
Try to reach pgs-rabbitmq_rabbitmq.3.yq5fexvo3q5g9afw5c8hkotkt
Try to reach pgs-rabbitmq_rabbitmq.3.yq5fexvo3q5g9afw5c8hkotkt
Try to reach pgs-rabbitmq_rabbitmq.3.yq5fexvo3q5g9afw5c8hkotkt
Try to reach pgs-rabbitmq_rabbitmq.3.yq5fexvo3q5g9afw5c8hkotkt
Try to reach pgs-rabbitmq_rabbitmq.3.yq5fexvo3q5g9afw5c8hkotkt
Try to reach pgs-rabbitmq_rabbitmq.3.yq5fexvo3q5g9afw5c8hkotkt
Решение:
1. Уменьшить количество репликаций для сервиса с помощью команды:
docker service scale pgs-rabbitmq_rabbitmq=1
2. Выполнить перезапуск последнего docker контейнера сервиса RabbitMQ
docker service update pgs-rabbitmq_rabbitmq --force
3. Проверить статус работы сервиса SisyphusWorker с помощью команды:
docker service ps pgs-sisyphus_sisyphusworker --format \
'table {{.Name}}t{{.DesiredState}}'
Пример ответа:
NAME DESIRED STATE
pgs-sisyphus_sisyphusworker.1 Running
pgs-sisyphus_sisyphusworker.2 Running
pgs-sisyphus_sisyphusworker.3 Running
4. Восстановить кластер для сервиса RabbitMQ с помощью команды:
docker service scale pgs-rabbitmq_rabbitmq=3