Error: Could not find class apache

83 views
Skip to first unread message

Maruti Gangumolu

unread,
Jan 25, 2016, 8:11:54 PM1/25/16
to Puppet Users
Hi Team,

I'm new to puppet coding and I'm trying to install apache tomcat using class which is being included in nodes.pp file.

I'm getting this error message when running site.pp file

C:\ABC\Puppet\manifests>puppet apply C:\ABC\Puppet\manifests\site.pp
Warning: The use of 'import' is deprecated at C:/ABC/Puppet/manifests/site.pp
:1. See http://links.puppetlabs.com/puppet-import-deprecation
   (at C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/parser/parser_suppo
rt.rb:110:in `import')
Error: Could not find class apache for xxxx on node imiblr
Error: Could not find class apache for xxxx on node imiblr

Could you please help me in fixing this issue?

Lowe Schmidt

unread,
Jan 26, 2016, 11:53:18 AM1/26/16
to puppet...@googlegroups.com
You will have to show us the relevant puppet code and link to the module you are using.

Also read the link in the error message.


--
Lowe Schmidt | +46 723 867 157

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2a28a925-5fd8-4d2e-992d-c4df22e944b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maruti Gangumolu

unread,
Jan 26, 2016, 2:32:07 PM1/26/16
to puppet...@googlegroups.com
Hi Lowe,

Here are the details....

This is the directory structure for manifests file site.pp and nodes.pp  :-  "C:\Maruti\Puppet\manifests"

The is the code for site.pp file

import 'nodes.pp'

This is the code for nodes.pp file

node 'IMIBLRKA1030' {
 include apache
}

--------

This is the directory structure for module's manifests file  init.pp :- "C:\Maruti\Puppet\modules\apache\manifests"
This is the code for init.pp file

# Manage apache tomcat v8 application server
class apache {
 package { 'Tomcat8' :
  ensure => present,
  source => 'C:/Maruti/Puppet/apache-tomcat-8.0.30.exe',
  install_options => ['/S','/D=C:\Maruti\Puppet\apache-tomcat-8'],
  description => 'Installing tomcat v8.0.30 on windows system', 
 }
}

and I'm invoking site.pp file using puppet apply command as mentioned below and getting class apache is not found.

C:\>puppet apply C:\Maruti\Puppet\manifests\site.pp
Warning: The use of 'import' is deprecated at C:/Maruti/Puppet/manifests/site.pp

:1. See http://links.puppetlabs.com/puppet-import-deprecation
   (at C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/parser/parser_suppo
rt.rb:110:in `import')
Error: Could not find class apache for xxxxx on node imiblrka
Error: Could not find class apache for xxxxx on node imiblrka

Thanks,
Maruti.







--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/tIS3pSfnrSQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.

Frederik Bjerggaard Nielsen

unread,
Jan 27, 2016, 11:26:37 AM1/27/16
to Puppet Users
What if you try running:

puppet apply C:\Maruti\Puppet\manifests\site.pp --modulepath C:\Maruti\Puppet\modules

Maruti Gangumolu

unread,
Jan 27, 2016, 8:19:01 PM1/27/16
to puppet...@googlegroups.com
The behaviour was same!

From: Frederik Bjerggaard Nielsen
Sent: ‎27-‎01-‎2016 16:56
To: Puppet Users
Subject: Re: [Puppet Users] Error: Could not find class apache

Maruti Gangumolu

unread,
Jan 30, 2016, 4:16:17 PM1/30/16
to puppet...@googlegroups.com
Thanks All,

Finally it worked for me. I gave wrong path for modulepath.

Thanks,
Maruti.
Reply all
Reply to author
Forward
0 new messages