Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to reach internet from github actions virtual environment #1519

Closed
2 of 6 tasks
OptiMous28 opened this issue Aug 30, 2020 · 9 comments
Closed
2 of 6 tasks

Unable to reach internet from github actions virtual environment #1519

OptiMous28 opened this issue Aug 30, 2020 · 9 comments
Assignees
Labels
Area: Deployment / Release investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@OptiMous28
Copy link

Description
Despite no changes being made to my github actions, my actions can no longer deploy to my server, Upon further investigation, i found that the virtual environment is no longer able to reach my target server. I went and inspected my server and everything seemed fine. I then decided to run some connectivity tests from the github action to google to see if it can reach that. Unfortunately it wasn't even able to reach that.

Current runner version: '2.273.0'
Operating System
  Ubuntu
  18.04.5
  LTS
Virtual Environment
  Environment: ubuntu-18.04
  Version: 20200817.1
  Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20200817.1/images/linux/Ubuntu1804-README.md

Ping from github action:

ping -c 10 google.com
PING google.com (172.217.2.110) 56(84) bytes of data.

--- google.com ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9199ms

Area for Triage:
Git

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
Previously, i was able to reach the internet and deploy to my server. I expect the virtual environment to have outbound connectivity to the internet.

Actual behavior
github action virtual environment has no access to the internet.

Repro steps
A description with steps to reproduce the issue. If your have a public example or repo to share,
please provide the link.

Ignore the bad indentations on below workflow file, copy and pasting didn't work too great. Simply run any github action using ubuntu-latest or v20 and you'll find no connectivity to the internet.

name: CI/CD

on:
  push:
    branches: [ master ]

jobs:
deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: 'master'
      - name: Test Connectivity
        run: |
          ping -c 10 google.com
@dibir-magomedsaygitov dibir-magomedsaygitov added OS: Ubuntu investigate Collect additional information, like space on disk, other tool incompatibilities etc. Area: Deployment / Release and removed needs triage labels Aug 31, 2020
@andy-mishechkin andy-mishechkin self-assigned this Aug 31, 2020
@andy-mishechkin
Copy link
Contributor

Hello, @mous2890
GitHub runners are placed in Azure. Ping doesn't work in azure by design.
May you provide some details about your issue - what network operation you want to perform on your server from Github Actions ?
Also would you please provide the link to your workflow, where you've got the network issue ?

Thank you.

@OptiMous28
Copy link
Author

Hi @andy-mishechkin

Thanks for your time looking into this and following this up with me.

This is a private repo so unsure how you'd be able to see the action but here's the link anyway:
https://github.com/mous2890/kick-about/runs/1047592259?check_suite_focus=true

The network operation that is currently failing is ssh'ing to the target server: kick-about.uk

nslookup kick-about.uk
Non-authoritative answer:
Name:   kick-about.uk
Address: 87.81.151.107

I use ansible to automate my deployment from github actions. Previously, this has always worked and successfully deployed my application a number of times using the same actions workflow. The error you see below is from the latest run (link above) which is the ansible output.

Job: Deploy

Log from the job:

Run pipeline/cd.sh deploy-app
Using /etc/ansible/ansible.cfg as config file

PLAY [prod] ********************************************************************

TASK [Gathering Facts] *********************************************************
fatal: [autobots]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host kick-about.uk port 22: Connection timed out", "unreachable": true}

PLAY RECAP *********************************************************************
autobots                   : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   

##[error]Process completed with exit code 4.

If you need anything else, please let me know! Thanks.

@al-cheb
Copy link
Contributor

al-cheb commented Aug 31, 2020

@mous2890, Could you please use site https://sshcheck.com/ to check ssh connection to the kick-about.uk host?

image

@OptiMous28
Copy link
Author

Hi @al-cheb

I tested just now and received the same result as you which is odd. The server is untouched for months.

I ran another test on another website which had the same result as well.

Possibly my machine was affected by the outage and hasn't recovered. I'll close down this issue and investigate further from my end.

Thank you for your help!

@aquibbaig
Copy link

@mous2890 Any updates on this? I am facing a similar issue where the ping command is not working. I installed the ping command before this step and it always returns 100% packet loss. (resulting in exit code 1)

Run ping -c 4 www.google.co.in
PING www.google.co.in (172.217.7.163) 56(84) bytes of data.

--- www.google.co.in ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3079ms

@catthehacker
Copy link
Contributor

@aquibbaig

GitHub runners are placed in Azure. Ping doesn't work in azure by design.

@aquibbaig
Copy link

Hi @catthehacker! Apologies for the late reply. Do you think using "self-hosted runners" could be the way to go?

@maxim-lobanov
Copy link
Contributor

@aquibbaig , it depends on the place where your self-hosted runner will be located.
If it is located in Azure, you will face with the same issue.
If it is located anywhere outside Azure or even physical machine, it should work.

@aquibbaig
Copy link

@maxim-lobanov I see, thanks a ton!

learnitall added a commit to learnitall/benchmark-wrapper that referenced this issue Jul 19, 2021
gagbo added a commit to LedgerHQ/lib-ledger-core that referenced this issue Aug 30, 2021
manugarg added a commit to cloudprober/cloudprober that referenced this issue Mar 30, 2022
* This test will run only if ENABLE_EXTERNAL_TESTS environment variable is set.

* Since we are adding a ping test, and apparently github actions doesn't support [ping](actions/runner-images#1519 (comment)), we're not adding these tests to Github Actions yet.
zaiste added a commit to saleor/cli that referenced this issue Oct 4, 2022
zaiste added a commit to saleor/cli that referenced this issue Oct 7, 2022
LebJe added a commit to LebJe/cpp-icmplib that referenced this issue Oct 17, 2022
HakurouKen added a commit to HakurouKen/free-node that referenced this issue Dec 18, 2022
conectado added a commit to firezone/firezone that referenced this issue Jan 10, 2024
the way we were checking for subdomains in the gateways completely
broke, didn't detect it before because the deployed staging version for
gateways is too old.

~~Added a few CI tests so this doesn't' happen again.~~ seems like
github runners [doesn't support pinging the outside
world](actions/runner-images#1519) so I'm
putting that off for now.
vipulgupta2048 added a commit to balena-os/meta-balena that referenced this issue Apr 5, 2024
This change is required to migrate existing tests to run QEMU worker tests on GitHub Actions.
GitHub hosted runners can't run the `ping` command: actions/runner-images#1519 by design.
If we still intend to use `ping`, the solution would be running QEMU worker tests on self-hosted runners which allow ICMP packets

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
vipulgupta2048 added a commit to balena-os/meta-balena that referenced this issue Apr 8, 2024
This change is required to migrate existing tests to run QEMU worker tests on GitHub Actions.
GitHub hosted runners can't run the `ping` command: actions/runner-images#1519 by design.
If we still intend to use `ping`, the solution would be running QEMU worker tests on self-hosted runners which allow ICMP packets

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
vipulgupta2048 added a commit to balena-os/meta-balena that referenced this issue Apr 9, 2024
This change is required to migrate existing tests to run QEMU worker tests on GitHub Actions.
GitHub hosted runners can't run the `ping` command: actions/runner-images#1519 by design.
If we still intend to use `ping`, the solution would be running QEMU worker tests on self-hosted runners which allow ICMP packets

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
vipulgupta2048 added a commit to balena-os/meta-balena that referenced this issue Apr 17, 2024
This change is required to migrate existing tests to run QEMU worker tests on GitHub Actions.
GitHub hosted runners can't run the `ping` command: actions/runner-images#1519 by design.
If we still intend to use `ping`, the solution would be running QEMU worker tests on self-hosted runners which allow ICMP packets

Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
vmvartiainen added a commit to vahadigital/gh-actions-testing that referenced this issue Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Deployment / Release investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

7 participants