Questions tagged [knife]

Knife is a command line tool used to interface with Chef.

Filter by
Sorted by
Tagged with
0 votes
1 answer
971 views

chef: The authenticity of host 'x.x.x.x' can't be established

I'm running knife bootstrap command I'm getting following error Connecting to x.x.x.x WARN: [SSH] PTY requested: stderr will be merged into stdout The authenticity of host 'x.x.x.x ()' can't be ...
Jack's user avatar
  • 181
2 votes
1 answer
236 views

Chef Knife command - PowerShell "query session" failing with return code 1, although command is executed successfully

I am facing a peculiar problem in executing chef knife commands for PowerShell remotely. Command is executed successfully, however the return code is 1 with an error. > %CPath% && knife ...
goe's user avatar
  • 141
1 vote
1 answer
290 views

Show when a Chef cookbook version changed on a node using knife

The infrastructure that I am working on uses Chef environments to manage the cookbook versions that are converged to nodes. While I can use knife to check what cookbook versions are available, and ...
Garreth McDaid's user avatar
1 vote
2 answers
959 views

chef: knife deps - how to specify a cookbook version

RE: https://docs.chef.io/knife_deps.html With the knife deps --remote option, I can query our chef server. knife cookbook list -a will return all the cookbook versions. How can I use knife deps to ...
Kevin Buchs's user avatar
0 votes
1 answer
2k views

Unable to connect to chef-server

Cannot connect to the chef-server from a workstation. Tried command "knife node list" Network Error: Error connecting to https://<chef-server-address>/nodes - Failed to open TCP connection to &...
user421675's user avatar
1 vote
1 answer
53 views

Does chef knife ever need to directly access a node?

Does knife ever access nodes directly, for example, during bootstrapping? Or does bootstrapping (and other access) all go via the chef server? I'm wondering whether I can get away with configuring ...
Jordan Morris's user avatar
2 votes
0 answers
52 views

How to specify chef-client settings on bootstrap?

I'm trying to bootstrap nodes via knife. Executing: knife bootstrap user@server-1 -P XXX --sudo -N java-server-1 I found a bunch of properties in client.rb on the node side that I would like to ...
Silk0vsky's user avatar
  • 155
1 vote
0 answers
47 views

knife azure server list returns empty result

I'm trying to set up CHEF server and workstation on Ubuntu 16.04. I've followed several guides, and so far I'm able to get it to list the available images, but "knife azure server list" returns an ...
Bruce's user avatar
  • 21
0 votes
1 answer
149 views

Docker issues with Chef Container: "Not Found" error

I recently tried out the Chef Docker container at: https://hub.docker.com/r/chef/chef/ I downloaded it and ran the container using the following commands: docker pull "chef/chef:12.19.33" ...
curious_george's user avatar
0 votes
2 answers
7k views

Chef Private Key Could Not Be Loaded from /user.pem

I just finished the install chef-server tutorial at Chef's website, using an ec2 instance for my chef-server (t2.medium Ubuntu 16.04 AMI), and my laptop for my workstation, which also runs Ubuntu 16....
user avatar
0 votes
2 answers
4k views

How can I run chef-client remotely (windows to windows) without a password

I really hope I'm missing something here - because I'm starting to love Chef, but some pieces feel extremely stupid. I have a process (service) that runs under specific credentials. Those credentials ...
Timothy Khouri's user avatar
1 vote
0 answers
94 views

Combining cat with knife ssh crashes bash

I'm trying to transfer a ssh key from one node to other using chef's knife ssh combined with the cat command on the key cat ~/.ssh/001.rsa | knife ssh -i ~/.ssh/authkey.rsa 'name:myserver' 'mkdir -p ~...
Lucas Mattos's user avatar
0 votes
1 answer
308 views

Unable to connect to chef server

I have a Chef server running on AWS. I am able to connect to it via web browser and see the web ui from my machine which isn't the ec2. But when I bootstrap the node, also a ec2, it fails to connect ...
cberks's user avatar
  • 21
2 votes
2 answers
549 views

Does a Chef server need to be public?

I have a Chef server running on our local network and tested it with other machines on the same network and everything worked fine. I started up a ec2 instance, and try to bootstrap and it works until ...
cberks's user avatar
  • 21
0 votes
1 answer
447 views

knife ignores client_key in ~/.chef/knife.rb

I am getting errors like WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/client.pem> ERROR: Your private key could ...
chicks's user avatar
  • 3,793
3 votes
1 answer
15k views

How to manually set up a Chef node?

I have a Chef server running on Ubuntu 14.04 (see Note 1) and I can access the "Chef Manage" website by visiting the IP address (mychefserver.myorg.com) in my browser. I have a workstation running on ...
user avatar
0 votes
1 answer
4k views

Upload specific Chef cookbook version with knife?

Is it possible to upload an exact version of a Chef cookbook via knife? All I've seen is that knife will upload the latest version it can find. Is it possible to upload a specific version? ...
Stefhen's user avatar
  • 143
1 vote
1 answer
595 views

knife ssh node name wild card matching

