gitlab-runner: не удалось подключиться к локальному порту 80: отказано в подключении - PullRequest
0 голосов
/ 29 января 2019

У меня gitlab работает на docker контейнере.Кроме того, на моем компьютере Cenots7 установлено gitlab-runner.Сканер настроил использование docker executor.

config.toml

concurrent = 1                                                                                                          
check_interval = 0                                                                                                      


[session_server]                                                                                                        
  session_timeout = 1800                                                                                                

[[runners]]                                                                                                             
  name = "test"                                                                                                         
  url = "http://localhost"                                                                                              
  token = "gQfiiD4PUyPs4TiXLX9-"                                                                                        
  executor = "docker"                                                                                                   
  log_level = "debug"                                                                                                   
  pre_clone_script = "ls -la"                                                                                           
  clone_url = "http://localhost/"                                                                                       
  [runners.docker]                                                                                                      
    tls_verify = false                                                                                                  
    image = "node"                                                                                       
    privileged = false                                                                                                  
    disable_entrypoint_overwrite = false                                                                                
    oom_kill_disable = false                                                                                            
    disable_cache = false                                                                                               
    volumes = ["/cache"]                                                                                                
    shm_size = 0                                                                                                        
    # network_mode = "gitlab_default"                                                                                   
    # pull_policy = "never"                                                                                            
  [runners.cache]                                                                                                       
    [runners.cache.s3]                                                                                                     
    [runners.cache.gcs]

Когда бегун принимает задание, он не может клонировать репозиторий и ошибку печати:

Cloning repository...
Cloning into '/builds/root/project'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@localhost/root/project.git/': Failed to connect to localhost port 80: Connection refused
/bin/bash: line 64: cd: /builds/root/project: No such file or directory
ERROR: Job failed: exit code 1

также я пытался: clone_url = "http://172.17.0.1", но получаю ту же ошибку

ping от исполнителя Docker:

ping 172.17.0.1
PING 172.17.0.1 (172.17.0.1): 56 data bytes
64 bytes from 172.17.0.1: seq=0 ttl=64 time=0.158 ms
64 bytes from 172.17.0.1: seq=1 ttl=64 time=0.090 ms
64 bytes from 172.17.0.1: seq=2 ttl=64 time=0.086 ms
64 bytes from 172.17.0.1: seq=3 ttl=64 time=0.084 ms
64 bytes from 172.17.0.1: seq=4 ttl=64 time=0.086 ms
64 bytes from 172.17.0.1: seq=5 ttl=64 time=0.087 ms
64 bytes from 172.17.0.1: seq=6 ttl=64 time=0.087 ms
64 bytes from 172.17.0.1: seq=7 ttl=64 time=0.109 ms
64 bytes from 172.17.0.1: seq=8 ttl=64 time=0.089 ms
64 bytes from 172.17.0.1: seq=9 ttl=64 time=0.088 ms
64 bytes from 172.17.0.1: seq=10 ttl=64 time=0.098 ms
64 bytes from 172.17.0.1: seq=11 ttl=64 time=0.088 m
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...