Deepak,
Thanks for your insight into the error.
It looks like the iconv library in the version of Ruby provided by the
OpenIndiana repo may be too old, lack a required method or have an
incompatible version of the method being used to transform the contents of
the catalog.
root@atropos:~# ruby -r iconv -ve 'pp Iconv.list'
ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-solaris2.11]
-e:1: undefined method `list' for Iconv:Class (NoMethodError)
Based on that I'll give all this another go on a fresh VM with Ruby 1.9
built from source unless there's some kind of "easy button" fix.
I'm sure there's comparatively little demand for compatibility with this
particular offshoot of SunOS but if you're at all interested I managed to
Google my way through printing Config::CONFIG with rbconfig (learning Ruby
is still on my to-do list)
=> {"PACKAGE_VERSION"=>""
"INSTALL_SCRIPT"=>"/usr/bin/ginstall -c"
"DEFS"=>"-D_FILE_OFFSET_BITS=64"
"GREP"=>"/usr/bin/ggrep"
"sharedstatedir"=>"/usr/ruby/1.8/com"
"COMMON_LIBS"=>""
"EXPORT_PREFIX"=>""
"AR"=>"ar"
"target_alias"=>""
"PACKAGE_STRING"=>""
"host_os"=>"solaris2.11"
"RDOCTARGET"=>"install-doc"
"MANTYPE"=>"man"
"build"=>"i386-pc-solaris2.11"
"AS"=>"as"
"DLDFLAGS"=>""
"build_os"=>"solaris2.11"
"PATH_SEPARATOR"=>":"
"PACKAGE_NAME"=>""
"LIBRUBYARG"=>"-R /usr/ruby/1.8/lib -L/usr/ruby/1.8/lib -lruby"
"RUBY_INSTALL_NAME"=>"ruby"
"LN_S"=>"ln -s"
"EXTSTATIC"=>""
"EXEEXT"=>""
"mandir"=>"/usr/ruby/1.8/share/man"
"YACC"=>"bison -y"
"LIBPATHENV"=>"LD_LIBRARY_PATH"
"oldincludedir"=>"/usr/include"
"psdir"=>"/usr/ruby/1.8/share/doc/$(PACKAGE)"
"sitearch"=>"i386-solaris2.11"
"DLEXT2"=>""
"LIBS"=>"-lrt -ldl -lcrypt -lm "
"bindir"=>"/usr/ruby/1.8/bin"
"localedir"=>"/usr/ruby/1.8/share/locale"
"rubyw_install_name"=>""
"RUBY_SO_NAME"=>"ruby"
"OBJDUMP"=>""
"ECHO_C"=>"\\\\c"
"optflags"=>""
"arch"=>"i386-solaris2.11"
"NROFF"=>"/usr/bin/nroff"
"libexecdir"=>"/usr/ruby/1.8/libexec"
"CC"=>"/usr/sfw/bin/gcc"
"cflags"=>" "
"OUTFLAG"=>"-o "
"STATIC"=>""
"PREP"=>"miniruby"
"build_vendor"=>"pc"
"debugflags"=>""
"htmldir"=>"/usr/ruby/1.8/share/doc/$(PACKAGE)"
"sitedir"=>"/usr/ruby/1.8/lib/ruby/site_ruby"
"YFLAGS"=>""
"MAKEFILES"=>"Makefile"
"STRIP"=>"strip"
"MINOR"=>"8"
"LIBRUBYARG_SHARED"=>"-R /usr/ruby/1.8/lib -L/usr/ruby/1.8/lib -lruby"
"MAKEDIRS"=>"mkdir -p"
"LIBRUBY_LDSHARED"=>"ld -G"
"LDFLAGS"=>"-L/usr/sfw/lib -R/usr/sfw/lib"
"vendorarchdir"=>"/usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/i386-solaris2.11"
"includedir"=>"/usr/ruby/1.8/include"
"infodir"=>"/usr/ruby/1.8/share/info"
"NM"=>""
"target"=>"i386-pc-solaris2.11"
"ENABLE_SHARED"=>"yes"
"DLLWRAP"=>""
"vendorlibdir"=>"/usr/ruby/1.8/lib/ruby/vendor_ruby/1.8"
"CFLAGS"=>"-g -O3 -fPIC"
"host"=>"i386-pc-solaris2.11"
"INSTALL_DATA"=>"/usr/bin/ginstall -c -m 644"
"INSTALL_PROGRAM"=>"/usr/bin/ginstall -c"
"DLEXT"=>"so"
"PACKAGE_BUGREPORT"=>""
"exec_prefix"=>"/usr/ruby/1.8"
"sysconfdir"=>"/usr/ruby/1.8/etc"
"TEENY"=>"7"
"CPP"=>"/usr/sfw/bin/gcc -E"
"ALLOCA"=>""
"LIBEXT"=>"a"
"libdir"=>"/usr/ruby/1.8/lib"
"LIBRUBY"=>"libruby.so.1"
"build_alias"=>""
"prefix"=>"/usr/ruby/1.8"
"target_vendor"=>"pc"
"target_cpu"=>"i386"
"ECHO_N"=>""
"rubylibdir"=>"/usr/ruby/1.8/lib/ruby/1.8"
"sbindir"=>"/usr/ruby/1.8/sbin"
"docdir"=>"/usr/ruby/1.8/share/doc/$(PACKAGE)"
"dvidir"=>"/usr/ruby/1.8/share/doc/$(PACKAGE)"
"host_vendor"=>"pc"
"TRY_LINK"=>""
"SOLIBS"=>"-lrt -ldl -lcrypt -lm "
"configure_args"=>" --prefix=/usr/ruby/1.8 --enable-dtrace --enable-shared
--enable-install-doc --disable-option-checking --with-openssl
--with-tk-dir=/usr --with-curses-dir=/usr CC=/opt/SUNWspro/bin/cc
CFLAGS=-xO4 -xbuiltin=%all -xinline=%auto -xprefetch=auto -xdepend
-xtarget=generic
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include
LDFLAGS=-L/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/lib
-M
/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/usr/src/cmd/mapfile_noexstk
-R/usr/sfw/lib CPPFLAGS=-DTEXT_DOMAIN=\"\"
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/sfw/include
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include"
"vendordir"=>"/usr/ruby/1.8/lib/ruby/vendor_ruby"
"target_os"=>"solaris2.11"
"GNU_LD"=>"no"
"CP"=>"cp"
"EXTOUT"=>".ext"
"MAINLIBS"=>""
"SET_MAKE"=>""
"datarootdir"=>"/usr/ruby/1.8/share"
"pdfdir"=>"/usr/ruby/1.8/share/doc/$(PACKAGE)"
"LIBRUBYARG_STATIC"=>"-lruby-static"
"RUBYW_INSTALL_NAME"=>""
"WINDRES"=>""
"archdir"=>"/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11"
"ruby_version"=>"1.8"
"LINK_SO"=>""
"ECHO_T"=>""
"RPATHFLAG"=>" -R%1$-s"
"SHELL"=>"/bin/sh"
"LDSHARED"=>"/usr/sfw/bin/gcc -G"
"RANLIB"=>"ranlib"
"DLDLIBS"=>" -lc"
"build_cpu"=>"i386"
"host_alias"=>""
"ASFLAGS"=>""
"INSTALL"=>"/usr/bin/ginstall -c"
"sitearchdir"=>"/usr/ruby/1.8/lib/ruby/site_ruby/1.8/i386-solaris2.11"
"ARCHFILE"=>""
"LIBRUBY_DLDFLAGS"=>""
"OBJEXT"=>"o"
"datadir"=>"/usr/ruby/1.8/share"
"DESTDIR"=>""
"LIBRUBY_ALIASES"=>"libruby.so.1.8.7 libruby.so"
"CCDLFLAGS"=>"-fPIC"
"RM"=>"rm -f"
"host_cpu"=>"i386"
"setup"=>"Setup"
"CPPOUTFILE"=>"-o conftest.i"
"topdir"=>"/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11"
"localstatedir"=>"/usr/ruby/1.8/var"
"LIBPATHFLAG"=>" -L%1$-s"
"cppflags"=>"-DTEXT_DOMAIN=\\\"\\\"
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/sfw/include
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include
-I/home/jt/OI-151A-STABLE/151A-PRESTABLE7/newbuilds/sfw/proto/root_i386/usr/include"
"sitelibdir"=>"/usr/ruby/1.8/lib/ruby/site_ruby/1.8"
"ruby_install_name"=>"ruby"
"CPPFLAGS"=>"-I/usr/sfw/include"
"MAJOR"=>"1"
"EGREP"=>"/usr/bin/ggrep -E"
"LIBRUBY_SO"=>"libruby.so.1"
"PACKAGE_TARNAME"=>""
"LIBRUBY_A"=>"libruby-static.a"
"COMMON_MACROS"=>""
"ARCH_FLAG"=>""
"COMMON_HEADERS"=>""}
On Wednesday, 28 November 2012 10:14:25 UTC-5, Deepak Giridharagopal wrote:
>
> On Tue, Nov 27, 2012 at 9:27 PM, Ryan Cunningham
> <[email protected]<javascript:>
> > wrote:
>
>> Hi all,
>>
>> I'm having an issue on the master I'm using in my staging
>> environment with getting storeconfigs to work with puppetdb.
>>
>> I should say up front that my staging environment is probably a little
>> uncommon. I'm running OpenIndiana which is a distribution of the open
>> source fork of OpenSolaris.
>>
>> I installed puppet (3.0), facter and hiera using `gem` on this system
>> and have gotten the master working, servicing some test clients without
>> too much trouble but I'm having some real trouble getting puppetdb
>> integrated with my master.
>>
>> Puppetdb is running on the puppet master and I can access the dashboard
>> on the default port of 8080 without issue,
>>
>> I've followed all the instructions at
>> http://docs.puppetlabs.com/puppetdb/1/connect_puppet_master.html quite
>> closely but if I have storeconfigs set to true and puppetdb as my
>> backend I get the following output from a puppet agent --test:
>>
>>
>> Info: Retrieving plugin
>> Info: Loading facts in /var/puppet/lib/facter/last_run.rb
>> Info: Loading facts in /var/puppet/lib/facter/puppet_vardir.rb
>> Info: Loading facts in /var/puppet/lib/facter/pe_version.rb
>> Info: Loading facts in /var/puppet/lib/facter/facter_dot_d.rb
>> Info: Loading facts in /var/puppet/lib/facter/root_home.rb
>> Info: Loading facts in /var/puppet/lib/facter/puppi_projects.rb
>> Error: Could not retrieve catalog from remote server: Error 400 on
>> SERVER: invalid encoding ("UTF-8//IGNORE", "UTF-8") Warning: Not using
>> cache on failed catalog Error: Could not retrieve catalog; skipping run
>>
>> I've tried Googling but haven't turned up anyone else reporting the
>> same exact issue. I checked out puppetdb using git and got *most* of
>> the way through building with Rake (it stopped while building some of
>> the Debian-specific stuff) -- I got the jar file I'm using from there
>> and I copied the files I believe I was supposed to from puppetdb's
>> puppet/lib/puppet into
>> "/var/ruby/1.8/gem_home/gems/puppet-3.0.1/lib/puppet/" on this system.
>> Verbose output from the copy command follows...
>>
>>
> The code in question is trying to transcode your catalog to UTF-8 before
> sending it to PuppetDB (because the wire format is JSON, and JSON is
> UTF-8). On Ruby 1.8, we rely on the "iconv" Ruby library, which is
> basically just a pass-through to libiconv. The error message seems to
> indicate that your libiconv doesn't know about UTF-8 which is
> strange...though I admit to not knowing exactly how (and with what flags)
> Ruby or iconv is compiled for OpenIndiana.
>
> Using the same Ruby you run your puppetmasters with, can you do:
>
> ruby -e "require 'iconv'; puts Iconv.list.sort"
>
> That should dump out the list of available encodings. That should help us
> at least more properly triangulate the issue.
>
> deepak
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/fTUQXSgQnacJ.
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-users?hl=en.