Fusebox
2013-Jan-20 05:38 UTC
[Puppet Users] (New To Puppet)Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo for pupclient on node pupclient
Hello Folks! I am trying to learn puppet. Installed the puppet 3.0.2 and configured one node as the master and the other as the client. Generated the certs and all that. But, I seem to be doing something wrong wrt to the init.pp file. Attached is exact error and my current server configuration. Any help in helping me fix this issue is appreciated: *[root@pupclient ~]# puppet agent --test* *Info: Retrieving plugin* *Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo for pupclient on node pupclient* *Warning: Not using cache on failed catalog* *Error: Could not retrieve catalog; skipping run* puppet.conf file on the client is pointed to the server which I named as puppet and which the client is able to resolve in DNS. *[root@pupclient ~]# cat /etc/puppet/puppet.conf* *[main]* * # The Puppet log directory.* * # The default value is ''$vardir/log''.* * logdir = /var/log/puppet* * * * # Where Puppet PID files are kept.* * # The default value is ''$vardir/run''.* * rundir = /var/run/puppet* * * * # Where SSL certificates are kept.* * # The default value is ''$confdir/ssl''.* * ssldir = $vardir/ssl* *server=puppet* * * *[agent]* * # The file in which puppetd stores a list of the classes* * # associated with the retrieved configuratiion. Can be loaded in* * # the separate ``puppet`` executable using the ``--loadclasses``* * # option.* * # The default value is ''$confdir/classes.txt''.* * classfile = $vardir/classes.txt* * * * # Where puppetd caches the local configuration. An* * # extension indicating the cache format is added automatically.* * # The default value is ''$confdir/localconfig''.* * localconfig = $vardir/localconfig* * * Below is the configuration on the puppet master: * * *[root@puppet manifests]# pwd* */etc/puppet/manifests* * * *[root@puppet manifests]# cat site.pp* *import ''nodes.pp''* *$puppetserver = ''puppet''* * * *[root@puppet manifests]# cat nodes.pp* *node ''pupclient'' {* *include sudo* *package {''firefox'': ensure => present}* *}* *[root@puppet manifests]# pwd* */etc/puppet/modules/sudo/manifests* * * *[root@puppet manifests]# ls -l* *total 4* *-rw-r--r-- 1 root root 327 Jan 19 23:15 init.pp* * * *[root@puppet manifests]# cat init.pp* *class sudo {* *package { sudo:* * ensure => present,* *}* *if $operatingsystem == "Ubuntu" {* *package { "sudo-ldap":* * ensure => present,* * require => Package["sudo],* * }* *}* *file { "/etc/sudoers":* * owner => root,* * group => root,* * mode => 0440,* * source => "puppet://$puppetserver/modules/sudo/etc/sudoers",* * require => Package["sudo"],* * }* *}* * * Is this error result of a syntax issue or something else? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/elQPK2m6uLkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Iain Sutton
2013-Jan-21 02:40 UTC
Re: [Puppet Users] (New To Puppet)Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo for pupclient on node pupclient
It looks like a syntax issue (at a minimum): *package { "sudo-ldap":* * ensure => present,* * require => Package["sudo],* * }* *}* * * There isn''t a trailing doublequote for the "sudo" line. On 20 January 2013 16:38, Fusebox <dnvikram@gmail.com> wrote:> Hello Folks! > > I am trying to learn puppet. Installed the puppet 3.0.2 and configured one > node as the master and the other as the client. Generated the certs and all > that. But, I seem to be doing something wrong wrt to the init.pp file. > Attached is exact error and my current server configuration. Any help in > helping me fix this issue is appreciated: > > *[root@pupclient ~]# puppet agent --test* > *Info: Retrieving plugin* > *Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: Could not find class sudo for pupclient on node pupclient* > *Warning: Not using cache on failed catalog* > *Error: Could not retrieve catalog; skipping run* > > puppet.conf file on the client is pointed to the server which I named as > puppet and which the client is able to resolve in DNS. > *[root@pupclient ~]# cat /etc/puppet/puppet.conf* > *[main]* > * # The Puppet log directory.* > * # The default value is ''$vardir/log''.* > * logdir = /var/log/puppet* > * > * > * # Where Puppet PID files are kept.* > * # The default value is ''$vardir/run''.* > * rundir = /var/run/puppet* > * > * > * # Where SSL certificates are kept.* > * # The default value is ''$confdir/ssl''.* > * ssldir = $vardir/ssl* > *server=puppet* > * > * > *[agent]* > * # The file in which puppetd stores a list of the classes* > * # associated with the retrieved configuratiion. Can be loaded in* > * # the separate ``puppet`` executable using the ``--loadclasses``* > * # option.* > * # The default value is ''$confdir/classes.txt''.* > * classfile = $vardir/classes.txt* > * > * > * # Where puppetd caches the local configuration. An* > * # extension indicating the cache format is added automatically.* > * # The default value is ''$confdir/localconfig''.* > * localconfig = $vardir/localconfig* > > * > * > Below is the configuration on the puppet master: > * > * > *[root@puppet manifests]# pwd* > */etc/puppet/manifests* > * > * > *[root@puppet manifests]# cat site.pp* > *import ''nodes.pp''* > *$puppetserver = ''puppet''* > * > * > *[root@puppet manifests]# cat nodes.pp* > *node ''pupclient'' {* > *include sudo* > *package {''firefox'': ensure => present}* > *}* > > *[root@puppet manifests]# pwd* > */etc/puppet/modules/sudo/manifests* > * > * > *[root@puppet manifests]# ls -l* > *total 4* > *-rw-r--r-- 1 root root 327 Jan 19 23:15 init.pp* > * > * > *[root@puppet manifests]# cat init.pp* > *class sudo {* > *package { sudo:* > * ensure => present,* > *}* > *if $operatingsystem == "Ubuntu" {* > *package { "sudo-ldap":* > * ensure => present,* > * require => Package["sudo],* > * }* > *}* > *file { "/etc/sudoers":* > * owner => root,* > * group => root,* > * mode => 0440,* > * source => "puppet://$puppetserver/modules/sudo/etc/sudoers",* > * require => Package["sudo"],* > * }* > *}* > * > * > Is this error result of a syntax issue or something else? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/elQPK2m6uLkJ. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Fusebox
2013-Jan-22 01:10 UTC
Re: [Puppet Users] (New To Puppet)Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo for pupclient on node pupclient
yeah..I figured that out after posting..works after fixing it.. but thanks for looking into it and responding..appreciate much :) On Sunday, January 20, 2013 8:40:54 PM UTC-6, nseagoon wrote:> > It looks like a syntax issue (at a minimum): > > *package { "sudo-ldap":* > * ensure => present,* > * require => Package["sudo],* > * }* > *}* > * > * > There isn''t a trailing doublequote for the "sudo" line. > > On 20 January 2013 16:38, Fusebox <dnvi...@gmail.com <javascript:>> wrote: > >> Hello Folks! >> >> I am trying to learn puppet. Installed the puppet 3.0.2 and configured >> one node as the master and the other as the client. Generated the certs and >> all that. But, I seem to be doing something wrong wrt to the init.pp file. >> Attached is exact error and my current server configuration. Any help in >> helping me fix this issue is appreciated: >> >> *[root@pupclient ~]# puppet agent --test* >> *Info: Retrieving plugin* >> *Error: Could not retrieve catalog from remote server: Error 400 on >> SERVER: Could not find class sudo for pupclient on node pupclient* >> *Warning: Not using cache on failed catalog* >> *Error: Could not retrieve catalog; skipping run* >> >> puppet.conf file on the client is pointed to the server which I named as >> puppet and which the client is able to resolve in DNS. >> *[root@pupclient ~]# cat /etc/puppet/puppet.conf* >> *[main]* >> * # The Puppet log directory.* >> * # The default value is ''$vardir/log''.* >> * logdir = /var/log/puppet* >> * >> * >> * # Where Puppet PID files are kept.* >> * # The default value is ''$vardir/run''.* >> * rundir = /var/run/puppet* >> * >> * >> * # Where SSL certificates are kept.* >> * # The default value is ''$confdir/ssl''.* >> * ssldir = $vardir/ssl* >> *server=puppet* >> * >> * >> *[agent]* >> * # The file in which puppetd stores a list of the classes* >> * # associated with the retrieved configuratiion. Can be loaded in* >> * # the separate ``puppet`` executable using the ``--loadclasses``* >> * # option.* >> * # The default value is ''$confdir/classes.txt''.* >> * classfile = $vardir/classes.txt* >> * >> * >> * # Where puppetd caches the local configuration. An* >> * # extension indicating the cache format is added automatically.* >> * # The default value is ''$confdir/localconfig''.* >> * localconfig = $vardir/localconfig* >> >> * >> * >> Below is the configuration on the puppet master: >> * >> * >> *[root@puppet manifests]# pwd* >> */etc/puppet/manifests* >> * >> * >> *[root@puppet manifests]# cat site.pp* >> *import ''nodes.pp''* >> *$puppetserver = ''puppet''* >> * >> * >> *[root@puppet manifests]# cat nodes.pp* >> *node ''pupclient'' {* >> *include sudo* >> *package {''firefox'': ensure => present}* >> *}* >> >> *[root@puppet manifests]# pwd* >> */etc/puppet/modules/sudo/manifests* >> * >> * >> *[root@puppet manifests]# ls -l* >> *total 4* >> *-rw-r--r-- 1 root root 327 Jan 19 23:15 init.pp* >> * >> * >> *[root@puppet manifests]# cat init.pp* >> *class sudo {* >> *package { sudo:* >> * ensure => present,* >> *}* >> *if $operatingsystem == "Ubuntu" {* >> *package { "sudo-ldap":* >> * ensure => present,* >> * require => Package["sudo],* >> * }* >> *}* >> *file { "/etc/sudoers":* >> * owner => root,* >> * group => root,* >> * mode => 0440,* >> * source => "puppet://$puppetserver/modules/sudo/etc/sudoers",* >> * require => Package["sudo"],* >> * }* >> *}* >> * >> * >> Is this error result of a syntax issue or something else? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/puppet-users/-/elQPK2m6uLkJ. >> To post to this group, send email to puppet...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> puppet-users...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/SDVqxW7FC-0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Cochard
2013-Jan-22 21:31 UTC
Re: [Puppet Users] (New To Puppet)Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo for pupclient on node pupclient
Something to help you avoid it in the future: Put all of your puppet manifests into a git repo (very good practice to get setup right away), and then put a git pre-commit hook that uses puppet parser validate to check for syntax errors. This will basically not let you commit new manifests if they have syntax problems. Much more efficient troubleshooting. This site covers the details: http://projects.puppetlabs.com/projects/1/wiki/puppet_version_control On Monday, January 21, 2013 5:10:49 PM UTC-8, Fusebox wrote:> > yeah..I figured that out after posting..works after fixing it.. but thanks > for looking into it and responding..appreciate much :) > > On Sunday, January 20, 2013 8:40:54 PM UTC-6, nseagoon wrote: >> >> It looks like a syntax issue (at a minimum): >> >> *package { "sudo-ldap":* >> * ensure => present,* >> * require => Package["sudo],* >> * }* >> *}* >> * >> * >> There isn''t a trailing doublequote for the "sudo" line. >> >> On 20 January 2013 16:38, Fusebox <dnvi...@gmail.com> wrote: >> >>> Hello Folks! >>> >>> I am trying to learn puppet. Installed the puppet 3.0.2 and configured >>> one node as the master and the other as the client. Generated the certs and >>> all that. But, I seem to be doing something wrong wrt to the init.pp file. >>> Attached is exact error and my current server configuration. Any help in >>> helping me fix this issue is appreciated: >>> >>> *[root@pupclient ~]# puppet agent --test* >>> *Info: Retrieving plugin* >>> *Error: Could not retrieve catalog from remote server: Error 400 on >>> SERVER: Could not find class sudo for pupclient on node pupclient* >>> *Warning: Not using cache on failed catalog* >>> *Error: Could not retrieve catalog; skipping run* >>> >>> puppet.conf file on the client is pointed to the server which I named as >>> puppet and which the client is able to resolve in DNS. >>> *[root@pupclient ~]# cat /etc/puppet/puppet.conf* >>> *[main]* >>> * # The Puppet log directory.* >>> * # The default value is ''$vardir/log''.* >>> * logdir = /var/log/puppet* >>> * >>> * >>> * # Where Puppet PID files are kept.* >>> * # The default value is ''$vardir/run''.* >>> * rundir = /var/run/puppet* >>> * >>> * >>> * # Where SSL certificates are kept.* >>> * # The default value is ''$confdir/ssl''.* >>> * ssldir = $vardir/ssl* >>> *server=puppet* >>> * >>> * >>> *[agent]* >>> * # The file in which puppetd stores a list of the classes* >>> * # associated with the retrieved configuratiion. Can be loaded in* >>> * # the separate ``puppet`` executable using the ``--loadclasses``* >>> * # option.* >>> * # The default value is ''$confdir/classes.txt''.* >>> * classfile = $vardir/classes.txt* >>> * >>> * >>> * # Where puppetd caches the local configuration. An* >>> * # extension indicating the cache format is added automatically.* >>> * # The default value is ''$confdir/localconfig''.* >>> * localconfig = $vardir/localconfig* >>> >>> * >>> * >>> Below is the configuration on the puppet master: >>> * >>> * >>> *[root@puppet manifests]# pwd* >>> */etc/puppet/manifests* >>> * >>> * >>> *[root@puppet manifests]# cat site.pp* >>> *import ''nodes.pp''* >>> *$puppetserver = ''puppet''* >>> * >>> * >>> *[root@puppet manifests]# cat nodes.pp* >>> *node ''pupclient'' {* >>> *include sudo* >>> *package {''firefox'': ensure => present}* >>> *}* >>> >>> *[root@puppet manifests]# pwd* >>> */etc/puppet/modules/sudo/manifests* >>> * >>> * >>> *[root@puppet manifests]# ls -l* >>> *total 4* >>> *-rw-r--r-- 1 root root 327 Jan 19 23:15 init.pp* >>> * >>> * >>> *[root@puppet manifests]# cat init.pp* >>> *class sudo {* >>> *package { sudo:* >>> * ensure => present,* >>> *}* >>> *if $operatingsystem == "Ubuntu" {* >>> *package { "sudo-ldap":* >>> * ensure => present,* >>> * require => Package["sudo],* >>> * }* >>> *}* >>> *file { "/etc/sudoers":* >>> * owner => root,* >>> * group => root,* >>> * mode => 0440,* >>> * source => "puppet://$puppetserver/modules/sudo/etc/sudoers",* >>> * require => Package["sudo"],* >>> * }* >>> *}* >>> * >>> * >>> Is this error result of a syntax issue or something else? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Puppet Users" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/puppet-users/-/elQPK2m6uLkJ. >>> To post to this group, send email to puppet...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/tiNvdSArEUoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.