Todos os produtos
Search
Central de documentação

Alibaba Cloud DevOps:Solucionar problemas de implantações em host

Última atualização: Jul 10, 2026

Este tópico descreve problemas comuns e soluções para instalação e implantação em host com o Alibaba Cloud DevOps.

Problemas no agente de host — Flow Runner

Solucionar problemas do Flow Runner

Importante

Antes de solucionar problemas relacionados a implantações em host ou provisionamento de ambiente para máquinas de build privadas, verifique primeiro o status do Flow Runner na máquina.

Utilizar a ferramenta de diagnóstico

Esta ferramenta suporta apenas sistemas Linux.

  1. Baixe a ferramenta:

    wget "https://rdc-public-software.oss-cn-hangzhou.aliyuncs.com/runner/runnerStatusCheck" -O runnerStatusCheck
  2. Conceda permissões de execução:

    chmod u+x runnerStatusCheck
  3. Execute a ferramenta:

    ./runnerStatusCheck
  4. Siga as instruções na saída da ferramenta, conforme mostrado no exemplo abaixo.

    [INFO] prepare to check disk
    check disk output
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root        99G   59G   36G  62% /
    devtmpfs        3.7G     0  3.7G   0% /dev
    tmpfs           3.7G     0  3.7G   0% /dev/shm
    tmpfs           3.7G  600K  3.7G   1% /run
    tmpfs           3.7G     0  3.7G   0% /sys/fs/cgroup
    tmpfs           748M     0  748M   0% /run/user/0
    [INFO] prepare to check runner status
    RunnerService: runner-v0.0.7-be-1fy1ifhg1ylcvqv7rwinqpgh.service  status is active running
    RunnerService: runner-v0.0.7-be-3n5goas4jkp3clmcaopzeebj.service  status is active running
    RunnerService: runner-v0.0.7-be-6fcm3z72s2fsnrkcjl7pbpsa.service  status is not running , please exeute 'systemctl restart runner-v0.0.7-be-6fcm3z72s2fsnrkcjl7pbpsa.service ' to restart runner service
    RunnerService: runner-v0.0.7-be-7srpetjhkcy40btoontpsy8a.service  status is not running , please exeute 'systemctl restart runner-v0.0.7-be-7srpetjhkcy40btoontpsy8a.service ' to restart runner service
    RunnerService: runner-v0.0.7-be-7ypo76lza21lljapgp5xtopi.service  status is active running
    RunnerService: runner-v0.0.7-be-9zouh99ta6ycx2dq3iggekk9.service  status is not running , please exeute 'systemctl restart runner-v0.0.7-be-9zouh99ta6ycx2dq3iggekk9.service ' to restart runner service
    RunnerService: runner-v0.0.7-be-ao81clhgw56bo0jopj5jgwn3.service  status is active running
    RunnerService: runner-v0.0.7-be-bn9wuh8n4kiba0aa0a8dcirb.service  status is active running
    RunnerService: runner-v0.0.7-be-fsr2gvdefe5yxl3nyijp36d3.service  status is active running
    RunnerService: runner-v0.0.7-be-haphfbrhuudbxkzwpcuhn0hk.service  status is not running , please exeute 'systemctl restart runner-v0.0.7-be-haphfbrhuudbxkzwpcuhn0hk.service ' to restart runner service
    RunnerService: runner-v0.0.7-be-mwkcqcv2hbwozrwmmczopzgm.service  status is active running
    RunnerService: runner-v0.0.7-be-qdiyjifmn0bbkafobtfpkrst.service  status is not running , please exeute 'systemctl restart runner-v0.0.7-be-qdiyjifmn0bbkafobtfpkrst.service ' to restart runner service
    RunnerService: runner-v0.0.7-be-qx6gaxojjjpzeblor692hrwk.service  status is active running
    RunnerService: runner-v0.0.7-be-s5f7tixziynazefazqhls9ob.service  status is active running
    RunnerService: runner-v0.0.7-be-uwdlmn516wd8emqebhgqwq6x.service  status is active running
    RunnerService: runner-v0.0.7-be-xjmxrlbzrtksuafv4oyg8qtf.service  status is active running
    Check runner service status finished.

