问题
I'm following Stark & Wayne tutorial and got into a problem:
Pipeline fails with
hijack: Backend error: Exit status: 500, message {"Type":"","Message": "
runc exec: exit status 1: exec failed: container_linux.go:247:
starting container process caused \"exec format error\"\n","Handle":""}
I have one git
resource and one job with one task:
- task: test
file: resource-ci/ci/test.yml
test.yml file:
platform: linux
image_resource:
type: docker-image
source:
repository: busybox
tag: latest
inputs:
- name: resource-tool
run:
path: resource-tool/scripts/deploy.sh
deploy.sh
is simple dummy file with one echo
command
echo [+] Testing in the process ...
So what could it be?
回答1:
This error means that the shell it's trying to invoke in your script is unavailable on the container running your task.
Busybox doesn't come with bash, it only comes with /bin/sh
, check the shebang in deploy.sh
, making sure it looks like:
#!/bin/sh
# rest of script
回答2:
I also ran into this error when I forgot to add a !
at the top of my pipelines shell script:
#/bin/bash
# rest of script
回答3:
I am new in the community, I am working with concourse and I have the next issue running a yml file in terminal using fly:
command $: sudo fly -t ci execute -c task.yml
initializing
Backend error: Exit status: 500, message: {"Type":"","Message":"runc exec: exit status 1: exec failed: container_linux.go:348: starting container process caused \"chdir to cwd (\\\"/root\\\") set in config.json failed: permission denied\"\n","Handle":"","ProcessID":""}
errored
please if anyone can help me!
来源:https://stackoverflow.com/questions/42816539/pipeline-fails-due-to-hijack-backend-error