Ask Your Question
0

I am trying install tomcat on my agent with master but I am getting many errors.

asked 2017-07-05 00:53:36 -0600

Ram gravatar image

updated 2017-07-05 10:59:13 -0600

DarylW gravatar image

I am using Centos 6 Google cloud Vms

In my manifests I am writing a code in site.pp and in agent simple classes and node scripts to install apache and mysql ran succesfuuly.

Now I am using the follwing code to install tomcat in agent.

class { 'java': }

tomcat::install { '/opt/tomcat8':
  source_url => 'https://www.apache.org/dist/tomcat/tomcat-8/v8.0.x/bin/apache-tomcat-8.0.x.tar.gz'
}
tomcat::instance { 'tomcat8-first':
  catalina_home => '/opt/tomcat8',
  catalina_base => '/opt/tomcat8/first',
}
tomcat::instance { 'tomcat8-second':
  catalina_home => '/opt/tomcat8',
  catalina_base => '/opt/tomcat8/second',
}
# Change the default port of the second instance server and HTTP connector
tomcat::config::server { 'tomcat8-second':
  catalina_base => '/opt/tomcat8/second',
  port          => '8006',
}
tomcat::config::server::connector { 'tomcat8-second-http':
  catalina_base         => '/opt/tomcat8/second',
  port                  => '8081',
  protocol              => 'HTTP/1.1',
  additional_attributes => {
    'redirectPort' => '8443'
  },
}

In agent I ma using puppet agent -t , Error:

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Connection refused - connect(2)
Info: Retrieving pluginfacts
Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2)
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://master-1.c.connection-169807.internal/pluginfacts: Connection refused - connect(2)
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2)
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://master-1.c.connection-169807.internal/plugins: Connection refused - connect(2)
Info: Loading facts
Error loading fact /var/lib/puppet/lib/facter/staging_windir.rb: /var/lib/puppet/lib/facter/staging_windir.rb:2: syntax error, unexpected ':', expecting kEND
  confine osfamily: :windows
                   ^
Error: Could not retrieve catalog from remote server: Connection refused - connect(2)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Connection refused - connect(2)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-10 00:17:14 -0600

joshc gravatar image

There's a syntax error in your staging_windir fact (or in a module you're using). It needs to be:

confine :osfamily => 'windows'

Not

 confine osfamily: :windows
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

1 follower

Stats

Asked: 2017-07-05 00:53:36 -0600

Seen: 59 times

Last updated: Aug 10