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

Intermitttent Issue : dial tcp <ip>:22: connect: connection refused #369

Open
swapnilmarotidukare-tomtom opened this issue Mar 5, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@swapnilmarotidukare-tomtom
Copy link

swapnilmarotidukare-tomtom commented Mar 5, 2025

Describe the bug

We are intermittently encountering an issue where we are unable to connect to a VM. Before attempting to connect, we proactively check whether the machine is online. Only if it is online do we proceed with the connection using the SSH GitHub Action. Despite these precautions, the issue occurs occasionally, but it mostly resolves after a rerun.

Error we get

Image

Yaml Config

Please post your Yaml configuration file along with the output results.

      - name: Wait for machine to be online
        run: |
          while ! nc -w10 -z -v $vmIpAddress 22;do echo "Waiting for machine to be online..."; done
        id: vm_ip_address   

      - name: Exporting variables to bash profile
        uses: appleboy/ssh-action@master
        with:
          command_timeout: 60m
          host: ${{ steps.vm_ip_address.outputs.IP_ADDRESS }}
          username: azureuser
          key: ${{ secrets.PRIVATE_KEY }}
          port: 22
          script: |
              HOME_DIR="/home/azureuser"

Image

Related environment

Please provide the following information:

  1. Your hosting provider information, such as DigitalOcean, Linode, AWS, or GCP.
    • Azure
  2. The version information of your host's SSH service.
  3. The information from your host's SSH configuration file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants