Giter Club home page Giter Club logo

puppet-tomcat's Introduction

Tomcat Puppet module

Puppet Forge Version Puppet Forge Downloads Build Status Gemnasium By Camptocamp

Manages Tomcat configuration.

This module is provided by Camptocamp.

This module will install tomcat, either using you system's package manager or from a compressed archive available on one of the tomcat-mirrors.

This is done by including the tomcat class for a package based setup or declaring the class with the parameter sources => true for a source based setup.

Instances

You'll then be able to define one or more tomcat instances, where you can drop your webapps in the ".war" format. This is done with the tomcat::instance definition.

The idea is to have several independent tomcats running on the same host, each of which can be restarted and managed independently. If one of them happens to crash, it won't affect the other instances. The drawback is that each tomcat instance starts it's own JVM, which consumes memory.

This is implemented by having a shared $CATALINA_HOME, and each instance having it's own $CATALINA_BASE. More details are found in this document: http://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt

Logging

To offer more flexibility and avoid having to restart tomcat each time catalina.out is rotated, tomcat is configured to send it's log messages to log4j. By default log4j is configured to send all log messages from all instances to /var/log/tomcat/tomcat.log.

This can easily be overridden on an instance base by creating a custom log4j.properties file and setting the common.loader path to point to it, by editing /srv/tomcat/<name>/conf/catalina.properties.

Defaults

By default a new tomcat instance create by a tomcat::instance resource will listen on the following ports:

  • 8080 HTTP
  • 8005 Control
  • 8009 AJP

You should override these defaults by setting attributes server_port, http_port and ajp_port.

Limitations

  • there is no way to automatically manage webapps (\*.war files).
  • the initscript calls catalina.sh instead of using jsvc. This prevents tomcat from listening on ports < 1024.

Examples

Simple standalone instance:

Create a standalone tomcat instance whose HTTP server listen on port 8080:

Exec {
  path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin',
}

include tomcat

tomcat::instance {'myapp':
  ensure    => present,
  http_port => '8080',
}

If you want to install a specific tomcat version from a specific mirror:

class { 'tomcat':
  version     => 6,
  sources     => true,
  sources_src => 'http://archive.apache.org/dist/tomcat/',
}

Apache integration

Pre-requisites:

include apache_c2c

apache_c2c::module {'proxy_ajp':
  ensure  => present,
}

apache_c2c::vhost {'www.mycompany.com':
  ensure => present,
}

Create a tomcat instance which is accessible via Apache using AJP on a given virtualhost:

include tomcat

tomcat::instance {'myapp':
  ensure      => present,
  ajp_port    => '8000'
}

apache_c2c::proxypass {'myapp':
  ensure   => present,
  location => '/myapp',
  vhost    => 'www.mycompany.com',
  url      => 'ajp://localhost:8000',
}

Multiple instances

If you create multiple Tomcat instances, you must avoid port clash by setting distinct ports for each instance:

include tomcat

tomcat::instance {'tomcat1':
  ensure      => present,
  server_port => '8005',
  http_port   => '8080',
  ajp_port    => '8009',
}

tomcat::instance {'tomcat2':
  ensure      => present,
  server_port => '8006',
  http_port   => '8081',
  ajp_port    => '8010',
}

Create a tomcat instance with custom connectors

First you have to declare you connectors then they are added to the tomcat-instance:

include tomcat

tomcat::connector{'http-8080':
  ensure   => present,
  instance => 'tomcat1',
  protocol => 'HTTP/1.1',
  port     => 8080,
  manage   => true,
}

tomcat::connector{'ajp-8081':
  ensure   => present
  instance => 'tomcat1'
  protocol => 'AJP/1.3',
  port     => 8081,
  manage   => true,
}

tomcat::instance {'tomcat1':
  ensure    => present,
  group     => 'tomcat-admin',
  manage    => true,
  connector => ['http-8080','ajp-8081'],
}

puppet-tomcat's People

Contributors

bdeheij avatar brunoleon avatar cjeanneret avatar ckaenzig avatar coreone avatar dabelenda avatar ekohl avatar francois-c2c avatar fredj avatar gwarf avatar illambias avatar jasperla avatar jgodin-c2c avatar lconsuegra avatar mbornoz avatar mcanevet avatar mremy avatar ndf-dw avatar pmauduit avatar raphink avatar saimonn avatar slyoldfox avatar toepi avatar wleese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-tomcat's Issues

server/config.pp unable to find template 'tomcat/setenv.sh.erb'

It looks like a template has gone missing - or perhaps been re-named - and the tomcat::server::config definition not updated.

Error: Could not find template 'tomcat/setenv.sh.erb' at /tmp/vagrant-puppet-1/modules-0/tomcat/manifests/server/config.pp:11

Regards,
Jon

catalina logrotate configuration error

There is currently 2 problems on Debian 8 with the default ERB template:

  1. group tomcat-admin does not exist anymore
  2. we have to use "su" directive to tell logrotate which user/group should be used for rotation

error on default config

Here the simple manifets I'm using on ubuntu 12.04 LTS:

include tomcat

tomcat::instance {'xwiki':
  ensure    => present,
  http_port => '8080',
}

I get the following error:

Notice: Compiled catalog for puppet in environment production in 3.29 seconds
Error: Validation of Exec[download digest of archive tomcat-juli.jar] failed: 'curl   -o /usr/share/tomcat6/extras//tomcat-juli.jar.md5 http://archive.apache.org/dist/tomcat//tomcat-6/v6.0.26/bin/extras/tomcat-juli.jar.md5' is not qualified and no path was specified. Please qualify the command or specify a path. at /etc/puppet/modules/archive/manifests/download.pp:85
Wrapped exception:
'curl   -o /usr/share/tomcat6/extras//tomcat-juli.jar.md5 http://archive.apache.org/dist/tomcat//tomcat-6/v6.0.26/bin/extras/tomcat-juli.jar.md5' is not qualified and no path was specified. Please qualify the command or specify a path.

