Stuck in Learn Chef Rally

#1

I am taking the self paced training and I am stuck. I installed Docker and got it running. Opening the bash window seems to work fine as I get the following:
Agent pid 22
Identity added: .ssh/try-chef.key (.ssh/try-chef.key)

When I issue the command "chef-run web1 file hello.txt" I get the following:

CHEFINT001

An unexpected error has occurred:

Failed to generate Policyfile.lock

If you are not able to resolve this issue, please contact Chef support
at beta@chef.io and include the log file and stack trace from the
locations below:

/root/.chef-workstation/logs/default.log
/root/.chef-workstation/logs/stack-trace.log

I have never used chef or docker before today, so saying I am new is an understatement. I don't even know how to get those logs and send them to beta@chef.io. Any help that can be offered will be appreciated as I can't move to the next step in the training until I get this to work. Thanks in advance!

#2

Hi Chris, which activity are you stuck on on the Chef Rally? Please could you provide a link.

#3

The URL is https://learn.chef.io/modules/try-chef#/.
I am on step "3. Basic Ingredients".

I run this command:
chef-run web1 file hello.txt

And here is the output:
CHEFINT001

An unexpected error has occurred:

Failed to generate Policyfile.lock

If you are not able to resolve this issue, please contact Chef support
at beta@chef.io and include the log file and stack trace from the
locations below:

/root/.chef-workstation/logs/default.log
/root/.chef-workstation/logs/stack-trace.log

#4

I'm having the same issue on my system. Stuck running chef-run web1 file hello.txt with the same error on step 3 "Basic Ingredients" for URL https://learn.chef.io/modules/try-chef#/ .

#5

I am having the exact same issue. Got really excited about starting to learn Chef with this self paced course and hit a roadblock within the first 15 minutes. I already had Docker installed so didn't really have any issues there. Was able to setup the containers and also got into the workstation.
Ran the command $ chef-run web1 file hello.txt content='Hello World!'
Got the following output:
CHEFINT001

An unexpected error has occurred:

Failed to generate Policyfile.lock

If you are not able to resolve this issue, please contact Chef support
at beta@chef.io and include the log file and stack trace from the
locations below:

/root/.chef-workstation/logs/default.log
/root/.chef-workstation/logs/stack-trace.log

help please! :frowning:

#6

I was able to resolve this issue.
Apparently, even though docker says that the proxy settings get automatically propagated to any of the containers that are created but I don't really see that to be the case. I had to manually set proxy in the workstation container by :
export http_proxy=example.proxy.com:port
export https_proxy=example.proxy.com:port