Solução manual de problemas

  1. Verifique se a sua versão do Linux é suportada.

    Execute o comando lsb_release -a para verificar sua distribuição Linux. O Flow Runner unificado suporta as seguintes distribuições Linux:

    • CentOS 6+

    • Ubuntu 16.04+

    • Alibaba Cloud Linux 2/3

  2. Verifique o status e os logs do service do Flow Runner.

    Execute o comando ls -al /etc/systemd/system | grep runner para encontrar o nome do service. O nome do service geralmente segue o formato runner-{version}-{tenant-name}.service.

    [root@ecs-for-batch-deploy-1 ~]# lsb_release -a
    LSB Version:    :core-4.1-amd64:core-4.1-noarch
    Distributor ID: CentOS
    Description:    CentOS Linux release 8.2.2004 (Core)
    Release:        8.2.2004
    Codename:       Core
    [root@ecs-for-batch-deploy-1 ~]# ls -al /etc/systemd/system | grep runner
    -rw-r--r--    1 root root  550 Oct 11 10:50 runner-v0.xxx.service
    [root@ecs-for-batch-deploy-1 ~]#

    Execute o comando systemctl status runner-{version}-{tenant-name}.service para verificar o status do service. Se o status for active (running), o service está operando corretamente.

    Release:        8.2.2004
    Codename:       Core
    [root@ecs-for-batch-deploy-1 ~]# ls -al /etc/systemd/system | gr
    -rw-r--r--   1 root root  550 Oct 11 10:50 runner-v0.0.5-be-bnyxxx...yt.service
    [root@ecs-for-batch-deploy-1 ~]# systemctl status runner-v0.0.5-be-bnyxxx...yt.service
    ● runner-v0.0.5-be-bnxxx...yt.service - Aliyun yunxiao runner polling jo
         Loaded: loaded (/etc/systemd/system/runner-v0.xxx...yt.service)
         Active: active (running) since Tue 2022-10-11 10:50:56 CST; 2h ago
       Main PID: 1405243 (runner)
          Tasks: 10 (limit: 48875)
         Memory: 13.6M
         CGroup: /system.slice/runner-v0.0.5-be-brxxx...yt.service
                 └─1405243 /usr/local/share/yunxiao-runner/v0.0.5/runner run --configPath=/r...
    Oct 11 11:01:03 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:01:03+08:00]
    Oct 11 11:01:03 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:01:03+08:00]
    Oct 11 11:01:18 ecs-for-batch-deploy-1 runner[1405243]: WARN[2022-10-11T11:01:18+08:00]

    Para visualizar logs de execução em tempo real, execute o comando journalctl -u runner-{version}-{tenant-name}.service -a --no-pager --since '5 minutes ago' -f.

Falhas em implantações entre regiões

Ao implantar entre regiões geográficas (por exemplo, de Hong Kong (China) para a Malásia) pela Internet, podem ocorrer falhas na implantação devido à latência ou instabilidade da rede.

Além de verificar o status do Flow Runner e o espaço em disco, valide os seguintes pontos:

  1. Teste a latência da rede e a perda de pacotes do host de destino até o endpoint do service do Alibaba Cloud DevOps usando ping ou traceroute.

  2. Se a rede estiver instável, considere otimizar o link de rede ou usar uma conexão dedicada entre regiões para melhorar a confiabilidade.

Nenhum log gerado ou host offline durante build ou implantação

  • Execute df -hl para verificar se o disco do host está cheio. Se estiver, libere espaço e tente novamente.

  • Verifique o status do service Flow Runner. Se o status não for active(running), reinicie o service seguindo estas etapas:

    1. Obtenha o nome do service. O formato é runner-{version}-{tenant-name}.service.

      systemctl | grep "runner-v" | awk '{print $1}'
    2. Substitua $SERVICE_NAME no comando abaixo pelo nome do service e execute-o para reiniciar o service Flow Runner.

      systemctl restart $SERVICE_NAME
  • Verifique se há problemas de conectividade de rede.

    • Execute systemctl status runner-{version}-{tenant-name}.service para consultar o status do service Flow Runner e encontrar o parâmetro --configPath, conforme mostrado abaixo:

      [root@ecs-for-batch-deploy-1 ~]# systemctl status runner-v0.0.5-be-bnyxxx1llzpci0q606yt.service
      ● runner-v0.0.5-be-xxx...yt.service - Aliyun yunxiao runner polling jobs to execute
         Loaded: loaded (/etc/systemd/system/runner-v0.0.5-be-bxxx...yt.service; enabled; vendor preset: disabled)
         Active: active (running) since Tue 2022-10-11 10:50:56 CST; 41min ago
       Main PID: 1405243 (runner)
          Tasks: 10 (limit: 48875)
         Memory: 13.7M
         CGroup: /system.slice/runner-v0.0.5-be-bnyxxx...yt.service
                 └─1405243 /usr/local/share/yunxiao-runner/v0.0.5/runner run --configPath=/root/yunxiao/be-bnykv60t831llzpci0q606yt/runner/config
      Oct 11 11:31:46 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:31:46+08:00] [runner] no new job, skip.                    runner=9e7073c92b2fa8b35bc0efd3eec051f8
      Oct 11 11:31:46 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:31:46+08:00] counter current: 0, limit: 50
      Oct 11 11:32:01 ecs-for-batch-deploy-1 runner[1405243]: WARN[2022-10-11T11:32:01+08:00] Response status code: 204 body data:
      Oct 11 11:32:01 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:32:01+08:00] POST /api/v2/builds/request, time spent 15.07 s
      Oct 11 11:32:01 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:32:01+08:00] [runner] no new job, skip.                    runner=9e7073c92b2fa8b35bc0efd3eec051f8
      Oct 11 11:32:01 ecs-for-batch-deploy-1 runner[1405243]: INFO[2022-10-11T11:32:01+08:00] counter current: 0, limit: 50
      Oct 11 11:32:16 ecs-for-batch-deploy-1 runner[1405243]: WARN[2022-10-11T11:32:16+08:00] ...
    • Visualize a URL no configPath executando cat {PATH_TO_CONFIG}/config.yml | grep url.

      [root@ecs-for-batch-deploy-1 config]# cat /root/yunxiao/be-bnykv60t83lllzpci0q606yt/runner/config/config.yml | grep url
      url: https://xxx.com
      [root@ecs-for-batch-deploy-1 config]#
    • Execute o seguinte comando para verificar a acessibilidade da URL.

      # Note: Replace {url} in the command below with your actual URL.
      curl '{url}/api/v2/runner/storage/latest?os=linux&arch=amd64'

A implantação em host falha com erro MachineGroupNotHaveMachine

Esse erro indica que o grupo de implantação não possui máquinas disponíveis, portanto, a tarefa de implantação não pode ser enviada ao host de destino.

Para solucionar esse problema:

  1. No console do Alibaba Cloud DevOps, acesse a configuração da tarefa de implantação do pipeline e verifique se o grupo de implantação associado contém máquinas. Se o grupo de implantação estiver vazio, adicione primeiro os hosts de destino.

  2. Se o grupo de implantação já contiver máquinas, verifique se elas estão online. Se uma máquina estiver offline, faça login no servidor, verifique o status do service Runner e reinicie o service.

  3. Após confirmar que o grupo de implantação possui máquinas online disponíveis, acione novamente a tarefa de implantação.

Como evitar erros de requisições atingindo services durante a inicialização em uma implantação multi-nó?

O Alibaba Cloud DevOps não fornece controle de tráfego integrado durante as implantações. Para gerenciar o tráfego e evitar que requisições atinjam services que ainda estão iniciando, utilize a seguinte abordagem:

  1. Divida seus hosts em dois grupos de hosts e configure implantações sequenciais no pipeline. Isso controla a ordem de implantação e garante que um grupo esteja totalmente disponível antes que o outro seja atualizado.

  2. Use interceptação de requisições no nível do gateway ou configure regras de encaminhamento com o Application Load Balancer (ALB) para direcionar o tráfego para longe dos nós que ainda estão iniciando.