Score:0

Linode instance not responding to SSH/HTTP except when through GitHub Action

ml flag

I have a Linode instance configured to run Django with Apache, and it has been working fine for the last 6 months. The instance runs on Ubuntu on shared CPU, with the kernal being "Latest 64 bit (6.0.10-x86_64-linode158)". We also have a GitHub Action script that auto-deploys code on the main branch onto the server, and, as said, it has been working fine for the past 100+ deploys:

name: auto-deploy
on: [push]
jobs: 
  deploy: 
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'
    steps:
      - name: get-current-time
        uses: josStorer/[email protected]
        id: current-time
        with:
          format: YYYYMMDD-HH
          utcOffset: "+08:00"
      - name: deployment
        uses: appleboy/ssh-action@master
        with:
          host: <ip_address>
          username: root
          password: <password>
          script: |
            source /var/www/mysite/myenv/bin/activate
            mkdir -p /root/repository/${{ steps.current-time.outputs.formattedTime }}-${{ steps.current-time.outputs.hour }}-${{ steps.current-time.outputs.minute }}-${{ steps.current-time.outputs.second }}
            git clone [email protected]:zetria-org/backend.git /root/repository/${{ steps.current-time.outputs.formattedTime }}-${{ steps.current-time.outputs.hour }}-${{ steps.current-time.outputs.minute }}-${{ steps.current-time.outputs.second }}/mysite && sed -i 's/PRODUCTION = False/PRODUCTION = True/g' /root/repository/${{ steps.current-time.outputs.formattedTime }}-${{ steps.current-time.outputs.hour }}-${{ steps.current-time.outputs.minute }}-${{ steps.current-time.outputs.second }}/mysite/website_settings/settings.py 
            rm -rf /var/www/mysite/myenv/mysite/ && cp -r /root/repository/${{ steps.current-time.outputs.formattedTime }}-${{ steps.current-time.outputs.hour }}-${{ steps.current-time.outputs.minute }}-${{ steps.current-time.outputs.second }}/mysite/ /var/www/mysite/myenv
            chown -R www-data /var/www/mysite/myenv/mysite
            systemctl restart apache2

Normally, a successful deploy would display, for example, Cloning into '/root/repository/20230226-04-4-8-35/mysite'... in GitHub Action's running-job screen. Earlier today, SSH access to the server stopped working, after another such deploy. Also, the server stops responding to any HTTP requests.

So far, we have tried out methods indicated under this post, but none worked. According to Linode's documentation, the LISH console should be able to access the machine even if SSH connections are disabled, but numerous attempts to use the LISH console failed with an infinite loading screen, instead of an account/password prompt mentioned in Linode's documentation on LISH.

LISH console, SSH on local machines, and HTTP request all stopped working, which suggests to us that the server might have for some reason become unreachable after the last deploy. However, we made a few pushes to main again, triggering our GitHub Action, and found that through GitHub's server ssh to our Linode instance was successful.

We have also tried to ssh our server from different locations, NC and GA, but both locations didn't work. Does anyone have any idea why our Linode instance does not respond to our requests, but only respond to those sent through GitHub's server?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.