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

Failed to parse template ssh/sshd_config.erb (undefined method) #26

Closed
rfay opened this issue Mar 10, 2014 · 18 comments
Closed

Failed to parse template ssh/sshd_config.erb (undefined method) #26

rfay opened this issue Mar 10, 2014 · 18 comments

Comments

@rfay
Copy link
Contributor

rfay commented Mar 10, 2014

v2.3.1 seems to have a (fatal) problem with sshd_config.erb (or what's being input to it). A casual glance didn't explain it to me.

Error: Failed to parse template ssh/sshd_config.erb:
  Filepath: /tmp/vagrant-puppet-1/modules-0/ssh/templates/sshd_config.erb
  Line: 3
  Detail: undefined method `<=>' for false:FalseClass
 at /tmp/vagrant-puppet-1/modules-0/ssh/manifests/server/config.pp:7 on node xxx
@saz
Copy link
Owner

saz commented Mar 10, 2014

Do you set any additional options?

@rfay
Copy link
Contributor Author

rfay commented Mar 10, 2014

Use it like this:

`

sshd configuration

class { 'ssh::server':
storeconfigs_enabled => false,
options => {
'PasswordAuthentication' => 'no',
'PermitRootLogin' => 'no',
},
}
`

@jgornick
Copy link

I'm experiencing the same issue when using the options. Any updates on this.

@saz
Copy link
Owner

saz commented Mar 13, 2014

Can you verify, if this error occurs without setting any additional options?

What version of Puppet have you running?

@saz
Copy link
Owner

saz commented Mar 13, 2014

@jgornick Can you post your settings, too?

@gtpuppet2014
Copy link

I'm experiencing the same issue when using the options:

sshd configuration

class { 'ssh::server':
storeconfigs_enabled => false,
options => {
'PasswordAuthentication' => 'yes',
'PermitRootLogin' => 'yes',
},
}
os: Debian 7
Puppet version: 2.7.23 (from apt.puppetlabs.com)

Error message:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template ssh/sshd_config.erb:
Filepath: /etc/puppet/modules/ssh/templates/sshd_config.erb
Line: 3
Detail: undefined method `<=>' for false:FalseClass

@jgornick
Copy link

@saz Configuration and details below:

class { 'ssh::server':
    storeconfigs_enabled => false,
    options => {
        'PasswordAuthentication' => 'no',
        'PermitRootLogin' => 'no',
    },
}

OS: Ubuntu 12.04.4
Puppet 3.4.3

@saz
Copy link
Owner

saz commented Mar 13, 2014

Does this error occur with puppet running under ruby 1.8.7?

@jgornick
Copy link

@saz I am running ruby 1.8.7 on Ubuntu 12.04.

@gtpuppet2014
Copy link

I have the same issue using puppet 2.7 and ruby 1.8.7 on debian wheezy.

@saz
Copy link
Owner

saz commented Mar 13, 2014

It seems that this problem only occurs on ruby 1.8.7. I'm not sure, why this is happening but I'll investigate it further and will write a test to make sure it's working on ruby 1.8.7 and 1.9

@saz
Copy link
Owner

saz commented Mar 13, 2014

Does this error still occur with the newest release 2.3.3?

@gtpuppet2014
Copy link

No, it isn't. Solved for me!

@jgornick
Copy link

@saz Do you (want to) officially support ruby 1.8.7.

@saz
Copy link
Owner

saz commented Mar 14, 2014

I'm trying to keep the module working on ruby >=1.8.7 with puppet >=2.7

@saz
Copy link
Owner

saz commented Mar 14, 2014

FYI: I've improved the spec test, which seems to suggest, that it's working on 1.8.7 again.

@rfay
Copy link
Contributor Author

rfay commented Mar 14, 2014

This is working great for me now on RHEL 6. Thanks so much, and thanks for all your effort maintaining this (and other) modules.

@bishgupp
Copy link

getting this on Windows client - is the fix a updated Ruby for windows as well?
...
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template datadog_agent/datadog.conf.erb:
Filepath: /etc/puppet/environments/pebishop_datadogagent_rb_eo/sdk/datadog_agent/templates/datadog.conf.erb
Line: 10
Detail: undefined method `empty?' for nil:NilClass
at /etc/puppet/environments/pebishop_datadogagent_rb_eo/modules/profile/manifests/datadogagent/basewindows.pp:89 on node bo1datapup01.csnzoo.
com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
PS C:\windows\system32> npm
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • npm
  •   + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

...

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

No branches or pull requests

5 participants