[GH-ISSUE #1410] System has not been booted with systemd as init system #740

Closed
opened 2026-03-01 21:45:58 +03:00 by kerem · 1 comment
Owner

Originally created by @Loic-Hakisa on GitHub (Oct 24, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1410

Bug report info

act version:            0.2.32
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:
        /home/crazycat/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.19.1
        Module path:           command-line-arguments
        Main version:
        Main path:
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.32
                CGO_ENABLED:          1
                CGO_CFLAGS:
                CGO_CPPFLAGS:
                CGO_CXXFLAGS:
                CGO_LDFLAGS:
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
Docker Engine:
        Engine version:        20.10.20
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.68.1-microsoft-standard-WSL2
        OS CPU:                16
        OS memory:             7626 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act -j Test-Deployment

Describe issue

Tried on WSL2 & Ubuntu without WSL, get same problem...

Running the "Get docker" or "Set timezone" steps, I always get this error :
System has not been booted with systemd as init system (PID 1). Can't operate.
| Failed to connect to bus: Host is down

Other steps are running fine.

Any idea ?
It seems I can workaround this workflow without these steps, but want to understand the problem, I think I will get it on other workflows...

No response

Workflow content

name: Test Deployment
on:
  workflow_dispatch:
    inputs:
      environment:
        description: "Define env name"
        required: true
        default: "staging"

jobs:
  Test-Deployment:
    name: 🧱 Test Building Docker (PHP ${{ matrix.php-version }})
    timeout-minutes: 20
    runs-on: ubuntu-20.04

    strategy:
      fail-fast: true
      matrix:
        php-version: ["8.1"]
    steps:
      # —— Setup Github actions 🐙 —————————————————————————————————————————————
      - name: 🐙 Get github action Checkout
        uses: actions/checkout@v3
        with:
          persist-credentials: false
          fetch-depth: 0

      - name: 🌴 Current Branch name
        run: echo running on branch ${GITHUB_REF##*/}


      - name: 🐙 Get docker
        uses: docker-practice/actions-setup-docker@master

      # —— Prepare building 🧙‍️ —————————————————————————————————————————————————————————

      - name: 🕑 Set timezone
        run: |
          sudo timedatectl set-timezone Europe/Paris
          date

      - name: ⏱️ Get timestamp
        uses: gerred/actions/current-time@master
        id: current-time

      - name: حلال Run string replace
        uses: frabert/replace-string-action@master
        id: format-time
        with:
          pattern: '[:\.]+'
          string: "${{ steps.current-time.outputs.time }}"
          replace-with: "-"
          flags: "g"

      # —— DBuild Images 🏗️ ——————————————————————————————————————————————————————————

      - name: 🏗️ Build docker images
        run: |
          set -x
          echo "----Build images----"
          docker build -t php:${{ steps.format-time.outputs.replaced }} --target php .
          docker build -t web:${{ steps.format-time.outputs.replaced }} --target web .

      - name: 💸 Images created !
        run: echo Docker images are build with tag ${{ steps.format-time.outputs.replaced }}

Relevant log output

For "Get docker" step :
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   ❓  ::endgroup::
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   💬  ::debug::check docker systemd status
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   ❓  ::group::check docker systemd status
| [command]/usr/bin/sudo systemctl status docker
| System has not been booted with systemd as init system (PID 1). Can't operate.
| Failed to connect to bus: Host is down
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   ❗  ::error::Error: The process '/usr/bin/sudo' failed with exit code 1
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   ❌  Failure - Main 🐙 Get docker


For "Set timezone" step :
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ] ⭐ Run Main 🕑 Set timezone
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
| System has not been booted with systemd as init system (PID 1). Can't operate.
| Failed to create bus connection: Host is down
[Test Deployment/🧱 Test Building Docker (PHP 8.1)   ]   ❌  Failure - Main 🕑 Set timezone

Additional information

No response

Originally created by @Loic-Hakisa on GitHub (Oct 24, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1410 ### Bug report info ```plain text act version: 0.2.32 GOOS: linux GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/crazycat/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.19.1 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.32 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: linux GOAMD64: v1 Docker Engine: Engine version: 20.10.20 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.15.68.1-microsoft-standard-WSL2 OS CPU: 16 OS memory: 7626 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act -j Test-Deployment ``` ### Describe issue Tried on WSL2 & Ubuntu without WSL, get same problem... Running the "Get docker" or "Set timezone" steps, I always get this error : System has not been booted with systemd as init system (PID 1). Can't operate. | Failed to connect to bus: Host is down Other steps are running fine. Any idea ? It seems I can workaround this workflow without these steps, but want to understand the problem, I think I will get it on other workflows... ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Test Deployment on: workflow_dispatch: inputs: environment: description: "Define env name" required: true default: "staging" jobs: Test-Deployment: name: 🧱 Test Building Docker (PHP ${{ matrix.php-version }}) timeout-minutes: 20 runs-on: ubuntu-20.04 strategy: fail-fast: true matrix: php-version: ["8.1"] steps: # —— Setup Github actions 🐙 ————————————————————————————————————————————— - name: 🐙 Get github action Checkout uses: actions/checkout@v3 with: persist-credentials: false fetch-depth: 0 - name: 🌴 Current Branch name run: echo running on branch ${GITHUB_REF##*/} - name: 🐙 Get docker uses: docker-practice/actions-setup-docker@master # —— Prepare building 🧙‍️ ————————————————————————————————————————————————————————— - name: 🕑 Set timezone run: | sudo timedatectl set-timezone Europe/Paris date - name: ⏱️ Get timestamp uses: gerred/actions/current-time@master id: current-time - name: حلال Run string replace uses: frabert/replace-string-action@master id: format-time with: pattern: '[:\.]+' string: "${{ steps.current-time.outputs.time }}" replace-with: "-" flags: "g" # —— DBuild Images 🏗️ —————————————————————————————————————————————————————————— - name: 🏗️ Build docker images run: | set -x echo "----Build images----" docker build -t php:${{ steps.format-time.outputs.replaced }} --target php . docker build -t web:${{ steps.format-time.outputs.replaced }} --target web . - name: 💸 Images created ! run: echo Docker images are build with tag ${{ steps.format-time.outputs.replaced }} ``` ### Relevant log output ```sh For "Get docker" step : [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] ❓ ::endgroup:: [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] 💬 ::debug::check docker systemd status [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] ❓ ::group::check docker systemd status | [command]/usr/bin/sudo systemctl status docker | System has not been booted with systemd as init system (PID 1). Can't operate. | Failed to connect to bus: Host is down [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] ❗ ::error::Error: The process '/usr/bin/sudo' failed with exit code 1 [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] ❌ Failure - Main 🐙 Get docker For "Set timezone" step : [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] ⭐ Run Main 🕑 Set timezone [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir= | System has not been booted with systemd as init system (PID 1). Can't operate. | Failed to create bus connection: Host is down [Test Deployment/🧱 Test Building Docker (PHP 8.1) ] ❌ Failure - Main 🕑 Set timezone ``` ### Additional information _No response_
kerem 2026-03-01 21:45:58 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 24, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1325789816 --> @github-actions[bot] commented on GitHub (Nov 24, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#740
No description provided.