semaphoreui / semaphore

Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools.
https://semaphoreui.com
MIT License
10.69k stars 1.07k forks source link

Problem: Could not resolve host: github.com exit status 128 #2297

Open Azim-js opened 3 months ago

Azim-js commented 3 months ago

Issue

I am able to clone the repo within the container of semaphore but from the task template it fails : But withing the container i am able to

image

it says couldn't resolve host name github.com with exit status 128

image

Impact

Ansible (task execution), Docker, Semaphore Project

Installation method

Docker

Database

MySQL

Browser

Chrome

Semaphore Version

semaphoreui/semaphore:v2.10.23-beta and latest tags

Ansible Version

ansible --version
ansible [core 2.16.9]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/semaphore/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/semaphore/apps/ansible/9.4.0/venv/lib/python3.11/site-packages/ansible
  ansible collection location = /home/semaphore/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/semaphore/apps/ansible/9.4.0/venv/bin/ansible
  python version = 3.11.9 (main, Apr 14 2024, 13:40:00) [GCC 13.2.1 20231014] (/opt/semaphore/apps/ansible/9.4.0/venv/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Logs & errors

No response

Manual installation - system information

Did docker-compose installation

Configuration

No response

Additional information

No response

SRF-rueeggdo commented 2 months ago

Were you able to solve your problem? I have exactly the same problem here. My semaphore instance is installed directly on my RHEL 9 instance. The Traggic is routed via a proxy server, but if I clone the public Git repo directly on the command line this works without any problems. So I assume that the problem is with the semaphore directly.

11:30:27 AM
Task 12 added to queue
11:30:29 AM
Started: 12
11:30:29 AM
Run TaskRunner with template: Create Switch Config
11:30:29 AM
Preparing: 12
11:32:41 AM
fatal: unable to access 'https://github.com/mmz-srf/ansible-automation.git/': Failed to connect to github.com port 443: Connection timed out
11:32:41 AM
Cloning Repository https://github.com/mmz-srf/ansible-automation.git
11:32:41 AM
Cloning into 'repository_2_5'...
11:34:52 AM
fatal: unable to access 'https://github.com/mmz-srf/ansible-automation.git/': Failed to connect to github.com port 443: Connection timed out
11:34:52 AM
Failed updating repository: exit status 128
11:34:52 AM
Running app failed: exit status 128
Azim-js commented 2 months ago

I ran the container in wsl2 i prolly think its something related to the network or the git in the semaphore :/

eralumin commented 2 months ago

Same issue here, don't know why since some tests works fully on semaphore docker container: image

I tried the ssh key and it works too.