Default java_home for RHEL

The default JAVA_HOME value for RHEL is /usr/lib/jvm/java which is not valid on RHEL with the openjdk. Should there be a more sensible default here, or maybe some more logic?

Suggestions?

catalina.out logrotate error

On Debian Wheezy, when I set up a Tomcat instance like so:

class { "::tomcat":
version => '7'
}

tomcat::instance { 'foo':
ensure => 'present',
server_port => $tomcat_server_port,
http_port => $tomcat_http_port,
ajp_port => $tomcat_ajp_port
}

The module creates /etc/logrotate.d/catalina-foo containing:

/srv/tomcat/foo/logs/catalina.out {
copytruncate
size 500M
dateext
rotate 53
compress
delaycompress
missingok
create 644 tomcat tomcat-admin
}

This generates an error from logrotate:

/etc/cron.daily/logrotate:
error: catalina-foo:10 unknown group 'tomcat-admin'
error: found error in /srv/tomcat/foo/logs/catalina.out , skipping
error: skipping "/srv/tomcat/foo/logs/catalina.out" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

When I create the tomcat-admin group manually and add the following to the instance declaration in the manifest:

group => 'tomcat-admin',

The group ownership of the instance directories updates but when I run logrotate the same permissions error occurs:

error: skipping "/srv/tomcat/foo/logs/catalina.out" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

I can resolve this by specifying the logs_mode in the instance declaration:

logs_mode => '2750',

A quick fix would be to remove the group-write from the default mode of the file resource that creates the log/ directory.

More comprehensively, it would be good to update the 'create' line the logrotate.catalina.erb template to include the group parameter:

  create 644 tomcat <%= @group =>

But I imagine you must have some reason for marking the logrotate file explicitly as 'unmanaged'?

tomcat::instance setenv not applied in centos7?

Hello,

We are moving from centos6 to 7 and our application fails to load because the variables we set in setenv do not get to tomcat. Here it is the instance declaration:

 tomcat::instance {"jira":
   ensure    => running,
   http_port => 8080,
   ajp_port  => 8010,
   tomcatAuthentication => 'false',
        setenv      => [
        'TZ=`date +%Z`',
        "JAVA_XMX=\"${jira::java_xmx}\"",
        "JAVA_XX_MAXPERMSIZE=\"${jira::java_xx_maxpermsize}\"",
        "ADD_JAVA_OPTS=\"-Xms${jira::java_xms} -Dmail.mime.decodeparameters=true -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Duser.timezone=${jira::tz} -Datlassian.plugins.enable.wait=300 -Dfile.encoding=utf-8 -Doracle.net.tns_admin=/etc/ -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1\"",
        'PATH="/usr/local/bin:$PATH"',
    ],  
 #  packetSize => "${jira::packetSize}",
 }

Do you know what are we doing wrong?

Cheers

Impossible to set version to 6.0.32

Although in init.pp and instance.pp version is validated to be a detailed version like 6.0.32

validate_re($version, '^[5-7]([\.0-9]+)?$')

both manifests assume it is either 5, 6 or 7:

init.pp:

  $src_version = $version? {
    5 => '5.5.27',
    6 => '6.0.26',
    7 => '7.0.42',
  }

instance.pp:

  # default server.xml is slightly different between tomcat5.5 and tomcat6 or 7
  $serverdotxml = $version? {
    5 => 'server.xml.tomcat55.erb',
    6 => 'server.xml.tomcat6.erb',
    7 => 'server.xml.tomcat7.erb',
  }

dependency cycles w/tomcat::source

Pulled from github on 5/25, ran 'include tomcat::source' on Ubuntu 11.04. It appears to be a problem w/tomcat-juli -- as I can comment out that include and re-run without issues. I've run with --graph == true. But being a newb, I'm not seeing anything unusual with the graphic rendering of the .dot files. I can send those if request.

debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
debug: /Stage[main]/Tomcat::Source/Common::Archive[apache-tomcat-6.0.26]/Common::Archive::Extract[apache-tomcat-6.0.26]/require: requires Common::Archive::Download[apache-tomcat-6.0.26.tar.gz]
debug: /Stage[main]/Tomcat::Juli/File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar]/require: requires Common::Archive::Download[tomcat-juli.jar]
debug: /Stage[main]/Users::Virtual/User[customapps]/require: requires Group[customapps]
debug: /Stage[main]/Cron::Base/Service[crond]/require: requires Package[cron]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli.jar]/Exec[download digest of archive tomcat-juli.jar]/require: requires Package[curl]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli.jar]/Exec[download digest of archive tomcat-juli.jar]/notify: subscribes to Exec[download archive tomcat-juli.jar and check sum]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli-adapters.jar]/Exec[download digest of archive tomcat-juli-adapters.jar]/require: requires Package[curl]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli-adapters.jar]/Exec[download digest of archive tomcat-juli-adapters.jar]/notify: subscribes to Exec[download archive tomcat-juli-adapters.jar and check sum]
debug: /Stage[main]/Tomcat::Juli/File[/opt/apache-tomcat-6.0.26/extras/]/require: requires File[/opt/apache-tomcat-6.0.26]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli-adapters.jar]/Exec[download archive tomcat-juli-adapters.jar and check sum]/require: requires Package[curl]
debug: /Stage[main]/Tomcat::Juli/File[/opt/apache-tomcat-6.0.26/lib/tomcat-juli-adapters.jar]/require: requires Common::Archive::Download[tomcat-juli-adapters.jar]
debug: /Stage[main]/Tomcat::Source/Common::Archive[apache-tomcat-6.0.26]/Common::Archive::Download[apache-tomcat-6.0.26.tar.gz]/Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum]/require: requires Package[curl]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli-adapters.jar]/require: requires File[/opt/apache-tomcat-6.0.26/extras/]
debug: /Stage[main]/Tomcat::Source/File[/opt/apache-tomcat]/require: requires Common::Archive[apache-tomcat-6.0.26]
debug: /Stage[main]/Tomcat::Source/File[/opt/apache-tomcat]/before: requires File[commons-logging.jar]
debug: /Stage[main]/Tomcat::Source/File[/opt/apache-tomcat]/before: requires File[log4j.jar]
debug: /Stage[main]/Tomcat::Source/File[/opt/apache-tomcat]/before: requires File[log4j.properties]
debug: /Stage[main]/Tomcat::Source/Common::Archive[apache-tomcat-6.0.26]/Common::Archive::Download[apache-tomcat-6.0.26.tar.gz]/Exec[download digest of archive apache-tomcat-6.0.26.tar.gz]/require: requires Package[curl]
debug: /Stage[main]/Tomcat::Source/Common::Archive[apache-tomcat-6.0.26]/Common::Archive::Download[apache-tomcat-6.0.26.tar.gz]/Exec[download digest of archive apache-tomcat-6.0.26.tar.gz]/notify: subscribes to Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli.jar]/Exec[download archive tomcat-juli.jar and check sum]/require: requires Package[curl]
debug: /Stage[main]/Tomcat::Source/File[/opt/apache-tomcat-6.0.26]/require: requires Common::Archive[apache-tomcat-6.0.26]
debug: /Stage[main]/Tomcat::Juli/Common::Archive::Download[tomcat-juli.jar]/require: requires File[/opt/apache-tomcat-6.0.26/extras/]
debug: /Stage[main]/Timezone/Exec[set-timezone]/require: requires File[timezone]
debug: /Stage[main]/Timezone/Exec[set-timezone]/subscribe: subscribes to File[timezone]
debug: /Stage[main]/Tomcat::Base/File[/var/log/tomcat]: Autorequiring User[tomcat]
err: Could not apply complete catalog: Found dependency cycles in the following relationships: Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum] => Exec[apache-tomcat-6.0.26 unpack], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => Exec[apache-tomcat-6.0.26 unpack], File[/opt/apache-tomcat] => File[log4j.jar], File[/opt/apache-tomcat] => File[commons-logging.jar], Exec[download digest of archive tomcat-juli.jar] => File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar], Package[curl] => File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar], Exec[download archive tomcat-juli.jar and check sum] => File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar], File[/opt/apache-tomcat-6.0.26/extras/] => Exec[download digest of archive tomcat-juli.jar], Package[curl] => Exec[download digest of archive tomcat-juli.jar], File[/opt/apache-tomcat-6.0.26/extras/] => Exec[download digest of archive tomcat-juli-adapters.jar], Package[curl] => Exec[download digest of archive tomcat-juli-adapters.jar], File[/opt/apache-tomcat-6.0.26] => File[/opt/apache-tomcat-6.0.26/extras/], File[/opt/apache-tomcat-6.0.26/extras/] => Exec[download archive tomcat-juli-adapters.jar and check sum], Exec[download digest of archive tomcat-juli-adapters.jar] => Exec[download archive tomcat-juli-adapters.jar and check sum], Package[curl] => Exec[download archive tomcat-juli-adapters.jar and check sum], Exec[download digest of archive tomcat-juli-adapters.jar] => File[/opt/apache-tomcat-6.0.26/lib/tomcat-juli-adapters.jar], Exec[download archive tomcat-juli-adapters.jar and check sum] => File[/opt/apache-tomcat-6.0.26/lib/tomcat-juli-adapters.jar], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum], Package[curl] => Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum], File[/opt/apache-tomcat-6.0.26/extras/] => Package[curl], Exec[apache-tomcat-6.0.26 unpack] => File[/opt/apache-tomcat], Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum] => File[/opt/apache-tomcat], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => File[/opt/apache-tomcat], File[/opt/apache-tomcat] => File[log4j.properties], Package[curl] => Exec[download digest of archive apache-tomcat-6.0.26.tar.gz], Exec[download digest of archive tomcat-juli.jar] => Exec[download archive tomcat-juli.jar and check sum], File[/opt/apache-tomcat-6.0.26/extras/] => Exec[download archive tomcat-juli.jar and check sum], Package[curl] => Exec[download archive tomcat-juli.jar and check sum], Exec[apache-tomcat-6.0.26 unpack] => File[/opt/apache-tomcat-6.0.26], Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum] => File[/opt/apache-tomcat-6.0.26], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => File[/opt/apache-tomcat-6.0.26]; try using the '--graph' option and open the '.dot' files in OmniGraffle or GraphViz
debug: Storing state
debug: Stored state in 0.03 seconds

hard coded liberal umask in init script

would be very useful if the umask in tomcat.init.erb was parameterized so that potentially sensitive files created by tomcat would not be world readable by default

Missing logging in rhel (Santiago?)

Congratulations on a rather excellent-looking module.

According to the documentation, logging for each tomcat instance should be configured to go to a central location under /var/log/tomcat6, via log4j.

Using this module to deploy a tomcat6 instance from the distribution package on rhel 6.1 (Santiago), I find that /var/log/tomcat is empty and the instance is writing logs to $CATALINA_BASE/logs/catalina.out.

I have log4j configuration file at /usr/share/tomcat6/conf/log4j.properties, but it appears to be the distribution stock file.
Looking through the manifests, I note that a log4j.properties file is created in logging.pp and that this class is included in redhat.pp for Tikanga but not for Santiago.

Is this intentional or a bug?

CLASSPATH broken on RHEL6

$CLASSPATH is omitting $CATALINA_BASE/lib on RHEL(6). JARs that get put in $CATALINA_BASE/lib are not loaded, only JARs in $CATALINA_HOME/lib.

issue running tomcat

Hi
Yes I have installed sample packages using puppet copying files and editing files now when i am trying to use this module for installing Tomcat i am facing the issue because I do have stdlib under my /etc/puppet/modules/stdlib same location where my tomcat module is
stdlib

Bump some dependency version

PR: #170

root@hostna;e:/etc/puppetlabs/code/environments/production/manifests# puppet module install camptocamp-tomcat --version 1.1.0
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Error: Could not install module 'camptocamp-tomcat' (???)
No version of 'camptocamp-tomcat' can satisfy all dependencies
Use puppet module install --ignore-dependencies to install only this module

This module seems to work just fine with ignoring the dependencies and version:
โ”œโ”€โ”€ puppetlabs-concat (v4.1.1) invalid
โ”œโ”€โ”€ puppetlabs-inifile (v2.1.1) invalid

$CATALINA_BASE/lib not sourced for tomcat 0.0.2

The 0.0.2 version of this module (the version found in Puppet Forge) does not source $CATALINA_BASE/lib for classes and resources. While I can solve this by copying catalina.properties from $CATALINA_HOME/conf to $CATALINA_BASE/conf, I would like to know the proper way of solving this issue, using the camptocamp-tomcat module.

Does the module provide me a way to copy catalina.properties into new Tomcat instances?

Is there another construct I should be using in the module, to properly use $CATALINA_BASE/lib?

Support for tomcat8

The module does not seem to support tomcat8 yet. Are there any plans to support it in the near future?

ArgumentError

Hi,

running a very simple node with

include tomcat

results in

Debug: importing '/tmp/vagrant-puppet/modules-0/java/manifests/params.pp' in environment production
Debug: Automatically imported java::params from java/params into production
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/init.pp' in environment production
Debug: Automatically imported tomcat from tomcat into production
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/debian.pp' in environment production
Debug: Automatically imported tomcat::debian from tomcat/debian into production
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/package.pp' in environment production
Debug: Automatically imported tomcat::package from tomcat/package into production
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/base.pp' in environment production
Debug: Automatically imported tomcat::base from tomcat/base into production
Debug: Failed to load library 'selinux' for feature 'selinux'
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/juli.pp' in environment production
Debug: Automatically imported tomcat::juli from tomcat/juli into production
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/params.pp' in environment production
Debug: Automatically imported tomcat::params from tomcat/params into production
Debug: importing '/tmp/vagrant-puppet/modules-0/tomcat/manifests/source.pp' in environment production
Debug: Automatically imported tomcat::source from tomcat/source into production
Error: Scope(Class[Tomcat::Juli]): undefined mandatory attribute: $tomcat_home
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type archive::download at /tmp/vagrant-puppet/modules-0/tomcat/manifests/juli.pp:36 on node dummyvm
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type archive::download at /tmp/vagrant-puppet/modules-0/tomcat/manifests/juli.pp:36 on node dummyvm

I'm running this on puppet 3.2.2, I've downloaded the module from puppetforge

connector.xml.erb template missing

connector.pp#L93:
concat_fragment { "server.xml_${server}service${service}+20_${connector}":
content => template('tomcat/connector.xml.erb'),
}
but there's no such file connector.xml.erb.

initscript missing / fail to launch the newly created instance

In a catalog run:

==> default: Notice: /Stage[main]/Georchestra::Geoserver/Georchestra::Geoserver::Worker[geoserver0]/Georchestra::Module[geoserver0]/Tomcat::Instance[geoserver0]/Tomcat::Instance::Config[geoserver0]/File[/etc/init.d/tomcat-geoserver0]/ensure: created
==> default: Error: Could not start Service[tomcat-geoserver0]: Execution of '/usr/sbin/service tomcat-geoserver0 start' returned 6: Failed to start tomcat-geoserver0.service: Unit tomcat-geoserver0.service failed to load: No such file or directory.
==> default: Wrapped exception:
==> default: Execution of '/usr/sbin/service tomcat-geoserver0 start' returned 6: Failed to start tomcat-geoserver0.service: Unit tomcat-geoserver0.service failed to load: No such file or directory.
==> default: Error: /Stage[main]/Georchestra::Geoserver/Georchestra::Geoserver::Worker[geoserver0]/Georchestra::Module[geoserver0]/Tomcat::Instance[geoserver0]/Tomcat::Instance::Service[geoserver0]/Service[tomcat-geoserver0]/ensure: change from stopped to running failed: Could not start Service[tomcat-geoserver0]: Execution of '/usr/sbin/service tomcat-geoserver0 start' returned 6: Failed to start tomcat-geoserver0.service: Unit tomcat-geoserver0.service failed to load: No such file or directory.

When connecting to the machine and launching the instance by hand (after the failing puppet run), using service tomcat-geoserve0 start, the instance can be launched with no error.

Is there a missing sync() somewhere, to ensure the init scripts are actually created before trying to launch the instance ?

service file dont work anymore (rhel7.0 -> rhel 7.1)

The file:
https://github.com/camptocamp/puppet-tomcat/blob/master/manifests/instance/config.pp#L216
is not updated if the source change:
https://github.com/camptocamp/puppet-tomcat/blob/master/manifests/instance/config.pp#L221

Between rehl7.0 and rhel7.1, the file /usr/lib/systemd/system/tomcat.service is updated, and the one from rhel7.0 don't work anymore.

Workaround:
-remove "/usr/lib/systemd/system/tomcat-${name}.service"
-launch puppet, and the file is created ok

It seems not that easy to handle this case with "file".

dependency cycle

Hi,

I trying to use this tomcat module but run into the following error. Is this an error on my side or an issue with the tomcat module?

Regards,

Richard

