bazooka-ci / bazooka

Continuous Integration and Continuous Deployment Server
http://docs.bazooka-ci.io/
MIT License
60 stars 5 forks source link

Invalid memory access when trying to start a job #154

Closed lpereir4 closed 9 years ago

lpereir4 commented 9 years ago

Here is the output of the command :

./bzk job start test dev
2015/04/18 08:07:20 Expected HTTP response code [202] when accessing URL(http://xxx.xxx.xxx.xxx:8000/api/project/test/job); got 500 instead with the following body:
{"error_code":500,"error_msg":"runtime error: invalid memory address or nil pointer dereference"}

You will find bellow the bazooka server log associated

retrieve users: []*bazooka.User{}
Key: &{7c0f3eed2b5557c81d3ccd3366403ea2 BpLnfgDsc2WD8F2qNfHK5a84jjJkwzDk 2084ec349991b5dd39bb9884d5af31cf}
found

My config file

auth: Og==
server_uri: http://xxx.xxx.xxx.xxx:8000/api
home: /root/bazooka
docker_sock: /var/run/docker.sock
scm_key: /root/.ssh/lucien-gitlab
jawher commented 9 years ago

This error is caused by an empty .bazooka.yml file.

The job should error with a more user-friendly message instead of the message you got.

Thanks for reporting this issue.

jawher commented 9 years ago

This issue was indirectly fixed by #114.

Instead of a panic, the logs now contains:

One of 'language' or 'image' needs to be set