Ask Your Question
1

Error: Could not retrieve catalog from remote server: Error 400 on SERVER

asked 2017-08-09 09:26:21 -0600

rajeshsood87 gravatar image

updated 2017-08-09 23:12:39 -0600

joshc gravatar image

I am actually trying to run Apache module but getting the following error::

[vagrant@wiki puppet]$ sudo puppet agent --verbose --no-daemonize --onetime
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at 'Boolean'; expected ')' at /etc/puppet/environments/production/modules/apache/manifests/init.pp:19 on node wiki
Notice: Using cached catalog
Info: Applying configuration version '1501910423'
Error: Could not start Service[undef]: Execution of '/sbin/service undef start' returned 1: undef: unrecognized service
Error: /Stage[main]/Linux/Service[undef]/ensure: change from stopped to running failed: Could not start Service[undef]: Execution of '/sbin/service undef start' returned 1: undef: unrecognized service
Notice: Finished catalog run in 0.35 seconds

Following is my init.pp:

class mediawiki {

  $phpmysql = $osfamily ? {
    'redhat' => 'php-mysql',
    'debian' => 'php5-mysql',
    default => 'php-mysql',
  }

  package { $phpmysql:
    ensure => 'present',
  }

  if $osfamily == 'redhat' {
    package { 'php-xml':
      ensure => 'present',
    }
  }

  class { '::apache':
    docroot    => '/var/www/html',
    mpm_module => 'prefork',
    subscribe => Package[$phpmysql],
  }

  class { '::apache::mod::php': }
}
edit retag flag offensive close merge delete

Comments

What version of puppet are you using? `puppet -V`

Red Cricket gravatar imageRed Cricket ( 2017-08-13 13:15:53 -0600 )edit

[vagrant@puppetmaster ~]$ sudo puppet -V 3.8.7

rajeshsood87 gravatar imagerajeshsood87 ( 2017-08-14 00:10:22 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-14 01:10:49 -0600

ramindk gravatar image

The key line in your log is this one

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at 'Boolean'; expected ')' at /etc/puppet/environments/production/modules/apache/manifests/init.pp:19 on node wiki

'Boolean' is a new keyword in Puppet 4.0 or 3.8.x with the future parser enabled. You may need to downgrade the module you're using to a version that supports Puppet 3.x. Or you can upgrade Puppet to 4.x.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-08-09 09:26:21 -0600

Seen: 616 times

Last updated: Aug 14