Ask Your Question
0

pivotal-app manage module for pivotal-tcserver not able to start the tcserver instance post installtion.

asked 2015-07-20 23:26:48 -0500

varun gravatar image

updated 2015-07-21 06:52:10 -0500

Below is the error message i get :

 Could not start Service[tcserver-instance-tc-server1]: Execution of '/sbin/service tcserver-instance-tc-server1 start' returned 255: /etc/init.d/tcserver-instance-tc-server1: line 24: cd: <INSTANCE_LOCATION>/bin: No such file or directory .Startup script //tcruntime-ctl.sh doesn't exist or is not executable.

Please find below the init.pp that i am using:

class sampletcserver{

  $catalina_home  = '/var/opt/pivotal/pivotal-tc-server-standard'
  $_class_name    = 'org.apache.catalina.ha.tcp.SimpleTcpCluster'
  $_java_home     = '/usr/java/jdk1.8.0_45'
  $_protocol      = 'org.apache.coyote.http11.Http11Protocol'
  $context_classname = 'org.apache.catalina.ha.context.ReplicatedContext'

  # This is required by add modules
  class {'pivotal_repo':
    i_accept_eula => true
  }

  # Creates tc-server instance by overriding the default ports value
  tcserver::instance {'tc-server1':
    properties           => [['bio.https.port' => '8444'], ['bio.http.port' => '7171'], ['base.jmx.port' => '6970']],
    deploy_apps          => true,
    java_home            => "${_java_home}",
  }->

  # Configues a Simple cluster settings in the server.xml for tc-server
  emctcserver::config::server::cluster{'tc-server-instance1':
    catalina_base        => "${catalina_home}/tc-server1",
    class_name           => "${_class_name}",
    cluster_ensure       => 'present',
    purge_cluster        =>  true,
  }->

  # Configure Connector elements in $CATALINA_BASE/conf/server.xml
  emctcserver::config::server::connector {'tc-server1-connector':
    catalina_base         => "${catalina_home}/tc-server1",
    port                  => "\${bio.http.port}",
    protocol              => "${_protocol}",
    additional_attributes => {
     'xpoweredBy'         => 'false',
     'allowTrace'         => 'false',
     'clientAuth'         => 'false',
     'SSLEnabled'         => 'true',
     'scheme'             => 'https',
     'secure'             => 'true',
     'sslProtocol'        => 'TLS',
     'maxHttpHeaderSize'  => '8192'
    },
    connector_ensure      => 'present',
    purge_connectors      =>  false,
  }->
 # Executes tc-server shell script for restarting the instances
  exec {"tc-server1":
   cwd                   => "${catalina_home}/tc-server1/bin/",
   provider              =>  shell,
   command               => "sh tcruntime-ctl.sh restart",
  }

  # Creates tc-server2 instance by overriding the default ports value
  tcserver::instance {'tc-server2':
    properties           => [['bio.https.port' => '8445'], ['bio.http.port' => '7173'], ['base.jmx.port' => '6971']],
    deploy_apps          => true,
    java_home            => "${_java_home}",
  }->

  # Configues a Simple cluster settings in the server.xml for tc-server2
  emctcserver::config::server::cluster{'tc-server-instance2':
    catalina_base        => "${catalina_home}/tc-server2",
    class_name           => "${_class_name}",
    cluster_ensure       => 'present',
    purge_cluster        =>  true,
  }->

  # Configure Connector elements in $CATALINA_BASE/conf/server.xml
  emctcserver::config::server::connector {'tc-server2-connector':
    catalina_base         => "${catalina_home}/tc-server2",
    port                  => "\${bio.http.port}",
    protocol              => "${_protocol}",
    additional_attributes => {
     'xpoweredBy'         => 'false',
     'allowTrace'         => 'false',
     'clientAuth'         => 'false',
     'SSLEnabled'         => 'true',
     'scheme'             => 'https',
     'secure'             => 'true',
     'sslProtocol'        => 'TLS',
     'maxHttpHeaderSize'  => '8192'
    },
    connector_ensure      => 'present',
    purge_connectors      =>  false,
  }->

  exec {"tc-server2":
   cwd                    =>"${catalina_home}/tc-server2/bin/",
   provider               => shell,
   command                => "sh tcruntime-ctl.sh restart",
  }
}
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2015-07-22 08:28:03 -0500

<instance_location> is undefined?

edit flag offensive delete link more
0

answered 2015-09-09 05:16:19 -0500

byrno gravatar image

Im getting the same issue - What I did was - in the instance.pp of the tcserver module - at the section below

 file { "/etc/init.d/tcserver-instance-${name}":
  ensure      => link,
  target      => "${cwd}/${name}/bin/init.d.sh",
}

I changed it to

$instancepath = "$base_dir/${name}"

file { "/etc/init.d/tcserver-instance-${name}":
  ensure      => link,
  target      => "${cwd}/${name}/bin/init.d.sh",
}->
  exec { 'set_PRGDIR':
  command => "/bin/sed -i \"s|<INSTANCE_LOCATION>|${instancepath}|\" ${instancepath}/bin/init.d.sh",
}
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: 2015-07-20 23:26:48 -0500

Seen: 338 times

Last updated: Sep 09 '15