I have a chef environment "dev", We are switching our continuous integration build environment from jenkins to bamboo. So we have a bunch of nodes names "jenkins_slave_??" and "bamboo_slave_?? I ...
peter cooke's user avatar
2 votes
2 answers
536 views

Knife not parsing JSON variable in PowerShell

I am trying to create an amazon EC2 instance using "knife ec2 server create" and passing in JSON to override the default settings by using the -j option where $json is properly formed JSON text and I ...
Neil Simon's user avatar
1 vote
1 answer
924 views

Knife data bag from file - is not creating encrypted file

I'm trying to create an encrypted databag. I'm using something like this as source { "id": "rds-2", "web": "adeasdeasde" } and I want the encrypted file to go on to data_bag/aws/rds-2.json, so ...
Pedro's user avatar
  • 281
0 votes
1 answer
110 views

Fixed: Knife create instance failing - ERROR: uninitialized constant Chef::Mixin::Command

I'm wondering if any of you guys have a clue on what is the problem here. I'm using Chef Knife EC2 plugin to create a new instance. After completing the ssh connection step, it seems to break on ...
Pedro's user avatar
  • 281
0 votes
2 answers
456 views

Can I uninstall a chef cookbook I installed with `knife cookbook site install`?

I have installed a chef cookbook with knife cookbook site install. But I don't want/need that one. Is it possible to uninstall a cookbook like this? To clean up my cookbooks directory?
Amandasaurus's user avatar
  • 31.6k
1 vote
1 answer
200 views

Knife EC2 in zero mode cannot gives TypeError when ssh comes up

I am using the following command to spin up a new EC2 instance: knife ec2 server create -I ami-f0b11187 --ssh-key "mykeyid" -f t2.micro --ssh-user ubuntu --identity-file ~/.ssh/mykey.pem -z --no-host-...
Ian Bamforth's user avatar
1 vote
1 answer
130 views

ec2: permission denied when trying to start instance with knife

