Ask Your Question
0

Java not getting installed on puppet client from catalogue

asked 2017-06-29 16:42:47 -0500

Nanda gravatar image

I did write the following code in puppetmaster - /etc/puppet/manifests/site.pp file:

class { 'java' : package => 'java-1.8.0-openjdk-devel', } tomcat::install { '/opt/tomcat' : sourceurl => 'http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.0.M1/bin/apache-tomcat-9.0.0.M1.tar.gz', } tomcat::instance { 'default' : catalinahome => 'opt/tomcat',

}

On puppet agent, when I run the command "puppet agent -t", getting the following error.

Also validated site.pp using puppet parser validate site.pp command and no errors.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at 'String'; expected ')' at /etc/puppet/modules/java/manifests/init.pp:49 on node puppetclient.demo.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

Any help on resolving this issue is appreciated! Thanks

edit retag flag offensive close merge delete

Comments

please show your site.pp

c4f4t0r gravatar imagec4f4t0r ( 2017-07-03 04:17:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-19 01:16:24 -0500

Quick fix: Edit the file init.pp located (under Centos) here: /etc/puppet/modules/java/manifests/init.pp Remove all the comment in front of the variables starting at line 49 to line 55.

@@ -46,13 +46,13 @@
 # Sample Usage:
 #
 class java(
-  String $distribution                                              = 'jdk',
-  Pattern[/present|installed|latest|^[.+_0-9a-zA-Z:~-]+$/] $version = 'present',
-  Optional[String] $package                                         = undef,
-  Optional[Array] $package_options                                  = undef,
-  Optional[String] $java_alternative                                = undef,
-  Optional[String] $java_alternative_path                           = undef,
-  Optional[String] $java_home                                       = undef
+  $distribution            = 'jdk',
+  $version             = 'present',
+  $package             = undef,
+  $package_options     = undef,
+  $java_alternative        = undef,
+  $java_alternative_path   = undef,
+  $java_home               = undef
 ) {
   include java::params

I've opened a pull request on github

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-06-29 16:42:47 -0500

Seen: 48 times

Last updated: Jun 29