Cannot register runner through domain name #11649

Closed
opened 2025-11-02 09:43:27 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @yhan219 on GitHub (Sep 14, 2023).

Description

I have two server A and B, and a domain name gitea.mydomain.com, which DNS resolves to server A, and now I register action runner on both of my servers, and both have been successfully registered. But after running for a period of time, the runner on server A was offline, and then I failed to re-register. I changed the gitea url of server A's runner to the intranet ip of server A can register successfully, but not with gitea.mydomain.com. Could you tell me what I need to do?

my runner docker-compose.yml

version: "3"
services:
  runner:
    image: gitea/act_runner:latest
    container_name: gitea_runner
    restart: always
    environment:
      CONFIG_FILE: /config.yaml
      GITEA_INSTANCE_URL: "https://gitea.mydomain.com"
#      GITEA_INSTANCE_URL: "http://ip:3000"
      GITEA_RUNNER_REGISTRATION_TOKEN: "my token"
      GITEA_RUNNER_NAME: "my-runner"
      GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
    volumes:
      - ./config.yaml:/config.yaml
      - ./data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "8088:8088"

my runner log:

time="2023-09-13T10:32:34Z" level=info msg="Parallel tasks (0) below minimum, setting to 1"
[my ci/ci                ] Cleaning up services for job ci
[my ci/ci                ] Cleaning up container for job ci
[my ci/ci                ] [DEBUG] Removed container: 7935c3eb22a83258bf5d928369be6ffb751c64a694c2ab8687820725749464c7
[my ci/ci                ] [DEBUG]   🐳  docker volume rm GITEA-ACTIONS-TASK-87_WORKFLOW-api_JOB-ci
[my ci/ci                ] [DEBUG]   🐳  docker volume rm GITEA-ACTIONS-TASK-87_WORKFLOW-api_JOB-ci-env
[my ci/ci                ] Cleaning up network for job ci, and network name is: GITEA-ACTIONS-TASK-87_WORKFLOW-api_JOB-ci-network
[my ci/ci                ] 🏁  Job failed
time="2023-09-13T11:00:03Z" level=error msg="failed to fetch task" error="permission_denied: 403 Forbidden"
time="2023-09-13T11:00:05Z" level=error msg="failed to fetch task" error="permission_denied: 403 Forbidden"

Please note that it was normal at 10:32, but was suddenly offline at 11:00. Later I deleted runner and failed to re-register.And the runner on server B is always normal.

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

centos7

How are you running Gitea?

run with docker compose:

version: "3"

networks:
  gitea:
    external: false

services:
  server:
    image: gitea/gitea:1.20.4
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - GITEA__database__DB_TYPE=mysql
      - GITEA__database__HOST=ip:3306
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=password
    restart: always
    networks:
      - gitea
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3000:3000"
      - "10222:22"

Database

MySQL/MariaDB

Originally created by @yhan219 on GitHub (Sep 14, 2023). ### Description I have two server A and B, and a domain name gitea.mydomain.com, which DNS resolves to server A, and now I register action runner on both of my servers, and both have been successfully registered. But after running for a period of time, the runner on server A was offline, and then I failed to re-register. I changed the gitea url of server A's runner to the intranet ip of server A can register successfully, but not with gitea.mydomain.com. Could you tell me what I need to do? my runner docker-compose.yml ``` version: "3" services: runner: image: gitea/act_runner:latest container_name: gitea_runner restart: always environment: CONFIG_FILE: /config.yaml GITEA_INSTANCE_URL: "https://gitea.mydomain.com" # GITEA_INSTANCE_URL: "http://ip:3000" GITEA_RUNNER_REGISTRATION_TOKEN: "my token" GITEA_RUNNER_NAME: "my-runner" GITEA_RUNNER_LABELS: "${RUNNER_LABELS}" volumes: - ./config.yaml:/config.yaml - ./data:/data - /var/run/docker.sock:/var/run/docker.sock ports: - "8088:8088" ``` my runner log: ``` time="2023-09-13T10:32:34Z" level=info msg="Parallel tasks (0) below minimum, setting to 1" [my ci/ci ] Cleaning up services for job ci [my ci/ci ] Cleaning up container for job ci [my ci/ci ] [DEBUG] Removed container: 7935c3eb22a83258bf5d928369be6ffb751c64a694c2ab8687820725749464c7 [my ci/ci ] [DEBUG] 🐳 docker volume rm GITEA-ACTIONS-TASK-87_WORKFLOW-api_JOB-ci [my ci/ci ] [DEBUG] 🐳 docker volume rm GITEA-ACTIONS-TASK-87_WORKFLOW-api_JOB-ci-env [my ci/ci ] Cleaning up network for job ci, and network name is: GITEA-ACTIONS-TASK-87_WORKFLOW-api_JOB-ci-network [my ci/ci ] 🏁 Job failed time="2023-09-13T11:00:03Z" level=error msg="failed to fetch task" error="permission_denied: 403 Forbidden" time="2023-09-13T11:00:05Z" level=error msg="failed to fetch task" error="permission_denied: 403 Forbidden" ``` Please note that it was normal at 10:32, but was suddenly offline at 11:00. Later I deleted runner and failed to re-register.And the runner on server B is always normal. ### Gitea Version 1.20.4 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System centos7 ### How are you running Gitea? run with docker compose: ``` version: "3" networks: gitea: external: false services: server: image: gitea/gitea:1.20.4 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=ip:3306 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=password restart: always networks: - gitea volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "10222:22" ``` ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 09:43:27 -06:00
Author
Owner

@yhan219 commented on GitHub (Sep 14, 2023):

I know my problem. Docker push has been blocked by cloud vendors' firewalls too many times. Thank you

@yhan219 commented on GitHub (Sep 14, 2023): I know my problem. Docker push has been blocked by cloud vendors' firewalls too many times. Thank you
Author
Owner

@yhan219 commented on GitHub (Sep 14, 2023):

After solving the firewall problem, I still can't register. After I enter the runner container, I delete the / data/.runner file and restart runner to solve this problem.

@yhan219 commented on GitHub (Sep 14, 2023): After solving the firewall problem, I still can't register. After I enter the runner container, I delete the / data/.runner file and restart runner to solve this problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11649