I had a corrupted chef.couchdb and had to restore last night’s backup.
After re-uploading today’s changes, everything seems to work fine.
Only a node that I added during the day can’t be recreated. It’s not in
the node list (it didn’t yet exist last night, after all), it’s not in
CouchDB (as far as I can see), but bootstrapping the client gives me
HTTP Request Returned 409 Conflict: Client already exists
HTTP Request Returned 403 Forbidden: You are not allowed to take
this action.
knife node create MYNODENAME causes the following server stack trace:
delete the client from chef server using knife (knife client delete ), and delete the old client.pem from the node itself. then run
chef-client on the node, and it will reregister itself.
On Tue, Mar 26, 2013 at 12:45 PM, Jochen Lillich jochen@freistil.it wrote:
Hi!
I had a corrupted chef.couchdb and had to restore last night's backup.
After re-uploading today's changes, everything seems to work fine.
Only a node that I added during the day can't be recreated. It's not in
the node list (it didn't yet exist last night, after all), it's not in
CouchDB (as far as I can see), but bootstrapping the client gives me
HTTP Request Returned 409 Conflict: Client already exists
HTTP Request Returned 403 Forbidden: You are not allowed to take
this action.
knife node create MYNODENAME causes the following server stack trace:
delete the client from chef server using knife (knife client delete
), and delete the old client.pem from the node itself. then
run chef-client on the node, and it will reregister itself.
I already tried that, but there is no client with that name:
$ knife client delete MYNODE
Do you really want to delete MYNODE? (Y/N) y
ERROR: JSON::ParserError: 743: unexpected token at 'null'
Neither knife client list nor the CouchDB web UI display the client name.
That's why I asked if there could be something outside CouchDB (maybe the server filesystem) that prevents re-creating the client. Some kind of remains from my node creation today.
delete the client from chef server using knife (knife client delete
), and delete the old client.pem from the node itself. then
run chef-client on the node, and it will reregister itself.
I already tried that, but there is no client with that name:
$ knife client delete MYNODE
Do you really want to delete MYNODE? (Y/N) y
ERROR: JSON::ParserError: 743: unexpected token at 'null'
Neither knife client list nor the CouchDB web UI display the client name.
That's why I asked if there could be something outside CouchDB (maybe the server filesystem) that prevents re-creating the client. Some kind of remains from my node creation today.
delete the client from chef server using knife (knife client delete
), and delete the old client.pem from the node itself. then
run chef-client on the node, and it will reregister itself.
I already tried that, but there is no client with that name:
$ knife client delete MYNODE
Do you really want to delete MYNODE? (Y/N) y
ERROR: JSON::ParserError: 743: unexpected token at 'null'
Neither knife client list nor the CouchDB web UI display the client
name.
That's why I asked if there could be something outside CouchDB (maybe
the server filesystem) that prevents re-creating the client. Some kind of
remains from my node creation today.
no.. knife node/client set of commands interacts with couch only. Try
debugging it from irb/pry.
irb>
require 'chef'
Chef::Config.from_file('<knife.rb>')
n = Chef::Node.load('name')
etc.
also tail the chef server api log
On Tue, Mar 26, 2013 at 1:38 PM, Jochen Lillich jochen@freistil.it wrote:
Could it be something in the Solr index? A "knife search node" for the
name doesn't have a result for the client, though.
Right, clients' public keys not stored on disk, AFAIK, (?) -- stored in Couch.
As I mentioned, you probably did not take a consistent backup, or
there was some problem with restoring a document. Have you inspected
all documents using the _clients design document? I would anticipate
finding a dodgy document, removing/editing it, and being able to
proceed.
delete the client from chef server using knife (knife client delete
), and delete the old client.pem from the node itself. then
run chef-client on the node, and it will reregister itself.
I already tried that, but there is no client with that name:
$ knife client delete MYNODE
Do you really want to delete MYNODE? (Y/N) y
ERROR: JSON::ParserError: 743: unexpected token at 'null'
Neither knife client list nor the CouchDB web UI display the client
name.
That's why I asked if there could be something outside CouchDB (maybe
the server filesystem) that prevents re-creating the client. Some kind of
remains from my node creation today.