I am working on getting knife to bring up ec2 instances: I copied the policy from [What permissions in IAM do i need to start EC2 instances with chef knife? I 'attached' the policy to a minimal user, ...
Mark McWiggins's user avatar
0 votes
1 answer
71 views

Run community chef cookbook [closed]

I want to configure a mailserver on AWS with this cookbook: https://supermarket.chef.io/cookbooks/postfix-dovecot I have chef-client and chef-dk installed. I have downloaded the package and changed ...
Luiz Gustavo F. Gama's user avatar
0 votes
0 answers
304 views

Chef: Cookbook website not found

I've been following several guides and read thru documentation trying to get knife-solo to provision a VM for me. Knife solo will work with Berkshelf (used to manage a library of chef cookbooks), so ...
Brian's user avatar
  • 240
4 votes
0 answers
1k views

Knife upload data bag fails with Chef::ChefFS::FileSystem::OperationNotAllowedError

I am currently doing the Chef tutorials provided at learn.chef.io. In the fourth workshop, one of the steps is to create some data bags and then upload them using: knife upload data-bags/vhosts The ...
Navin Surtani's user avatar
0 votes
0 answers
777 views

Invalid Redirect error when trying to create user in Chef Server 12

When I try to create a user in Chef Enterprise Server, I am getting an error sudo chef-server-ctl user-create admin m n ******@i&&&.com chefrocks --filename admin.pem ERROR: ...
Nina's user avatar
  • 1
0 votes
1 answer
425 views

How can I get the correct client.pem file on a bootstrapped Windows Azure VM?

I'm really struggling to bootstrap a Windows VM in Azure using knife azure. I have my image and I've created the winrm firewall rule and configured winrm per the instructions. The machine spins up ...
Chris's user avatar
  • 86
0 votes
1 answer
329 views

knife cookbook site downland with all dependencies

I'm just starting out with chef, and I'm following http://gettingstartedwithchef.com. One thing it suggests is using knife cookbook site download $COOKBOOK_NAME to get community cookbooks. However ...
Amandasaurus's user avatar
  • 31.6k
0 votes
1 answer
1k views

Is there a way to update attributes files directly in chef server without uploading cookbook again

I am using hosted chef environment in windows.I need to update the attribute file during each chef client run. Currently ,I update it manually and upload the cookbook in chef server.Is there any way ...
Nina's user avatar
  • 1
5 votes
3 answers
13k views

Chef - SSH without password

When executing: knife bootstrap {{IP}} --ssh-user centos --ssh-password '' \ --sudo --use-sudo-password --node-name node1 \ --run-list 'recipe[learn_chef_httpd]' I am getting the following error: ...
James McDougall's user avatar
1 vote
1 answer
334 views

Knife Vsphere Password Plain text

I'm using the knife-vsphere plugin for chef to interact with our vsphere hosts. As part of the config for the knife-vsphere plugin it seems that you have to enter a plain text password which I think ...
daark's user avatar
  • 113
3 votes
4 answers
2k views

Knife can't ssh into newly instantiated EC2 server

I just set up a new Chef environment as I'm currently expanding my knowledge of Chef. I have a Key Pair set up on EC2, I have my Knife configuration set up. When I attempt to spawn a server, the node ...
Ian Atkin's user avatar
  • 203
0 votes
1 answer
1k views

"unable to get local issuer certificate" in chef when using knife bootstrap with windows domain auth

I have a working installation of open source chef and am trying to add domain authentication to bootstrap Windows servers. I've created the HTTPS listener as described in the knife windows ...
Dan Hoerst's user avatar
1 vote
2 answers
436 views

Issues using knife bootstrap on FreeBSD 10

I'm fairly certain this is unrelated to my cookbook, since the following occurs immediately after connecting: 0.0.0.0 Unmatched '. 0.0.0.0 distro=FreeBSD: Command not found. 0.0.0.0 distro: Undefined ...
tony_perkis666's user avatar
0 votes
1 answer
976 views

Specifying SSH port with Chef, knife bootstrap

Per Chef's documentation, the -p (or --ssh-port) flag should allow me to specify an SSH port, however, the following: knife bootstrap host.com -x user -P password --ssh-port 5846 -N nodename --sudo ...
tony_perkis666's user avatar
0 votes
0 answers
476 views

Open Source Chef Server can't upload cookbook

I just setup the open source chef server on an Ubuntu 12.04 EC2 instance, I've setup my webui and am able to get responses from my knife commands ie: knife node list, knife client list, knife user ...
veilig's user avatar
  • 161
0 votes
1 answer
573 views

Not able to assign elastic ip using knife

I want to create a EC2 instance using knife with an elastic ip assigned to it. Knife has the option --associate-eip but when I use this option it fails with error "ERROR: Elastic IP requested is not ...
pravi's user avatar
  • 11
0 votes
1 answer
151 views

how to list chef nodes that are not pingable - knife

I have bunch of ec2 nodes registered to chef server, more than half of them were terminated earlier. I still see them as nodes under knife node list. How do I delete them that are not pingable? My ...
Chucks's user avatar
  • 521
2 votes
1 answer
3k views

How to trigger chef-client on all nodes from my workstation

I have 5 nodes and all of them have one setup cook-book in common. Now I would like to add another task in this common cookbook that would configure SQL server for me on all the nodes. Is there a way/...
divyanshm's user avatar
  • 121
3 votes
1 answer
2k views

How do I get knife to bootstrap an EC2 instance in a public VPC?

I don't know much about routing and subnets and vpc's, I never had to use those with my old AWS account. In my new AWS account, I started a new Amazon Linux AMI instance (ami-043a5034). The security ...
Reese's user avatar
  • 148
0 votes
1 answer
348 views

knife azure image list doesn't return User image

I'm trying to create and bootstrap a Windows VM in Azure using knife-azure. I initially tried using a Public Win 2008 r2 image, but quickly found out that winrm needs to be configured before this can ...
canliketo's user avatar
0 votes
1 answer
1k views

Chef's knife ec2 plugin create server inside VPC with public IP

So I'm using knife ec2 plugin to create a server, inside a VPC, and then provision it with chef-solo. Here is my basic command: knife ec2 server create -S private-key -I ami-1234 --flavor=m1....
comjf's user avatar
  • 156
0 votes
1 answer
48 views

Installing nginx via chef Role is not applying my changes

I wrote a role to use the default nginx cookbook. The role is not applying any of my attributes. It keeps installing nginx 1.2.1. { "name": "nginx", "json_class": "Chef::Role", "chef_type": "...
Jumbalaya Wanton's user avatar
0 votes
1 answer
542 views

How can I create a new Azure VM in an existing cloud service with knife azure (Chef)?

I have tried using the "--azure-connect-to-existing-dns" parameter but that doesn't work. I'd like to create Azure VM's, but have them inside an already existing cloud service instead of creating a ...
DonBecker's user avatar
  • 250
2 votes
1 answer
643 views

Post Azure VM creation bootstrap process - Azure user-data mechanism during VM creation?

After creating an Azure Windows VM, how does bootstrapping (winrm or ssh) completed? I'm using knife azure and using either winrm or ssh, the VM is created but fails to bootstrap. Do I have to ...
DonBecker's user avatar
  • 250
2 votes
1 answer
904 views

Can I use Chef-Solo to provision a server created with knife-eucalyptus

I am able to create a new server using knife-eucalyptus like so: knife euca server create The server gets created but provisioning fails with the following message: "ERROR: Errno::ENOENT: No such ...
StFS's user avatar
  • 273
0 votes
1 answer
60 views

Knife ec2 Create

I am successfully running chef server and able to bootstrap server with my chef recipes. I would like to know is there any plugin which we can use to launch multiple servers using knife ec2 create ...
Abhishek Anand Amralkar's user avatar
0 votes
1 answer
2k views

ERROR: cannot verify www.opscode.com's certificate

I am using OSS Chef 11.0.4 on Ubuntu 12.04 LTS , while running Knife ec2 create command I am getting below error Bootstrapping Chef on ec2-xx-xx-xxx-xx.compute-1.amazonaws.com ec2-xx-xx-xxx-xx....
Abhishek Anand Amralkar's user avatar