Issue #11611 has been updated by Mateusz Lapsa-Malawski.

I've got a fix/workaround.

Thanks for pointing out how to debug puppet.


Puppet depends on multi_json to serialize data for couchdb.
I had multi_json installed at version 1.0.3 (which worked fine with original 
debian squeeze puppet).
Upgrading it to 1.0.4 (latest found by gem) and installing json-1.6.4 gem 
(latest) fixes the issue.

<pre>
gem install multi_json --version '=1.0.4'
gem install json --version '=1.6.4'
</pre>

Json gem was required because otherwise multi_json was falling back to ok_json 
which seems to be the root cause.

Trace from configuration with multi_json-1.0.4 installed, but w/o json-1.6.4:
<pre>
Warning: multi_json is using default ok_json engine. Suggested action: require 
and load an appropriate JSON library.
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:420:in 
`valenc'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`objenc'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `map'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`each'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`map'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`objenc'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:409:in 
`valenc'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`objenc'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `map'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`each'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`map'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:427:in 
`objenc'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/vendor/ok_json.rb:409:in 
`valenc'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json/engines/ok_json.rb:15:in 
`encode'
/var/lib/gems/1.8/gems/multi_json-1.0.4/lib/multi_json.rb:83:in `encode'
/var/lib/gems/1.8/gems/couchrest-1.1.2/lib/couchrest/rest_api.rb:138:in 
`payload_from_doc'
/var/lib/gems/1.8/gems/couchrest-1.1.2/lib/couchrest/rest_api.rb:87:in `execute'
/var/lib/gems/1.8/gems/couchrest-1.1.2/lib/couchrest/rest_api.rb:50:in `put'
/var/lib/gems/1.8/gems/couchrest-1.1.2/lib/couchrest/database.rb:130:in 
`save_doc'
/usr/lib/ruby/1.8/puppet/indirector/couch.rb:46:in `create'
/usr/lib/ruby/1.8/puppet/indirector/couch.rb:22:in `save'
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:265:in `save'
/usr/lib/ruby/1.8/puppet/node/facts.rb:20:in `save'
/usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:26:in 
`extract_facts_from_request'
/usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:31:in `find'
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:189:in `find'
/usr/lib/ruby/1.8/puppet/network/http/handler.rb:106:in `do_find'
/usr/lib/ruby/1.8/puppet/network/http/handler.rb:68:in `send'
/usr/lib/ruby/1.8/puppet/network/http/handler.rb:68:in `process'
/usr/lib/ruby/1.8/puppet/network/http/webrick/rest.rb:24:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `initialize'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:38:in `synchronize'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
/usr/lib/ruby/1.8/puppet/network/server.rb:127:in `listen'
/usr/lib/ruby/1.8/puppet/network/server.rb:142:in `start'
/usr/lib/ruby/1.8/puppet/daemon.rb:124:in `start'
/usr/lib/ruby/1.8/puppet/application/master.rb:202:in `main'
/usr/lib/ruby/1.8/puppet/application/master.rb:144:in `run_command'
/usr/lib/ruby/1.8/puppet/application.rb:306:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:410:in `hook'
/usr/lib/ruby/1.8/puppet/application.rb:306:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:401:in `exit_on_fail'
/usr/lib/ruby/1.8/puppet/application.rb:306:in `run'
/usr/sbin/puppetmasterd:4
</pre>

----------------------------------------
Bug #11611: couchdb facts terminus fails on puppet 2.7.9 
https://projects.puppetlabs.com/issues/11611

Author: Mateusz Lapsa-Malawski
Status: Needs More Information
Priority: Normal
Assignee: 
Category: ext
Target version: 
Affected Puppet version: 
Keywords: couchdb, facts, terminus
Branch: 


After upgrading to puppet 2.7.9-1 couchdb backend for facts storage is not 
working anymore.

Error message:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: cannot 
encode Time: Thu Dec 29 14:14:19 +0000 2011


puppet.conf:
[master]
facts_terminus=couch
couchdb_url = http://xxxxx:[email protected]:5984/puppet



Simmilar issue was once reported on IRC channel. I haven't found any follow up:
http://puppetlogs.org/puppet/%23puppet-2011-11-28.log.html

Distribution used: Debian squeeze
Puppet packages source: http://apt.puppetlabs.com/debian


For now I'm disabling couchdb facts terminus. If somebody can point out what 
extra logs are required. I'd more than happy to provide them. --debug & 
--verbose doesn't show anything more specific.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to