【问题标题】:Getting error in concourse hijack: Backend error: Exit status: 500在大厅劫持中出错:后端错误:退出状态:500
【发布时间】:2018-06-08 09:07:15
【问题描述】:

我在大厅工作时遇到以下错误:

劫持:后端错误:退出状态:500,消息: {"Type":"","Message":"runc exec: 退出状态 1: exec 失败: container_linux.go:264: 启动容器进程导致\"exec: \\"./task-scripts/task_show_uname.sh\\": 统计 ./task-scripts/task_show_uname.sh:没有这样的文件或 目录\"\n","句柄":""}

我有一个task.yml:

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
- name: task-scripts

run:
  path: ./task-scripts/task_show_uname.sh

***************

task_show_uname.sh runs a simple "uname -a" command.

***************

pipeline.yml 看起来像:

resources:
- name: resource-tutorial
  type: git
  source:
    uri: https://github.com/manmohan1391/concourse-tutorial.git
    branch: master

jobs:
- name: job-hello-world
  public: true
  plan:
  - task: hello-world
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      run:
        path: echo
        args:
        - hello world

- name: scripts
  public: true
  plan:
  - get: resource-tutorial
  - task: script-hello
    file: resource-tutorial/tutorials/basic/task-scripts/task_show_uname.yml

有什么想法吗?

【问题讨论】:

  • 请在问题中包含相关代码,而不是指向您的 github master 的链接,因为这会改变,阻止人们从这个问题中学习。

标签: cloud-foundry concourse concourse-git-resource cf-bosh


【解决方案1】:

如果您的管道变为橙色而不是红色,则表示劫持未能创建并且您无法劫持它。在问题中查看您的任务 yml:

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
- name: task-scripts

run:
  path: ./task-scripts/task_show_uname.sh

根据您的管道定义,它应该看起来像这样:

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
- name: resource-tutorial

run:
  path: resource-tutorial/tutorials/basic/task-scripts/task_show_uname.sh

【讨论】:

    【解决方案2】:

    你是如何试图运行劫持的?看起来你正试图让你的脚本而不是 shell 运行。 hijack 命令默认尝试运行 bash,如果 docker 映像没有 bash,则只需 hijack run 'sh'。

    【讨论】:

      猜你喜欢
      • 2018-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-05
      • 2022-08-07
      • 1970-01-01
      • 1970-01-01
      • 2020-05-13
      相关资源
      最近更新 更多