Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am getting an error of err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter port at /etc/puppet/manifests/nodes/node.pp:652 on node test-puppet

My puppet class: (The Line 652 at node.pp)

node 'test-puppet'  {
  class { 'syslog_ng':
     host    => "newhost",
     ip      => "192.168.1.10",
     port    => "1999",
     logfile => "/var/log/test.log",
  }
}

On the module side

class syslog_ng::config (
  $host ,
  $ip  ,
  $port,
  $logfile){

  file {'/etc/syslog-ng/syslog-ng.conf':
    ensure  => present,
    owner   => 'root',
    group   => 'root',
    content => template('syslog-ng/syslog-ng.conf.erb'),
    notify  => Service['syslog-ng'],
    require => Class['syslog_ng::install'],
  }
  file {"/etc/syslog-ng/conf/${host}.conf":
    ensure  => present,
    owner   => 'root',
    group   => 'root',
    notify  => Service['syslog-ng'],
    content => template("syslog-ng/${host}.conf.erb"),
    require => Class['syslog_ng::install'],
  }

}

I think I am doing it as per the puppet documentation.

share|improve this question
    
BTW, what exactly is on line number 652? That 652 is the line number of the particular file you should be looking at. –  Zoredache Oct 24 '12 at 21:22
    
the line 652 is node 'test-puppet' { –  chandank Oct 24 '12 at 22:27
1  
Ok, next question. Shouldn't it be class { 'syslog_ng::config': instead of class { 'syslog_ng':? –  Zoredache Oct 24 '12 at 22:39
    
Actually I already have that class defined, in my init.pp file.class syslog_ng { include syslog_ng::install,syslog_ng::service } and then I have different files for each component manifests]$ ls config.pp init.pp install.pp service.pp –  chandank Oct 24 '12 at 23:10
1  
I think you missed the point. If you are calling syslog_ng, then shouldn't it be the class with the parameters? –  Zoredache Oct 24 '12 at 23:19
show 1 more comment

1 Answer

This was a great example of super Type error I did. So guys anybody who is struggling just look at my question and main problem was calling syslog_ng rather than syslog_ng::config at the node level. I know this is super stupid but happens.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.