err: Could not apply complete catalog: Found dependency cycles in the following relationships: File[/opt/apache-tomcat-6.0.26/extras] => Package[curl], File[/opt/apache-tomcat] => File[log4j.properties], Package[curl] => File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar], Exec[download digest of archive tomcat-juli.jar] => File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar], Exec[download archive tomcat-juli.jar and check sum] => File[/opt/apache-tomcat-6.0.26/bin/tomcat-juli.jar], Package[curl] => Exec[download archive tomcat-juli-adapters.jar and check sum], Exec[download digest of archive tomcat-juli-adapters.jar] => Exec[download archive tomcat-juli-adapters.jar and check sum], File[/opt/apache-tomcat-6.0.26] => File[/opt/apache-tomcat-6.0.26/extras], File[/opt/apache-tomcat] => Service[tomcat-myapp], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => File[/opt/apache-tomcat-6.0.26], Exec[apache-tomcat-6.0.26 unpack] => File[/opt/apache-tomcat-6.0.26], Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum] => File[/opt/apache-tomcat-6.0.26], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => File[/opt/apache-tomcat], Exec[apache-tomcat-6.0.26 unpack] => File[/opt/apache-tomcat], Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum] => File[/opt/apache-tomcat], Package[curl] => Exec[download digest of archive tomcat-juli.jar], File[/opt/apache-tomcat-6.0.26/extras] => Exec[download digest of archive tomcat-juli.jar], Package[curl] => Exec[download digest of archive apache-tomcat-6.0.26.tar.gz], Package[curl] => Exec[download archive tomcat-juli.jar and check sum], File[/opt/apache-tomcat-6.0.26/extras] => Exec[download archive tomcat-juli.jar and check sum], Exec[download digest of archive tomcat-juli.jar] => Exec[download archive tomcat-juli.jar and check sum], Package[curl] => Exec[download digest of archive tomcat-juli-adapters.jar], Exec[download archive tomcat-juli-adapters.jar and check sum] => File[/opt/apache-tomcat-6.0.26/lib/tomcat-juli-adapters.jar], Exec[download digest of archive tomcat-juli-adapters.jar] => File[/opt/apache-tomcat-6.0.26/lib/tomcat-juli-adapters.jar], File[/opt/apache-tomcat] => File[log4j.jar], Package[curl] => Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum], Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] => Exec[apache-tomcat-6.0.26 unpack], Exec[download archive apache-tomcat-6.0.26.tar.gz and check sum] => Exec[apache-tomcat-6.0.26 unpack], File[/opt/apache-tomcat] => File[commons-logging.jar]; try using the '--graph' option and open the '.dot' files in OmniGraffle or GraphViz

Logging broken on RHEL 6/7

Logging does not appear to be functioning properly on RHEL6/7.

On RHEL6 (tomcat6):

  • /var/lib/tomcat6/lib/log4j.properties is created
  • /var/log/tomcat is created
  • Nothing is actually written to /var/log/tomcat.log, instead logs are being written to $CATALINA_BASE/logs.

On RHEL7 (tomcat7):

  • It looks like install.pp doesn't include tomcat::logging if the host is RHEL7.
  • /var/log/tomcat/catalina.out exists but is 0bytes
  • Real logs are going to $CATALINA_BASE/logs.

My lack of tomcat knowledge is making this difficult for me to fix/troubleshoot. Any ideas?

Could not find dependency File[/usr/share/tomcat6/lib/] for Archive::Download[tomcat-juli.jar]

err: Failed to apply catalog: Could not find dependency File[/usr/share/tomcat6/lib/] for Archive::Download[tomcat-juli.jar] at /shared/ecetera/puppet/modules/tomcat/manifests/juli.pp:36

im getting the above err message with the following site.pp

node 'ubuntu64' {
class { 'ntp': }

include tomcat

$tomcat_mirror = "http://archive.apache.org/dist/tomcat/"

$tomcat_version = "6.0.32"
include tomcat::source

tomcat::instance {"myapp":
ensure => present,
http_port => "8080",
}

}

download does not appear to work. how do i resolve this issue?
thanks

Static JAVA_XMX and JAVA_XX_MAXPERMSIZE env variables

JAVA_XMX and JAVA_XX_MAXPERMSIZE have static values in templates/setenv.sh.header. You can override these by using "SETENV" on tomcat::instance, but the result is a confusing file where you have these variables defined twice that looks like this:

export DSUN_JAVA2D_OPENGL="false"
export DJAVA_AWT_HEADLESS="true"
export JAVA_XMX="256m"
export JAVA_XX_MAXPERMSIZE="256m"

export JAVA_XMX="28000m"
export JAVA_XX_MAXPERMSIZE="750m"

. $CATALINA_BASE/bin/setenv-local.sh

export JAVA_OPTS="-Dsun.java2d.opengl=${DSUN_JAVA2D_OPENGL} \
                  -Djava.awt.headless=${DJAVA_AWT_HEADLESS} \
                  -Xmx${JAVA_XMX} \
                  -XX:MaxPermSize=${JAVA_XX_MAXPERMSIZE} \
                  ${ADD_JAVA_OPTS}"

Is there a reason these are statically defined?

Invalid relationship error on RHEL6

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Service[tomcat-instancename] { require => Package[tomcat] }, because Package[tomcat] doesn't seem to be in the catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

tomcat::instance {"instancename":
      ensure    => 'present',
      ajp_port  => '8009',
      http_port => '',
}

Unable to resolve dependencies of 0.6.0

Hello,

I attempting to install camptocamp/tomcat using librarian-puppet. However, it is unable to resolve the dependency of camptocamp-archive because the request to forge.puppetlabs.com is not valid.

http://forge.puppetlabs.com/api/v1/releases.json?module=camptocamp-archive
returns:
{"error":"Parameter module ("camptocamp-archive") did not match /\A[a-zA-Z0-9]+/[a-zA-Z0-9_]+\Z/"}

However, the dependency of camptocamp/archive (*read forward-slash and not a dash) works just fine
http://forge.puppetlabs.com/api/v1/releases.json?module=camptocamp/archive
returns:
{"camptocamp/archive":[{"file":"/system/releases/c/camptocamp/camptocamp-archive-0.0.1.tar.gz","version":"0.0.1","dependencies":[]}]}

This prevents my install from working using librarian-puppet.

The problem is because the dependencies of camptocamp/tomcat require camptocamp-archive:
http://forge.puppetlabs.com/api/v1/releases.json?module=camptocamp/tomcat
returns:
{"camptocamp/tomcat":[{"file":"/system/releases/c/camptocamp/camptocamp-tomcat-0.0.1.tar.gz","version":"0.0.1","dependencies":[]},{"file":"/system/releases/c/camptocamp/camptocamp-tomcat-0.0.2.tar.gz","version":"0.0.2","dependencies":[]},{"file":"/system/releases/c/camptocamp/camptocamp-tomcat-0.0.3.tar.gz","version":"0.0.3","dependencies":[]},{"file":"/system/releases/c/camptocamp/camptocamp-tomcat-0.0.4.tar.gz","version":"0.0.4","dependencies":[["camptocamp-archive",">= 0.0.0"]]},{"file":"/system/releases/c/camptocamp/camptocamp-tomcat-0.5.0.tar.gz","version":"0.5.0","dependencies":[["camptocamp-archive",">= 0.0.0"]]},{"file":"/system/releases/c/camptocamp/camptocamp-tomcat-0.6.0.tar.gz","version":"0.6.0","dependencies":[["camptocamp-archive",">= 0.0.0"]]}],"camptocamp/archive":[{"file":"/system/releases/c/camptocamp/camptocamp-archive-0.0.1.tar.gz","version":"0.0.1","dependencies":[]}]}

Please let me know if this is a fix on your side or something that I can do on my side to allow puppet to install camptocamp/tomcat using librarian-puppet.

Debug Data

Current Puppetfile:
forge "http://forge.puppetlabs.com"

mod "puppetlabs/mysql"
mod "camptocamp/tomcat"

Current output from "librarian-puppet install --verbose":
[Librarian] Ruby Version: 1.8.7
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 1.3.7
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 0.9.12
[Librarian] Project: /etc/puppet
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.1
[Librarian] Git Environment Variables:
Librarian
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Resolving puppetlabs/mysql (>= 0) http://forge.puppetlabs.com
[Librarian] Checking manifests
[Librarian] Querying Forge API for module puppetlabs/mysql: http://forge.puppetlabs.com/api/v1/releases.json?module=puppetlabs/mysql
[Librarian] Module puppetlabs/mysql found versions: 2.1.0, 2.0.1, 2.0.0, 2.0.0-rc5, 2.0.0-rc4, 2.0.0-rc3, 2.0.0-rc2, 2.0.0-rc1, 1.0.0, 0.9.0, 0.8.1, 0.8.0, 0.7.1, 0.7.0, 0.6.1, 0.6.0, 0.5.0, 0.4.0, 0.3.0, 0.2.0, 0.0.1
[Librarian] Checking puppetlabs/mysql/2.1.0 http://forge.puppetlabs.com
[Librarian] Resolving camptocamp/tomcat (>= 0) http://forge.puppetlabs.com
[Librarian] Checking manifests
[Librarian] Querying Forge API for module camptocamp/tomcat: http://forge.puppetlabs.com/api/v1/releases.json?module=camptocamp/tomcat
[Librarian] Module camptocamp/tomcat found versions: 0.6.0, 0.5.0, 0.0.4, 0.0.3, 0.0.2, 0.0.1
[Librarian] Checking camptocamp/tomcat/0.6.0 http://forge.puppetlabs.com
[Librarian] Resolving puppetlabs/stdlib (>= 2.2.1) <(no source specified)>
[Librarian] Checking manifests
[Librarian] Querying Forge API for module puppetlabs/stdlib: http://forge.puppetlabs.com/api/v1/releases.json?module=puppetlabs/stdlib
[Librarian] Module puppetlabs/stdlib found versions: 4.1.0, 3.2.0, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 2.6.0, 2.5.1, 2.5.0, 2.4.0, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.1, 2.2.0, 2.1.3, 2.0.0, 1.1.0, 1.0.0, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1
[Librarian] Checking puppetlabs/stdlib/4.1.0 http://forge.puppetlabs.com
[Librarian] Resolving camptocamp-archive (>= 0.0.0) <(no source specified)>
[Librarian] Checking manifests
[Librarian] Querying Forge API for module camptocamp-archive: http://forge.puppetlabs.com/api/v1/releases.json?module=camptocamp-archive

Stderr from the command:

/usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/source/forge.rb:186:in api_call': Error requesting http://forge.puppetlabs.com/api/v1/releases.json?module=camptocamp-archive: 400 Bad Request (OpenURI::HTTPError) from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/source/forge.rb:155:inapi_data'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/source/forge.rb:29:in versions' from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/source/forge.rb:43:inmanifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/source/forge.rb:301:in manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:16:inmanifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:16:in map' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:16:inmanifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/dependency.rb:117:in cache_manifests!' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/dependency.rb:113:inmanifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:in resolving_dependency_map_find_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:inscope_resolving_dependency'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:in scope_checking_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:inscope'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:in scope_checking_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:inscope_resolving_dependency'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in scope' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:inscope_resolving_dependency'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:in resolving_dependency_map_find_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:inrecursive_resolve'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:70:in recursive_resolve' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:in scope_checking_manifest' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:inscope'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:in scope_checking_manifest' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:in map_find' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:ineach'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in map_find' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:in scope_resolving_dependency' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:inscope_checking_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in scope' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:inscope_checking_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:in scope_resolving_dependency' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:inscope'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:in scope_resolving_dependency' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:in recursive_resolve' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:70:inrecursive_resolve'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:in resolving_dependency_map_find_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:inscope_checking_manifest'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in scope' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:inscope_checking_manifest'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:in resolving_dependency_map_find_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:inmap_find'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in each' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:inmap_find'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:in resolving_dependency_map_find_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:inscope_resolving_dependency'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:in scope_checking_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:inscope'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:in scope_checking_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:inscope_resolving_dependency'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in scope' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:inscope_resolving_dependency'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:in resolving_dependency_map_find_manifests' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:inrecursive_resolve'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:70:in recursive_resolve' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:in scope_checking_manifest' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:inscope'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:in scope_checking_manifest' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:in map_find' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:ineach'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in map_find' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:in scope_resolving_dependency' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:inscope_checking_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in scope' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:inscope_checking_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:in scope_resolving_dependency' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:inscope'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:in scope_resolving_dependency' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:inresolving_dependency_map_find_manifests'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:in recursive_resolve' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:50:inresolve'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/resolver.rb:23:in resolve' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:26:inrun'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in resolve!' from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/cli.rb:69:ininstall'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in __send__' from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:inrun'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in invoke_command' from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor.rb:363:indispatch'
from /usr/lib/ruby/gems/1.8/gems/thor-0.18.1/lib/thor/base.rb:439:in start' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:26:inbin!'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in returning_status' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:26:inbin!'
from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in with_environment' from /usr/lib/ruby/gems/1.8/gems/librarian-0.1.2/lib/librarian/cli.rb:26:inbin!'
from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/bin/librarian-puppet:7
from /usr/bin/librarian-puppet:19:in `load'
from /usr/bin/librarian-puppet:19

module ignoring tomcat_mirror and tomcat_version

Hi

I am using the roles to define my systems [1]

The tomcat module is called like this:
class site::roles::tomcat {
anchor { '::site::roles::tomcat': }

Class {
require => Anchor['::site::roles::tomcat'],
}
class {'::tomcat':
sources => true,
}
$tomcat_mirror = 'http://archive.apache.org/dist/tomcat/'
$tomcat_version = '6.0.32'
include tomcat::source
}

But it seems that the tomcat_mirror and tomcat_version variables are not being used.

As I get the following error message:

Error: Failed to apply catalog: Validation of Exec[download digest of archive apache-tomcat-6.0.26.tar.gz] failed: 'curl -o /usr/src/apache-tomcat-6.0.26.tar.gz.md5 http://archive.apache.org/dist/tomcat//tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz.md5' is not qualified and no path was specified. Please qualify the command or specify a path. at /etc/puppetlabs/puppet/modules/archive/manifests/download.pp:91
Wrapped exception:
'curl -o /usr/src/apache-tomcat-6.0.26.tar.gz.md5 http://archive.apache.org/dist/tomcat//tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz.md5' is not qualified and no path was specified. Please qualify the command or specify a path.

Any idea?

Thank you

Best regards

[1] http://terrarum.net/administration/puppet-infrastructure.html

Instance not stopped running service if ensure=>absent

If you set ensure to absent for tomcat::instance, puppet doesn't stop the service, it only remove the init-script. I think this is the problem, because it delete init-script before stopping instance.

I have made following changes:
--- a/puppet/modules/tomcat/manifests/instance.pp
+++ b/puppet/modules/tomcat/manifests/instance.pp
@@ -556,7 +556,14 @@ define tomcat::instance(
installed => false,
absent => false,
},

  • require => [File["/etc/init.d/tomcat-${name}"], $servicerequire],
  • require => $ensure ? {
  •  absent  => [$servicerequire],
    
  •  default => [File["/etc/init.d/tomcat-${name}"], $servicerequire],
    
  • },
  • before => $ensure ? {
  •  absent  => File["/etc/init.d/tomcat-${name}"],
    
  •  default => undef,
    
  • },
    pattern => "-Dcatalina.base=${tomcat::instance_basedir}/${name}",
    }
    and it seem to work like expected.

Unable to set "nofile" limit before starting tomcat instance

Under debian it is not possible to set the number of allowed open files before starting the specific tomcat instance:

In this file: tomcat.init.erb it is not possible to inject any code before:
$SU <%= @owner %> -c "umask <%= @umask %>; $CATALINA_HOME/bin/catalina.sh start" > /dev/null

Are there any other approaches for increasing the number of open files on this platform?

extra jars into ${CATALINA_BASE}/lib are ignored

To reproduce: Use a tomcat with a webapp which might need JAI-imageIO-ext / JAI-ImageIO (e.g. GeoServer). Put the necessary jars into ${CATALINA_BASE}/lib:

/srv/tomcat/geoserver$ ls -la /srv/tomcat/geoserver/lib/
total 18
drwxrwsr-x  2 root     sigdev 17408 Apr 11 09:49 .
dr-xr-xr-x 10 tomcat   sigdev  1024 Oct  2  2013 ..
lrwxrwxrwx  1 pmauduit sigdev    36 Apr 11 09:49 clibwrapper_jiio.jar -> /usr/share/java/clibwrapper_jiio.jar
lrwxrwxrwx  1 pmauduit sigdev    29 Apr 11 09:48 jai_codec.jar -> /usr/share/java/jai_codec.jar
lrwxrwxrwx  1 pmauduit sigdev    28 Apr 11 09:48 jai_core.jar -> /usr/share/java/jai_core.jar
lrwxrwxrwx  1 pmauduit sigdev    31 Apr 11 09:48 jai_imageio.jar -> /usr/share/java/jai_imageio.jar
lrwxrwxrwx  1 pmauduit sigdev    35 Apr 11 09:49 mlibwrapper_jai.jar -> /usr/share/java/mlibwrapper_jai.jar

Add the necessary native JAI libraries to the java.library.path in the bin/setenv-local.sh:

export ADD_JAVA_OPTS=" -Djava.library.path=/usr/lib/jni

Then check on the GeoServer interface that JAI-ImageIO support is activated.

Note: it works with a "vanilla tomcat tarball", but not with the ones deployed by the recipe. Relying on the following page: http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html the behaviour differs when ${CATALINA_HOME} and ${CATALINA_BASE} do not match, which is the case with the puppet recipe, not with my tarball test.

CENTOS 7: jakarta-commons-logging: No matching Package to list

CENTOS 7

When trying to install version 0.8.0 it come with an error about a missing package that it cannot find in the repository.

Error: /Stage[main]/Tomcat::Logging/Package[jakarta-commons-logging]/ensure: change from absent to present failed: Execution of '/bin/yum -d 0 -e 0 -y list jakarta-commons-logging' returned 1: Error: No matching Packages to list

If I search for the package it cannot be found, but it might have been renamed to:

apache-commons-logging.noarch : Apache Commons Logging

But I'm not sure.

puppet-tomcat

Hi ,

I have cloned this and it got created in my /etc/puppet/modules/puppet-tomcat and now i have changed my site.pp under /etc/puppet/manifests/site.pp to

node default {
class { 'tomcat':
      version     => 6,
      sources     => true,
      sources_src => 'http://archive.apache.org/dist/tomcat/',
    }
}

i am getting syntax error while doing so please refer the screen shot below i have only modified the site.pp residing at /etc/puppet/manifests/site.pp and my puppet-tomcat module is under /etc/puppet/modules/puppet-tomcat.
I am running puppet agent -t on my puppetagent following is the error
tomcaterror

Cannot install tomcat7 on RedHat 6 family from repositories

Package tomcat7 has been moved from epel-testing to regular epel repository. Package name is not 'tomcat7' anymore, but 'tomcat'.

The install.pp manifest is checking for Redhat 7 version only in order to install the 'tomcat' package; otherwise, it'll try to install 'tomcat7' (which does not exist anymore in epel repositories).

This makes impossible to install tomcat7 on Redhat6 family.

Ubuntu Precise Support Isn't Working For Me

I cloned the project today to install Tomcat on a 32-bit precise Vagrant box. Here's what I have in my manifest:

include monit
include postfix
include postfix-monit
include tomcat
class { 'mysql::server':
      config_hash => { 'root_password' => 'thisiscool' }
}

When I provision my system, I get the following error:

class tomcat::debian not tested on Ubuntu/precise at /tmp/vagrant-puppet/modules-0/tomcat/manifests/debian.pp:21 on node precise32

However, it looks like Precise support was already added to this package based on this issue:

Is there something that I'm doing wrong?

Depends on archive::download but no depends and module is not on Puppet Forge

When using puppet-tomcat on Debian, the module fails on archive::download not being there.

However, there is no archive::download on Puppet Forge.

Please release on Puppet Forge and depend on the module. Or please remove any reference to archive::download. Or please document the manual install in the docs.

Tomcat 7 errors and warning when provisioning Vagrant Ubuntu box

I have the following puppet script provisioning a Vagrant Ubuntu box (12.04 LTS):

Exec {
  path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin',
}
class { 'tomcat' :
  version => 7,
}

When the command runs, I see the following errors/warnings:

err: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli-adapters.jar]/Exec[download digest of archive tomcat-juli-adapters.jar]/returns: change from notrun to 0 failed: curl   -o /usr/share/tomcat7/extras//tomcat-juli-adapters.jar.md5 http://archive.apache.org/dist/tomcat//tomcat-7/v7.0.42/bin/extras/tomcat-juli-adapters.jar.md5 returned 7 instead of one of [0] at /etc/puppet/modules/archive/manifests/download.pp:91
err: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli.jar]/Exec[download digest of archive tomcat-juli.jar]/returns: change from notrun to 0 failed: curl   -o /usr/share/tomcat7/extras//tomcat-juli.jar.md5 http://archive.apache.org/dist/tomcat//tomcat-7/v7.0.42/bin/extras/tomcat-juli.jar.md5 returned 7 instead of one of [0] at /etc/puppet/modules/archive/manifests/download.pp:91
notice: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli.jar]/Exec[download archive tomcat-juli.jar and check sum]: Dependency Exec[download digest of archive tomcat-juli.jar] has failures: true
warning: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli.jar]/Exec[download archive tomcat-juli.jar and check sum]: Skipping because of failed dependencies
notice: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli.jar]/Exec[rm-on-error-tomcat-juli.jar]: Dependency Exec[download digest of archive tomcat-juli.jar] has failures: true
warning: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli.jar]/Exec[rm-on-error-tomcat-juli.jar]: Skipping because of failed dependencies
notice: /Stage[main]/Tomcat::Juli::Debian/File[/usr/share/tomcat7/bin/tomcat-juli.jar]: Dependency Exec[download digest of archive tomcat-juli.jar] has failures: true
warning: /Stage[main]/Tomcat::Juli::Debian/File[/usr/share/tomcat7/bin/tomcat-juli.jar]: Skipping because of failed dependencies
notice: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli-adapters.jar]/Exec[download archive tomcat-juli-adapters.jar and check sum]: Dependency Exec[download digest of archive tomcat-juli-adapters.jar] has failures: true
warning: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli-adapters.jar]/Exec[download archive tomcat-juli-adapters.jar and check sum]: Skipping because of failed dependencies
notice: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli-adapters.jar]/Exec[rm-on-error-tomcat-juli-adapters.jar]: Dependency Exec[download digest of archive tomcat-juli-adapters.jar] has failures: true
warning: /Stage[main]/Tomcat::Juli::Debian/Archive::Download[tomcat-juli-adapters.jar]/Exec[rm-on-error-tomcat-juli-adapters.jar]: Skipping because of failed dependencies
notice: /Stage[main]/Tomcat::Juli::Debian/File[/usr/share/tomcat7/lib/tomcat-juli-adapters.jar]: Dependency Exec[download digest of archive tomcat-juli-adapters.jar] has failures: true
warning: /Stage[main]/Tomcat::Juli::Debian/File[/usr/share/tomcat7/lib/tomcat-juli-adapters.jar]: Skipping because of failed dependencies

As far as I can tell, Tomcat is installed and is running as a service, so why are all the errors and is there anything I'm doing wrong?

Thanks.

How to install a specific version of tomcat?

Hi guys, i'm quite new to puppet and I don't get how to use the sources => true to install a specific version of tomcat.
Here the manifest I'm using:

include tomcat
$tomcat_mirror = 'http://mirrors.rackhosting.com/apache/'
$tomcat_version = '7.0.35'

tomcat::instance { 'xwiki':
  ensure    => present,
  http_port => '8080',
  sources   => true,
}

I get:

Error: Invalid parameter sources at /etc/puppet/manifests/xwiki-war.pp:8 on node puppet

Thanks in advance for any help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.