Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"worker_connections must be an integer" error #537

Closed
andrewnoruk opened this issue Dec 30, 2014 · 5 comments · Fixed by #539
Closed

"worker_connections must be an integer" error #537

andrewnoruk opened this issue Dec 30, 2014 · 5 comments · Fixed by #539

Comments

@andrewnoruk
Copy link

When attempting to install nginx (using the first example from the README) I am seeing this error. I have tried with the latest version of the plugin (from master) and also with the 0.0.10 version as I read on another thread.

In both cases, I get this error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: $worker_connections must be an integer

@jfryman
Copy link
Contributor

jfryman commented Dec 30, 2014

How are you declaring the parameter? I think this is a valid error. For example:

class { 'nginx':
  worker_connections => 1,
}

is different than...

class { 'nginx':
  worker_connections => '1',
}

If you are doing the latter, please remove the quotes to make it an integer. If you are already doing the latter... well then we might have to dig in a bit. 😁

Please let me know if this resolves things for you.

@3flex
Copy link
Contributor

3flex commented Dec 30, 2014

@the-andrew which version of puppetlabs-stdlib are you using? If it's older than 4.2.0 then that will be the problem... from the 4.2.0 changelog:

Fix is_integer() to return true if passed integer strings

Since c87744a we should update the dependency to >= 4.2.0 <5.0.0. I'll raise a PR.

@mrmagcore
Copy link

Why are worker_connections, worker_rlimit_nofile and proxy_set_header required? Couldn't they be left undef'd and set to nginx's own defaults?

@andrewnoruk
Copy link
Author

I didn't specify this on the original post, but I was not actually passing any parameters for this class. The error was coming up when the defaults should have been used.

@ebuzzz
Copy link

ebuzzz commented Mar 25, 2016

I'm still experiencing this issue with master 3.7.2-4, puppetlabs-stdlib v4.9.0 and the v0.3.0 version of this plugin. Any specific reason why the config.pp doesn't just use the integer values instead of the strings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants