Error 400 on SERVER: no 'environments' in {:root_environment=>#<Puppet::Node::Environment:0x7f784c700668 @name=:"*root*", @manifest="/usr/share/puppet/rack/puppetmasterd", @modulepath=[]>

1,728 views
Skip to first unread message

Luca Mazzaferro

unread,
May 8, 2014, 3:38:47 PM5/8/14
to puppet...@googlegroups.com
Hi to Everybody,
I'm working with puppet since some months.
I'm managing a medium environment with some hundreds of nodes.

I installed passenger and everything worked fine following this documentation:

Today I tried to install also Dashboard.
The installation seems to complete correctly then I restarted httpd server and still ok.
But when I go on one client and run the command 


puppet agent --test --environment vargas

I got this error

err: Could not retrieve catalog from remote server: Error 400 on SERVER: no 'environments' in {:root_environment=>#<Puppet::Node::Environment:0x7f784c700668 @name=:"*root*", @manifest="/usr/share/puppet/rack/puppetmasterd", @modulepath=[]>, :current_environment=>#<Puppet::Node::Environment:0x7f784c700668 @name=:"*root*", @manifest="/usr/share/puppet/rack/puppetmasterd", @modulepath=[]>} at top of []
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: Error 400 on SERVER: no 'environments' in {:root_environment=>#<Puppet::Node::Environment:0x7f784c700668 @name=:"*root*", @manifest="/usr/share/puppet/rack/puppetmasterd", @modulepath=[]>, :current_environment=>#<Puppet::Node::Environment:0x7f784c700668 @name=:"*root*", @manifest="/usr/share/puppet/rack/puppetmasterd", @modulepath=[]>} at top of []

same thing if I don't chose the environment.
Instead if I switch off httpd and restart normal puppetmaster everything works fine.

Has anyone already seen this type of error?
Thank you
Cheers.

   Luca

twm...@gmail.com

unread,
May 8, 2014, 6:03:04 PM5/8/14
to puppet...@googlegroups.com
I have this exact same problem with a fresh install and passenger. I am kinda happy someone else has seen this issue, though I wish I knew why it was. 

]# curl -k -H "Content-Type:application/json" -H "Accept:application/json" https://puppet.t2.ucsd.edu:8140/puppet/environments
no 'environments' in {:current_environment=>#<Puppet::Node::Environment:0x7f5d9705b490 @name=:"*root*", @manifest="/etc/puppet/rack", @modulepath=[]>, :root_environment=>#<Puppet::Node::Environment:0x7f5d9705b490 @name=:"*root*", @manifest="/etc/puppet/rack", @modulepath=[]>} at top of []

twm...@gmail.com

unread,
May 8, 2014, 6:45:21 PM5/8/14
to puppet...@googlegroups.com
Check your config.ru and make sure it is correct and in the right location. I had an old one from Foreman there and that was breaking the system apparently. 

Luca Mazzaferro

unread,
May 9, 2014, 7:51:10 AM5/9/14
to puppet...@googlegroups.com

Hi,
thank you for this suggestion.
Probably you are right, indeed; the problem should be there.
Actually the Puppet-Passenger system is working again what I did on my SL6 is:

Update the rack and passenger from the version passenger-4.0.41 to passenger-4.0.42
gem install rack passenger
run again the passenger module installation command for apache2.
passenger-install-apache2-module
 
These two actions didn't solve the situation but when I copied again the config.ru 

cp /usr/share/puppet/ext/rack/config.ru /usr/share/puppet/rack/puppetmasterd/

it starts to work again.

What I guess is this: the Dashboard installation in some way rewrote the config.ru and create the problem.
I will try to install it again making a bkp copy of config.ru before.

Is it possible? Anyone experienced something like this?
I'll keep you updated.
Cheers.

Luca Mazzaferro

unread,
May 9, 2014, 9:27:43 AM5/9/14
to puppet...@googlegroups.com
Hi again,
problem solved.
I re-installed also the puppet-dashboard following official information here:


There is an error on the provided dashboard-vhost.conf:
there variable 

RailsAutoDetect

is not supported since passenger 4.0.0 


I used instead 
PassengerEnabled On

Cheers and good luck.

    Luca

Adrián López Tejedor

unread,
May 29, 2014, 12:22:51 PM5/29/14
to puppet...@googlegroups.com
I am having the same problem but I only have uppet-server-3.6.1, without passenger, dashboard, etc.
It works correctly for 10' more or less, then start to give errors like:

May 29 14:15:21 HOSTNAME puppet-master[30831]: no 'environments' in {:root_environment=>#<Puppet::Node::Environment:0x7f654f667018 @config_version=nil, @manifest="/etc/puppet", @name=:"*root*", @modulepath=[], @watching=true>, :current_environment=>#<Puppet::Node::Environment:0x7f654f667018 @config_version=nil, @manifest="/etc/puppet", @name=:"*root*", @modulepath=[], @watching=true>} at top of [[0, nil, nil]]

Adrián López Tejedor

unread,
May 29, 2014, 1:08:54 PM5/29/14
to puppet...@googlegroups.com
Downgrade to 3.5.1 since last message and running without problems.

Josh Cooper

unread,
May 29, 2014, 3:50:51 PM5/29/14
to puppet...@googlegroups.com
On Thu, May 29, 2014 at 6:08 AM, Adrián López Tejedor <adri...@gmail.com> wrote:
Downgrade to 3.5.1 since last message and running without problems.

El jueves, 29 de mayo de 2014 14:22:51 UTC+2, Adrián López Tejedor escribió:
I am having the same problem but I only have uppet-server-3.6.1, without passenger, dashboard, etc.
It works correctly for 10' more or less, then start to give errors like:

May 29 14:15:21 HOSTNAME puppet-master[30831]: no 'environments' in {:root_environment=>#<Puppet::Node::Environment:0x7f654f667018 @config_version=nil, @manifest="/etc/puppet", @name=:"*root*", @modulepath=[], @watching=true>, :current_environment=>#<Puppet::Node::Environment:0x7f654f667018 @config_version=nil, @manifest="/etc/puppet", @name=:"*root*", @modulepath=[], @watching=true>} at top of [[0, nil, nil]]

This is https://jira.puppetlabs.com/browse/PUP-2659 which only affects webrick masters when handling concurrent requests. This will be fixed in an upcoming 3.6.2 release.
 

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f69e4766-9344-4f79-ad64-619962da8092%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Josh Cooper
Developer, Puppet Labs

Join us at PuppetConf 2014September 22-24 in San Francisco
Register by May 30th to take advantage of the Early Adopter discount save $349!

Adrián López Tejedor

unread,
May 30, 2014, 6:48:19 AM5/30/14
to puppet...@googlegroups.com
Thanks!

Google is not smart enough to find that ticket with the pattern "no 'environments' in {:root_environment=>#<Puppet::Node::Environment" :/
Reply all
Reply to author
Forward
0 new messages