Closed grahamgilbert closed 9 years ago
Latest version of Puppet Server, do you mean 4? If so how did you install the gem on the server? It uses Clojure, and just briefly looking at the installer, it looks like it comes with wrapper scripts for cli tools such as: ruby, irb, gem, and foreground. My thoughts are that the gem isn't in the right GEM_PATH.
Brian may know more. I'm out of the Puppet game ;)
No, I mean https://github.com/puppetlabs/puppet-server. I just ran gem install. I'm not much of a ruby guy, how would I get that it's in the right GEM_PATH?
Right, sorry. That's what I meant by version 4.
Just read this:
Gems
If you have server-side Ruby code in your modules, Puppet Server will run it via JRuby. Generally speaking, this only affects custom parser functions and report processors. For the vast majority of cases, this shouldn't pose any problems, as JRuby is highly compatible with vanilla Ruby.
Installing And Removing Gems
We isolate the Ruby load paths that are accessible to Puppet Server's JRuby interpreter, so that it doesn't load any gems or other code that you have installed on your system Ruby. If you want Puppet Server to load additional gems, use the Puppet Server-specific gem command to install them.
Try using the following to install the necessary gems on the server:
https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown
Yep, as you said that I RTFM again and it looks like the right path. I'll update the issue when I have more.
That's it! For prosperity, here's what I needed to do:
$ puppetserver gem install jdbc-sqlite3
$ puppetserver gem install CFPropertyList
Thanks, guys -- IDKT.
One comment...
I don't think you need the sqlite3
gem on the master/server/whatevah. Unlike CFPropertylist
(which gets used everywhere), the code that requires sqlite3
is the Macauthdb and that should only ever get loaded on client.
Hate to reopen old issues, but I'm still having this problem, having tried all of the fixes in this thread. I'm using 0.7.0 of this module.
If I understand this issue as it's being described, this is not a problem with the managedmac Puppet module, but rather that the Puppet 4 "Puppet Server" (not Puppet Master) can't load the required Ruby gems. Correct?
What platform are you running the Puppet Server on?
What happens when you run... puppetserver gem list
or sudo puppetserver gem list
?
Do you see the sqlite3
or jdbc-sqlite3
gem?
This documentation might be helpful...
https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown
Hey, here's what I have installed
# puppetserver gem list
*** LOCAL GEMS ***
CFPropertyList (2.3.1)
deep_merge (1.0.1)
jar-dependencies (0.1.13)
jdbc-sqlite3 (3.8.10.1)
jruby-openssl (0.9.7 java)
json (1.8.0 java)
rake (10.1.0)
rdoc (4.1.2)
# puppetserver --version
puppetserver version: 1.1.1
Can you paste the exact error you are getting? Also, is it from the server or client?
It's on the client:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/mobileconfig: no such file to load -- puppet/managedmac/common on node macbook.network.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run.
Right. Okay, I can reproduce this, but the error you are getting is different than the one reported in this thread by @grahamgilbert -- completely different -- he reported an issue with a missing gem.
Your issue is closer to #62 .
This error was fixable in Puppet 3 by running:
sudo puppet config set pluginsync true
on both client and masterpuppet agent -t
on the masterBut this doesn't appear to solve the issue with Puppet 4's puppetserver AFAICT.
At present, I am not sure why, but it has to do a Ruby load path. This is the salient portion of the error:
Could not autoload puppet/type/mobileconfig: no such file to load -- puppet/managedmac/common
Which basically means, Ruby (or maybe Puppet) can't load puppet/managedmac/common
, but when I check the plugin cache on the server and client, that file is there. This code should work and the library should load.
I need to determine whether or this can be fixed in Puppet somehow or whether I need to fix this in my own code with some ugly hack.
When I have more to say, I will post back, but this issue deserves it's own thread.
I will close this and re-open under a new issue.
HTH
New issue opened for this. Feel free to comment.
This is with a master running the latest version of Puppet Server on Ubuntu 14 and a 10.10.3 client, both with the sqlite3 and CFPropertyList gems installed.
From the client: