# Puppet problem with api\_user

**URL:** <https://discourse.sensu.io/t/puppet-problem-with-api-user/209>\
**Category:** Sensu Classic (EOL)\
**Created:** [June 17, 2014, 6:42pm UTC](https://discourse.sensu.io/t/puppet-problem-with-api-user/209 "2014-06-17T18:42:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mojo](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@Mojo](https://discourse.sensu.io/u/Mojo)\
**Post date:** [June 17, 2014, 6:42pm UTC](https://discourse.sensu.io/t/puppet-problem-with-api-user/209/1 "2014-06-17T18:42:02Z")

</div>

I’m helping out someone at work who ran into this strange problem with the current sensu puppet module.

He set a value for “sensu::api\_user” other than the default (which is “undef”), and we would get this error from the puppet agent:

Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter user at /etc/puppet/environments/montest/modules/sensu/manifests/api/config.pp:30 on node test-mon-sensu01

I had him remove the setting for api\_user, and api\_password, and try again (hopefully picking up the default undef values), and still got the same error.

Finally we went into sensu/manifests/api/config.pp and commented out the resource definitions for user =\> and password =\>, and the catalog would finally compile.

I’ve been studying the lib directory trying to find any cause for that problem, and I’ve come up empty.

Any other suggestions?

Best regards,  
Mojo

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [June 18, 2014, 2:50am UTC](https://discourse.sensu.io/t/puppet-problem-with-api-user/209/2 "2014-06-18T02:50:00Z")

</div>

That seems pretty strange. Puppet is telling you the right line in the  
code where it is being called out (config:30)

But to answer \*why\* "user" is not a valid parameter, can you confirm  
that your sensu\_api\_config type looks sane?

> <https://github.com/sensu/sensu-puppet/blob/master/lib/puppet/type/sensu_api_config.rb#L52>

That is where user becomes a param (property)

Providers can be a bit tricky to debug, because that code gets  
executed on the client, so they end up merged in:  
/var/lib/puppet/lib/puppet/type/sensu\_api\_config.rb

Can you confirm on the \*client\* that looks ok? The only explanation I  
could think of is that there is an old version of the type/provider on  
the client, and you are using a new module on the server, and  
pluginsync is disabled for some reason, preventing the new  
type/provider code from syncing over.

> **···**
>
> On Tue, Jun 17, 2014 at 11:42 AM, Mojo \<mojo.la@gmail.com\> wrote:
> 
> > I'm helping out someone at work who ran into this strange problem with the  
> > current sensu puppet module.
> > 
> > He set a value for "sensu::api\_user" other than the default (which is  
> > "undef"), and we would get this error from the puppet agent:
> > 
> > Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid  
> > parameter user at  
> > /etc/puppet/environments/montest/modules/sensu/manifests/api/config.pp:30 on  
> > node test-mon-sensu01
> > 
> > I had him remove the setting for api\_user, and api\_password, and try again  
> > (hopefully picking up the default undef values), and still got the same  
> > error.
> > 
> > Finally we went into sensu/manifests/api/config.pp and commented out the  
> > resource definitions for user =\> and password =\>, and the catalog would  
> > finally compile.
> > 
> > I've been studying the lib directory trying to find any cause for that  
> > problem, and I've come up empty.
> > 
> > Any other suggestions?
> > 
> > Best regards,  
> > Mojo
