You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Madhawa Bandara <ma...@wso2.com> on 2014/08/23 19:47:01 UTC

Installing the PHP Cartridge and Stratos Cartridge Agent

Hi all,

I need to create an image of a machine in Openstack with PHP and Stratos
Cartridge Agent installed.

I have created an Ubuntu 14.04 cloud instance in Openstack and installed
the Puppet agent there. The Puppet master is in my local machine.

When running the config.sh for php following error is given:

*Error: Could not request certificate: execution expired*
*Exiting; failed to retrieve certificate and waitforcert is disabled*
*/bin/rm: cannot remove
‘/mnt/apache-stratos-cartridge-agent-4.0.0/wso2carbon.lck’: No such file or
directory*

What is the issue here?

I'm following [1] and [2].

[1] -
http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/

[2} -
https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack

Thanks.

-- 
Regards,

*Madhawa Bandara*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777487726*
Blog* - *classdeffound.blogspot.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Madhawa Bandara <ma...@wso2.com>.
Hi Sajith,

Thanks for the response. It solved the issue.


On Wed, Sep 3, 2014 at 12:42 AM, Sajith Kariyawasam <sa...@wso2.com> wrote:

> Hi Madhawa,
>
>
>
> On Tue, Sep 2, 2014 at 6:26 PM, Madhawa Bandara <ma...@wso2.com> wrote:
>
>> The issue seems to be when restarting the apache2.
>>
>> Here is the log:
>> Info: /Stage[main]/Php/File[/etc/apache2/apache2.conf]: Filebucketed
>> /etc/apache2/apache2.conf to puppet with sum da32fcc6a783acaebf0d74c17c726b
>> f7
>> Notice: /Stage[main]/Php/File[/etc/apache2/apache2.conf]/content:
>> content changed '{md5}da32fcc6a783acaebf0d74c17c726bf7' to '{md5}
>> a599b17305bed7c089577967efe22f11'
>> Notice: /Stage[main]/Php/File[/etc/apache2/apache2.conf]/mode: mode
>> changed '0644' to '0775'
>> Notice: /Stage[main]/Php/File[/etc/apache2/sites-available/default]/ensure:
>> defined content as '{md5}1208756fdaec883514e04cb988f65640'
>> Notice: /Stage[main]/Php/File[/etc/apache2/sites-available/default-ssl]/ensure:
>> defined content as '{md5}9ab72ff2982555a415f3b25ef0b96b6a'
>> Notice: /Stage[main]/Php/Exec[enable ssl module]/returns: executed
>> successfully
>> Notice: /Stage[main]/Php/Exec[enable ssl]/returns: executed successfully
>> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:  * Restarting web
>> server apache2
>> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:    ...fail!
>> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:  * The apache2
>> configtest failed.
>> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: Output of config
>> test was:
>> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: apache2: Syntax
>> error on line 233 of /etc/apache2/apache2.conf: Could not open
>> configuration file /etc/apache2/httpd.conf: No such file or directory
>>
>
> Apache2 restart fails because there is no /etc/apache2/httpd.conf file
> available in the instance you have started. As I experienced, httpd.conf
> file will be available only if you install apache2 via apt-get in an Ubuntu
> 12.04, but in later Ubuntu versions that file is not available [1
> <http://ubuntuforums.org/showthread.php?t=2077488>]. Also it seems that
> even though httpd.conf.erb template is available in puppet master, its not
> being copied to the instance.
> So, in order to get this fix you have two options,
>
> Either you can apply the following diff to the puppet master  and retry
> starting a new subscription.
>
> ---------------------------------------------------------
> diff --git a/tools/puppet3/modules/php/manifests/init.pp
> b/tools/puppet3/modules/php/manifests/init.pp
> index e33953b..aa14dc1 100755
> --- a/tools/puppet3/modules/php/manifests/init.pp
> +++ b/tools/puppet3/modules/php/manifests/init.pp
> @@ -83,6 +83,15 @@ class php () {
>        content => template('php/apache2/apache2.conf.erb'),
>        require => Package['apache2'];
>
> +
> +   '/etc/apache2/httpd.conf':
> +      owner   => 'root',
> +      group   => 'root',
> +      mode    => '0775',
> +      content => template('php/httpd/httpd.conf.erb'),
> +      require => Package['apache2'];
> +
> +
>      '/etc/apache2/sites-available/default':
>        owner   => 'root',
>        group   => 'root',
> ------------------------------------------------------------------
>
> or,
>
> Replace the apache2.conf.erb template in your puppet master with the
> attached apache2.conf (a new version of the configuration file) and continue
>
>
> [1] http://ubuntuforums.org/showthread.php?t=2077488
>
>
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: Action
>> 'configtest' failed.
>> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: The Apache error
>> log may have more information.
>> Error: /etc/init.d/apache2 restart returned 1 instead of one of [0]
>> Error: /Stage[main]/Php/Exec[apache2 restart]/returns: change from notrun
>> to 0 failed: /etc/init.d/apache2 restart returned 1 instead of one of [0]
>> Info: Class[Php]: Scheduling refresh of Class[Agent]
>> Info: Class[Agent]: Scheduling refresh of Agent::Initialize[cartridge-
>> agent]
>> Info: Class[Agent]: Scheduling refresh of Exec[copy launch-params to
>> carbon_home]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[bin/
>> stratos.sh]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[conf/
>> templates/jndi.properties.template]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
>> extensions/artifacts-updated.sh]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
>> extensions/clean.sh]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
>> extensions/instance-activated.sh]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
>> extensions/instance-started.sh]
>> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
>> extensions/start-servers.sh]
>> Info: Class[Agent]: Scheduling refresh of Agent::Start[cartridge-agent]
>> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
>> Exec[creating_target_for_cartridge-agent]
>> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
>> Exec[creating_local_package_repo_for_cartridge-agent]
>> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
>> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]
>> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
>> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]
>> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
>> Exec[setting_permission_for_cartridge-agent]
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[creating_local_package_repo_for_cartridge-agent]: Dependency
>> Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[creating_local_package_repo_for_cartridge-agent]: Skipping because
>> of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[creating_local_package_repo_for_cartridge-agent]: Triggered
>> 'refresh' from 1 events
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip]: Dependency
>> Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip]: Skipping
>> because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[creating_target_for_cartridge-agent]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[creating_target_for_cartridge-agent]: Skipping because of failed
>> dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[creating_target_for_cartridge-agent]: Triggered 'refresh' from 1
>> events
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Dependency
>> Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Skipping
>> because of failed dependencies
>> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Failed to
>> call refresh: Could not find command 'puppet:///modules/agent/
>> apache-stratos-cartridge-agent-4.0.0.zip'
>> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Could not
>> find command 'puppet:///modules/agent/apache-stratos-cartridge-
>> agent-4.0.0.zip'
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]/returns:
>> unzip:  cannot find or open /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip,
>> /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip.zip or
>> /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip.ZIP.
>> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
>> Failed to call refresh: unzip /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip
>> returned 9 instead of one of [0]
>> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
>> unzip /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip returned 9
>> instead of one of [0]
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[setting_permission_for_cartridge-agent]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[setting_permission_for_cartridge-agent]: Skipping because of failed
>> dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[setting_permission_for_cartridge-agent]/returns: chown: cannot
>> access ‘/mnt/apache-stratos-cartridge-agent-4.0.0’: No such file or
>> directory
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[setting_permission_for_cartridge-agent]/returns: chmod: cannot
>> access ‘/mnt/apache-stratos-cartridge-agent-4.0.0’: No such file or
>> directory
>> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[setting_permission_for_cartridge-agent]: Failed to call refresh:
>> chown -R root:root /mnt/apache-stratos-cartridge-agent-4.0.0 ;
>>                     chmod -R 755 /mnt/apache-stratos-cartridge-agent-4.0.0
>> returned 1 instead of one of [0]
>> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> Exec[setting_permission_for_cartridge-agent]: chown -R root:root
>> /mnt/apache-stratos-cartridge-agent-4.0.0 ;
>>                     chmod -R 755 /mnt/apache-stratos-cartridge-agent-4.0.0
>> returned 1 instead of one of [0]
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[//mnt/apache-stratos-cartridge-agent-4.0.0/lib]: Dependency
>> Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[//mnt/apache-stratos-cartridge-agent-4.0.0/lib]: Skipping because
>> of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
>> geronimo-j2ee-management_1.1_spec-1.0.1.jar]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
>> geronimo-j2ee-management_1.1_spec-1.0.1.jar]: Skipping because of failed
>> dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-client-5.9.1.jar]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-client-5.9.1.jar]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
>> geronimo-jms_1.1_spec-1.1.1.jar]: Dependency Exec[apache2 restart] has
>> failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
>> geronimo-jms_1.1_spec-1.1.1.jar]: Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-broker-5.9.1.jar]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-broker-5.9.1.jar]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/hawtbuf-1.9.jar]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
>> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/hawtbuf-1.9.jar]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
>> Triggered 'refresh' from 1 events
>> Notice: /Stage[main]/Agent/Agent::Push_templates[conf/templates/
>> jndi.properties.template]/File[/mnt/apache-stratos-
>> cartridge-agent-4.0.0/conf/templates/jndi.properties.template]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[conf/templates/
>> jndi.properties.template]/File[/mnt/apache-stratos-
>> cartridge-agent-4.0.0/conf/templates/jndi.properties.template]: Skipping
>> because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]
>> /File[/mnt/apache-stratos-cartridge-agent-4.0.0/bin/stratos.sh]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]
>> /File[/mnt/apache-stratos-cartridge-agent-4.0.0/bin/stratos.sh]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> instance-activated.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/instance-activated.sh]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> instance-activated.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/instance-activated.sh]: Skipping because of
>> failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> start-servers.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/start-servers.sh]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> start-servers.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/start-servers.sh]: Skipping because of failed
>> dependencies
>> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> instance-started.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/instance-started.sh]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> instance-started.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/instance-started.sh]: Skipping because of failed
>> dependencies
>> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> clean.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0/extensions/clean.sh]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> clean.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0/extensions/clean.sh]:
>> Skipping because of failed dependencies
>> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/artifacts-updated.sh]: Dependency Exec[apache2
>> restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
>> artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-
>> agent-4.0.0/extensions/artifacts-updated.sh]: Skipping because of failed
>> dependencies
>> Info: Agent::Start[cartridge-agent]: Scheduling refresh of
>> Exec[starting_cartridge-agent]
>> Notice: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
>> Dependency Exec[apache2 restart] has failures: true
>> Warning: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
>> Skipping because of failed dependencies
>> Error: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
>> Failed to call refresh: Working directory '/mnt/apache-stratos-cartridge-agent-4.0.0/bin/'
>> does not exist
>> Error: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
>> Working directory '/mnt/apache-stratos-cartridge-agent-4.0.0/bin/' does
>> not exist
>> Info: Creating state file /var/lib/puppet/state/state.yaml
>>
>>
>> On Sun, Aug 31, 2014 at 9:35 AM, Akila Ravihansa Perera <
>> ravihansa@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Can you post cartridge agent log files? What exactly is the issue? Did
>>> you change Puppet IP accordingly when installing Stratos? You need to
>>> change CEP IP in Puppet master nodes.pp as well.
>>>
>>> Thanks.
>>>
>>> On Sun, Aug 31, 2014 at 9:17 AM, Madhawa Bandara <ma...@wso2.com>
>>> wrote:
>>> > Hi,
>>> > I have already installed the puppet master in my local machine. Then I
>>> tried
>>> > installing it on another open stack instance. But still it fails when
>>> > installing the php cartridge with the cartridge agent.
>>> > Thanks
>>> >
>>> > On 28 Aug 2014 07:35, "Prasanna Dangalla" <pr...@wso2.com> wrote:
>>> >>
>>> >> Hi,
>>> >> I have installed a puppet master in 192.168.18.165. Check with this
>>> puppet
>>> >> master. This is an instance in http://192.168.18.25 which is named as
>>> >> cp-puppet-master-prasanna
>>> >>
>>> >>
>>> >>
>>> >> Prasanna Dangalla
>>> >> Software Engineer, WSO2, Inc.; http://wso2.com/
>>> >> lean.enterprise.middleware
>>> >>
>>> >> cell: +94 777 55 80 30 | +94 718 11 27 51
>>> >> twitter: @prasa77
>>> >>
>>> >>
>>> >> On Sun, Aug 24, 2014 at 11:21 PM, Chamila De Alwis <chamilad@wso2.com
>>> >
>>> >> wrote:
>>> >>>
>>> >>> If php is successfully installed in the instance then that means
>>> puppet
>>> >>> agent must have worked as expected.
>>> >>>
>>> >>>
>>> >>> Regards,
>>> >>> Chamila de Alwis
>>> >>> Software Engineer | WSO2 | +94772207163
>>> >>> Blog: code.chamiladealwis.com
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com>
>>> >>> wrote:
>>> >>>>
>>> >>>> Hi,
>>> >>>>
>>> >>>> No I didn't install puppet agent manually. I just followed the
>>> >>>> instructions in [1] and [2] and provided php as the stratos
>>> service-name.
>>> >>>> I noticed that php is successfully installed in the instance. Any
>>> >>>> thoughts?
>>> >>>>
>>> >>>> [1] -
>>> >>>>
>>> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>>> >>>>
>>> >>>> [2} -
>>> >>>>
>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <
>>> chamilad@wso2.com>
>>> >>>> wrote:
>>> >>>>>
>>> >>>>>
>>> >>>>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <madhawa@wso2.com
>>> >
>>> >>>>> wrote:
>>> >>>>>>
>>> >>>>>> How can I provide arguments when running the config.sh in the
>>> puppet
>>> >>>>>> agent?
>>> >>>>>
>>> >>>>>
>>> >>>>> I guess you can edit the puppetinstall.sh script.
>>> >>>>>
>>> >>>>> After downloading the puppetinstall script you'll find the puppet
>>> agent
>>> >>>>> run line at :258. Add --waitforcert=300 (120 is the default it
>>> seems) to it.
>>> >>>>> Then run config.sh again. Like Nirmal mentioned you shouldn't
>>> install puppet
>>> >>>>> agent manually.
>>> >>>>>
>>> >>>>>
>>> >>>>> Regards,
>>> >>>>> Chamila de Alwis
>>> >>>>> Software Engineer | WSO2 | +94772207163
>>> >>>>> Blog: code.chamiladealwis.com
>>> >>>>>
>>> >>>>>
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> --
>>> >>>> Regards,
>>> >>>>
>>> >>>> Madhawa Bandara
>>> >>>> Software Engineer
>>> >>>> WSO2, Inc.
>>> >>>> lean.enterprise.middleware
>>> >>>>
>>> >>>> Mobile - +94777487726
>>> >>>> Blog - classdeffound.blogspot.com
>>> >>>
>>> >>>
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> Software Engineer, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> *Madhawa Bandara*
>> Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+94777487726 <%2B94777487726>*
>> Blog* - *classdeffound.blogspot.com
>>
>
>
> Thanks,
> Sajith
>
>
> --
> *--*
> *Sajith Kariyawasam*
> *Mobile: +94772269575 <%2B94772269575>*
>



-- 
Regards,

*Madhawa Bandara*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777487726*
Blog* - *classdeffound.blogspot.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Sajith Kariyawasam <sa...@wso2.com>.
Hi Madhawa,



On Tue, Sep 2, 2014 at 6:26 PM, Madhawa Bandara <ma...@wso2.com> wrote:

> The issue seems to be when restarting the apache2.
>
> Here is the log:
> Info: /Stage[main]/Php/File[/etc/apache2/apache2.conf]: Filebucketed
> /etc/apache2/apache2.conf to puppet with sum da32fcc6a783acaebf0d74c17c726b
> f7
> Notice: /Stage[main]/Php/File[/etc/apache2/apache2.conf]/content: content
> changed '{md5}da32fcc6a783acaebf0d74c17c726bf7' to '{md5}
> a599b17305bed7c089577967efe22f11'
> Notice: /Stage[main]/Php/File[/etc/apache2/apache2.conf]/mode: mode
> changed '0644' to '0775'
> Notice: /Stage[main]/Php/File[/etc/apache2/sites-available/default]/ensure:
> defined content as '{md5}1208756fdaec883514e04cb988f65640'
> Notice: /Stage[main]/Php/File[/etc/apache2/sites-available/default-ssl]/ensure:
> defined content as '{md5}9ab72ff2982555a415f3b25ef0b96b6a'
> Notice: /Stage[main]/Php/Exec[enable ssl module]/returns: executed
> successfully
> Notice: /Stage[main]/Php/Exec[enable ssl]/returns: executed successfully
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:  * Restarting web
> server apache2
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:    ...fail!
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:  * The apache2
> configtest failed.
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: Output of config
> test was:
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: apache2: Syntax
> error on line 233 of /etc/apache2/apache2.conf: Could not open
> configuration file /etc/apache2/httpd.conf: No such file or directory
>

Apache2 restart fails because there is no /etc/apache2/httpd.conf file
available in the instance you have started. As I experienced, httpd.conf
file will be available only if you install apache2 via apt-get in an Ubuntu
12.04, but in later Ubuntu versions that file is not available [1
<http://ubuntuforums.org/showthread.php?t=2077488>]. Also it seems that
even though httpd.conf.erb template is available in puppet master, its not
being copied to the instance.
So, in order to get this fix you have two options,

Either you can apply the following diff to the puppet master  and retry
starting a new subscription.

---------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/init.pp
b/tools/puppet3/modules/php/manifests/init.pp
index e33953b..aa14dc1 100755
--- a/tools/puppet3/modules/php/manifests/init.pp
+++ b/tools/puppet3/modules/php/manifests/init.pp
@@ -83,6 +83,15 @@ class php () {
       content => template('php/apache2/apache2.conf.erb'),
       require => Package['apache2'];

+
+   '/etc/apache2/httpd.conf':
+      owner   => 'root',
+      group   => 'root',
+      mode    => '0775',
+      content => template('php/httpd/httpd.conf.erb'),
+      require => Package['apache2'];
+
+
     '/etc/apache2/sites-available/default':
       owner   => 'root',
       group   => 'root',
------------------------------------------------------------------

or,

Replace the apache2.conf.erb template in your puppet master with the
attached apache2.conf (a new version of the configuration file) and continue


[1] http://ubuntuforums.org/showthread.php?t=2077488


Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: Action 'configtest'
> failed.
> Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: The Apache error
> log may have more information.
> Error: /etc/init.d/apache2 restart returned 1 instead of one of [0]
> Error: /Stage[main]/Php/Exec[apache2 restart]/returns: change from notrun
> to 0 failed: /etc/init.d/apache2 restart returned 1 instead of one of [0]
> Info: Class[Php]: Scheduling refresh of Class[Agent]
> Info: Class[Agent]: Scheduling refresh of Agent::Initialize[cartridge-
> agent]
> Info: Class[Agent]: Scheduling refresh of Exec[copy launch-params to
> carbon_home]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[bin/
> stratos.sh]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[conf/
> templates/jndi.properties.template]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
> extensions/artifacts-updated.sh]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
> extensions/clean.sh]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
> extensions/instance-activated.sh]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
> extensions/instance-started.sh]
> Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
> extensions/start-servers.sh]
> Info: Class[Agent]: Scheduling refresh of Agent::Start[cartridge-agent]
> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
> Exec[creating_target_for_cartridge-agent]
> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
> Exec[creating_local_package_repo_for_cartridge-agent]
> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]
> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]
> Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
> Exec[setting_permission_for_cartridge-agent]
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[creating_local_package_repo_for_cartridge-agent]: Dependency
> Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[creating_local_package_repo_for_cartridge-agent]: Skipping because
> of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[creating_local_package_repo_for_cartridge-agent]: Triggered
> 'refresh' from 1 events
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip]: Dependency
> Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip]: Skipping
> because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[creating_target_for_cartridge-agent]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[creating_target_for_cartridge-agent]: Skipping because of failed
> dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[creating_target_for_cartridge-agent]: Triggered 'refresh' from 1
> events
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Dependency
> Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Skipping
> because of failed dependencies
> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Failed to
> call refresh: Could not find command 'puppet:///modules/agent/
> apache-stratos-cartridge-agent-4.0.0.zip'
> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Could not
> find command 'puppet:///modules/agent/apache-stratos-cartridge-
> agent-4.0.0.zip'
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]/returns:
> unzip:  cannot find or open /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip,
> /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip.zip or
> /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip.ZIP.
> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
> Failed to call refresh: unzip /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip
> returned 9 instead of one of [0]
> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
> unzip /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip returned 9
> instead of one of [0]
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[setting_permission_for_cartridge-agent]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[setting_permission_for_cartridge-agent]: Skipping because of failed
> dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[setting_permission_for_cartridge-agent]/returns: chown: cannot
> access ‘/mnt/apache-stratos-cartridge-agent-4.0.0’: No such file or
> directory
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[setting_permission_for_cartridge-agent]/returns: chmod: cannot
> access ‘/mnt/apache-stratos-cartridge-agent-4.0.0’: No such file or
> directory
> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[setting_permission_for_cartridge-agent]: Failed to call refresh:
> chown -R root:root /mnt/apache-stratos-cartridge-agent-4.0.0 ;
>                     chmod -R 755 /mnt/apache-stratos-cartridge-agent-4.0.0
> returned 1 instead of one of [0]
> Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> Exec[setting_permission_for_cartridge-agent]: chown -R root:root
> /mnt/apache-stratos-cartridge-agent-4.0.0 ;
>                     chmod -R 755 /mnt/apache-stratos-cartridge-agent-4.0.0
> returned 1 instead of one of [0]
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[//mnt/apache-stratos-cartridge-agent-4.0.0/lib]: Dependency
> Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[//mnt/apache-stratos-cartridge-agent-4.0.0/lib]: Skipping because of
> failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
> geronimo-j2ee-management_1.1_spec-1.0.1.jar]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
> geronimo-j2ee-management_1.1_spec-1.0.1.jar]: Skipping because of failed
> dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-client-5.9.1.jar]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-client-5.9.1.jar]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
> geronimo-jms_1.1_spec-1.1.1.jar]: Dependency Exec[apache2 restart] has
> failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
> geronimo-jms_1.1_spec-1.1.1.jar]: Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-broker-5.9.1.jar]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-broker-5.9.1.jar]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/hawtbuf-1.9.jar]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
> File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/hawtbuf-1.9.jar]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
> Triggered 'refresh' from 1 events
> Notice: /Stage[main]/Agent/Agent::Push_templates[conf/templates/
> jndi.properties.template]/File[/mnt/apache-stratos-
> cartridge-agent-4.0.0/conf/templates/jndi.properties.template]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[conf/templates/
> jndi.properties.template]/File[/mnt/apache-stratos-
> cartridge-agent-4.0.0/conf/templates/jndi.properties.template]: Skipping
> because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]
> /File[/mnt/apache-stratos-cartridge-agent-4.0.0/bin/stratos.sh]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]
> /File[/mnt/apache-stratos-cartridge-agent-4.0.0/bin/stratos.sh]: Skipping
> because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
> instance-activated.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/instance-activated.sh]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
> instance-activated.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/instance-activated.sh]: Skipping because of failed
> dependencies
> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
> start-servers.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/start-servers.sh]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
> start-servers.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/start-servers.sh]: Skipping because of failed
> dependencies
> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
> instance-started.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/instance-started.sh]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
> instance-started.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/instance-started.sh]: Skipping because of failed
> dependencies
> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
> clean.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0/extensions/clean.sh]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
> clean.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0/extensions/clean.sh]:
> Skipping because of failed dependencies
> Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
> artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/artifacts-updated.sh]: Dependency Exec[apache2
> restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
> artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-
> agent-4.0.0/extensions/artifacts-updated.sh]: Skipping because of failed
> dependencies
> Info: Agent::Start[cartridge-agent]: Scheduling refresh of
> Exec[starting_cartridge-agent]
> Notice: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
> Dependency Exec[apache2 restart] has failures: true
> Warning: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
> Skipping because of failed dependencies
> Error: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
> Failed to call refresh: Working directory '/mnt/apache-stratos-cartridge-agent-4.0.0/bin/'
> does not exist
> Error: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
> Working directory '/mnt/apache-stratos-cartridge-agent-4.0.0/bin/' does
> not exist
> Info: Creating state file /var/lib/puppet/state/state.yaml
>
>
> On Sun, Aug 31, 2014 at 9:35 AM, Akila Ravihansa Perera <
> ravihansa@wso2.com> wrote:
>
>> Hi,
>>
>> Can you post cartridge agent log files? What exactly is the issue? Did
>> you change Puppet IP accordingly when installing Stratos? You need to
>> change CEP IP in Puppet master nodes.pp as well.
>>
>> Thanks.
>>
>> On Sun, Aug 31, 2014 at 9:17 AM, Madhawa Bandara <ma...@wso2.com>
>> wrote:
>> > Hi,
>> > I have already installed the puppet master in my local machine. Then I
>> tried
>> > installing it on another open stack instance. But still it fails when
>> > installing the php cartridge with the cartridge agent.
>> > Thanks
>> >
>> > On 28 Aug 2014 07:35, "Prasanna Dangalla" <pr...@wso2.com> wrote:
>> >>
>> >> Hi,
>> >> I have installed a puppet master in 192.168.18.165. Check with this
>> puppet
>> >> master. This is an instance in http://192.168.18.25 which is named as
>> >> cp-puppet-master-prasanna
>> >>
>> >>
>> >>
>> >> Prasanna Dangalla
>> >> Software Engineer, WSO2, Inc.; http://wso2.com/
>> >> lean.enterprise.middleware
>> >>
>> >> cell: +94 777 55 80 30 | +94 718 11 27 51
>> >> twitter: @prasa77
>> >>
>> >>
>> >> On Sun, Aug 24, 2014 at 11:21 PM, Chamila De Alwis <ch...@wso2.com>
>> >> wrote:
>> >>>
>> >>> If php is successfully installed in the instance then that means
>> puppet
>> >>> agent must have worked as expected.
>> >>>
>> >>>
>> >>> Regards,
>> >>> Chamila de Alwis
>> >>> Software Engineer | WSO2 | +94772207163
>> >>> Blog: code.chamiladealwis.com
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com>
>> >>> wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> No I didn't install puppet agent manually. I just followed the
>> >>>> instructions in [1] and [2] and provided php as the stratos
>> service-name.
>> >>>> I noticed that php is successfully installed in the instance. Any
>> >>>> thoughts?
>> >>>>
>> >>>> [1] -
>> >>>>
>> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>> >>>>
>> >>>> [2} -
>> >>>>
>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <chamilad@wso2.com
>> >
>> >>>> wrote:
>> >>>>>
>> >>>>>
>> >>>>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com>
>> >>>>> wrote:
>> >>>>>>
>> >>>>>> How can I provide arguments when running the config.sh in the
>> puppet
>> >>>>>> agent?
>> >>>>>
>> >>>>>
>> >>>>> I guess you can edit the puppetinstall.sh script.
>> >>>>>
>> >>>>> After downloading the puppetinstall script you'll find the puppet
>> agent
>> >>>>> run line at :258. Add --waitforcert=300 (120 is the default it
>> seems) to it.
>> >>>>> Then run config.sh again. Like Nirmal mentioned you shouldn't
>> install puppet
>> >>>>> agent manually.
>> >>>>>
>> >>>>>
>> >>>>> Regards,
>> >>>>> Chamila de Alwis
>> >>>>> Software Engineer | WSO2 | +94772207163
>> >>>>> Blog: code.chamiladealwis.com
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Regards,
>> >>>>
>> >>>> Madhawa Bandara
>> >>>> Software Engineer
>> >>>> WSO2, Inc.
>> >>>> lean.enterprise.middleware
>> >>>>
>> >>>> Mobile - +94777487726
>> >>>> Blog - classdeffound.blogspot.com
>> >>>
>> >>>
>> >>
>> >
>>
>>
>>
>> --
>> Akila Ravihansa Perera
>> Software Engineer, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>> Blog: http://ravihansa3000.blogspot.com
>>
>
>
>
> --
> Regards,
>
> *Madhawa Bandara*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+94777487726 <%2B94777487726>*
> Blog* - *classdeffound.blogspot.com
>


Thanks,
Sajith


-- 
*--*
*Sajith Kariyawasam*
*Mobile: +94772269575 <%2B94772269575>*

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Madhawa Bandara <ma...@wso2.com>.
The issue seems to be when restarting the apache2.

Here is the log:
Info: /Stage[main]/Php/File[/etc/apache2/apache2.conf]: Filebucketed
/etc/apache2/apache2.conf to puppet with sum da32fcc6a783acaebf0d74c17c726b
f7
Notice: /Stage[main]/Php/File[/etc/apache2/apache2.conf]/content: content
changed '{md5}da32fcc6a783acaebf0d74c17c726bf7' to '{md5}
a599b17305bed7c089577967efe22f11'
Notice: /Stage[main]/Php/File[/etc/apache2/apache2.conf]/mode: mode changed
'0644' to '0775'
Notice: /Stage[main]/Php/File[/etc/apache2/sites-available/default]/ensure:
defined content as '{md5}1208756fdaec883514e04cb988f65640'
Notice: /Stage[main]/Php/File[/etc/apache2/sites-available/default-ssl]/ensure:
defined content as '{md5}9ab72ff2982555a415f3b25ef0b96b6a'
Notice: /Stage[main]/Php/Exec[enable ssl module]/returns: executed
successfully
Notice: /Stage[main]/Php/Exec[enable ssl]/returns: executed successfully
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:  * Restarting web
server apache2
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:    ...fail!
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns:  * The apache2
configtest failed.
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: Output of config
test was:
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: apache2: Syntax
error on line 233 of /etc/apache2/apache2.conf: Could not open
configuration file /etc/apache2/httpd.conf: No such file or directory
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: Action 'configtest'
failed.
Notice: /Stage[main]/Php/Exec[apache2 restart]/returns: The Apache error
log may have more information.
Error: /etc/init.d/apache2 restart returned 1 instead of one of [0]
Error: /Stage[main]/Php/Exec[apache2 restart]/returns: change from notrun
to 0 failed: /etc/init.d/apache2 restart returned 1 instead of one of [0]
Info: Class[Php]: Scheduling refresh of Class[Agent]
Info: Class[Agent]: Scheduling refresh of Agent::Initialize[cartridge-agent]
Info: Class[Agent]: Scheduling refresh of Exec[copy launch-params to
carbon_home]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[bin/
stratos.sh]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[conf/
templates/jndi.properties.template]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
extensions/artifacts-updated.sh]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
extensions/clean.sh]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
extensions/instance-activated.sh]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
extensions/instance-started.sh]
Info: Class[Agent]: Scheduling refresh of Agent::Push_templates[
extensions/start-servers.sh]
Info: Class[Agent]: Scheduling refresh of Agent::Start[cartridge-agent]
Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
Exec[creating_target_for_cartridge-agent]
Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
Exec[creating_local_package_repo_for_cartridge-agent]
Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]
Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]
Info: Agent::Initialize[cartridge-agent]: Scheduling refresh of
Exec[setting_permission_for_cartridge-agent]
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[creating_local_package_repo_for_cartridge-agent]: Dependency
Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[creating_local_package_repo_for_cartridge-agent]: Skipping because of
failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[creating_local_package_repo_for_cartridge-agent]: Triggered 'refresh'
from 1 events
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip]: Dependency
Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip]: Skipping
because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[creating_target_for_cartridge-agent]: Dependency Exec[apache2 restart]
has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[creating_target_for_cartridge-agent]: Skipping because of failed
dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[creating_target_for_cartridge-agent]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Dependency
Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Skipping
because of failed dependencies
Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Failed to call
refresh: Could not find command 'puppet:///modules/agent/
apache-stratos-cartridge-agent-4.0.0.zip'
Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[downloading_apache-stratos-cartridge-agent-4.0.0.zip]: Could not find
command 'puppet:///modules/agent/apache-stratos-cartridge-agent-4.0.0.zip'
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]/returns:
unzip:  cannot find or open
/mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip,
/mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip.zip or
/mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip.ZIP.
Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
Failed to call refresh: unzip
/mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip
returned 9 instead of one of [0]
Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[extracting_stratoscartridge-agent-4.0.0.zip_for_cartridge-agent]:
unzip /mnt/packs/apache-stratos-cartridge-agent-4.0.0.zip returned 9
instead of one of [0]
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[setting_permission_for_cartridge-agent]: Dependency Exec[apache2
restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[setting_permission_for_cartridge-agent]: Skipping because of failed
dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[setting_permission_for_cartridge-agent]/returns: chown: cannot access
‘/mnt/apache-stratos-cartridge-agent-4.0.0’: No such file or directory
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[setting_permission_for_cartridge-agent]/returns: chmod: cannot access
‘/mnt/apache-stratos-cartridge-agent-4.0.0’: No such file or directory
Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[setting_permission_for_cartridge-agent]: Failed to call refresh: chown
-R root:root /mnt/apache-stratos-cartridge-agent-4.0.0 ;
                    chmod -R 755 /mnt/apache-stratos-cartridge-agent-4.0.0
returned 1 instead of one of [0]
Error: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
Exec[setting_permission_for_cartridge-agent]: chown -R root:root
/mnt/apache-stratos-cartridge-agent-4.0.0 ;
                    chmod -R 755 /mnt/apache-stratos-cartridge-agent-4.0.0
returned 1 instead of one of [0]
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[//mnt/apache-stratos-cartridge-agent-4.0.0/lib]: Dependency
Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[//mnt/apache-stratos-cartridge-agent-4.0.0/lib]: Skipping because of
failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
geronimo-j2ee-management_1.1_spec-1.0.1.jar]: Dependency Exec[apache2
restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
geronimo-j2ee-management_1.1_spec-1.0.1.jar]: Skipping because of failed
dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-client-5.9.1.jar]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-client-5.9.1.jar]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
geronimo-jms_1.1_spec-1.1.1.jar]: Dependency Exec[apache2 restart] has
failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/
geronimo-jms_1.1_spec-1.1.1.jar]: Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-broker-5.9.1.jar]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/activemq-broker-5.9.1.jar]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/hawtbuf-1.9.jar]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/
File[/mnt/apache-stratos-cartridge-agent-4.0.0/lib/hawtbuf-1.9.jar]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]:
Triggered 'refresh' from 1 events
Notice: /Stage[main]/Agent/Agent::Push_templates[conf/templates/
jndi.properties.template]/File[/mnt/apache-stratos-
cartridge-agent-4.0.0/conf/templates/jndi.properties.template]: Dependency
Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[conf/templates/
jndi.properties.template]/File[/mnt/apache-stratos-
cartridge-agent-4.0.0/conf/templates/jndi.properties.template]: Skipping
because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]
/File[/mnt/apache-stratos-cartridge-agent-4.0.0/bin/stratos.sh]: Dependency
Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]
/File[/mnt/apache-stratos-cartridge-agent-4.0.0/bin/stratos.sh]: Skipping
because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
instance-activated.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/instance-activated.sh]: Dependency Exec[apache2
restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
instance-activated.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/instance-activated.sh]: Skipping because of failed
dependencies
Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
start-servers.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/start-servers.sh]: Dependency Exec[apache2 restart]
has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
start-servers.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/start-servers.sh]: Skipping because of failed
dependencies
Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
instance-started.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/instance-started.sh]: Dependency Exec[apache2
restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
instance-started.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/instance-started.sh]: Skipping because of failed
dependencies
Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
clean.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0/extensions/clean.sh]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
clean.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0/extensions/clean.sh]:
Skipping because of failed dependencies
Notice: /Stage[main]/Agent/Agent::Push_templates[extensions/
artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/artifacts-updated.sh]: Dependency Exec[apache2
restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Push_templates[extensions/
artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-
agent-4.0.0/extensions/artifacts-updated.sh]: Skipping because of failed
dependencies
Info: Agent::Start[cartridge-agent]: Scheduling refresh of
Exec[starting_cartridge-agent]
Notice: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
Dependency Exec[apache2 restart] has failures: true
Warning: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
Skipping because of failed dependencies
Error: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
Failed to call refresh: Working directory
'/mnt/apache-stratos-cartridge-agent-4.0.0/bin/'
does not exist
Error: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]:
Working directory '/mnt/apache-stratos-cartridge-agent-4.0.0/bin/' does not
exist
Info: Creating state file /var/lib/puppet/state/state.yaml


On Sun, Aug 31, 2014 at 9:35 AM, Akila Ravihansa Perera <ra...@wso2.com>
wrote:

> Hi,
>
> Can you post cartridge agent log files? What exactly is the issue? Did
> you change Puppet IP accordingly when installing Stratos? You need to
> change CEP IP in Puppet master nodes.pp as well.
>
> Thanks.
>
> On Sun, Aug 31, 2014 at 9:17 AM, Madhawa Bandara <ma...@wso2.com> wrote:
> > Hi,
> > I have already installed the puppet master in my local machine. Then I
> tried
> > installing it on another open stack instance. But still it fails when
> > installing the php cartridge with the cartridge agent.
> > Thanks
> >
> > On 28 Aug 2014 07:35, "Prasanna Dangalla" <pr...@wso2.com> wrote:
> >>
> >> Hi,
> >> I have installed a puppet master in 192.168.18.165. Check with this
> puppet
> >> master. This is an instance in http://192.168.18.25 which is named as
> >> cp-puppet-master-prasanna
> >>
> >>
> >>
> >> Prasanna Dangalla
> >> Software Engineer, WSO2, Inc.; http://wso2.com/
> >> lean.enterprise.middleware
> >>
> >> cell: +94 777 55 80 30 | +94 718 11 27 51
> >> twitter: @prasa77
> >>
> >>
> >> On Sun, Aug 24, 2014 at 11:21 PM, Chamila De Alwis <ch...@wso2.com>
> >> wrote:
> >>>
> >>> If php is successfully installed in the instance then that means puppet
> >>> agent must have worked as expected.
> >>>
> >>>
> >>> Regards,
> >>> Chamila de Alwis
> >>> Software Engineer | WSO2 | +94772207163
> >>> Blog: code.chamiladealwis.com
> >>>
> >>>
> >>>
> >>>
> >>> On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com>
> >>> wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> No I didn't install puppet agent manually. I just followed the
> >>>> instructions in [1] and [2] and provided php as the stratos
> service-name.
> >>>> I noticed that php is successfully installed in the instance. Any
> >>>> thoughts?
> >>>>
> >>>> [1] -
> >>>>
> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
> >>>>
> >>>> [2} -
> >>>>
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
> >>>>
> >>>>
> >>>>
> >>>> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <ch...@wso2.com>
> >>>> wrote:
> >>>>>
> >>>>>
> >>>>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com>
> >>>>> wrote:
> >>>>>>
> >>>>>> How can I provide arguments when running the config.sh in the puppet
> >>>>>> agent?
> >>>>>
> >>>>>
> >>>>> I guess you can edit the puppetinstall.sh script.
> >>>>>
> >>>>> After downloading the puppetinstall script you'll find the puppet
> agent
> >>>>> run line at :258. Add --waitforcert=300 (120 is the default it
> seems) to it.
> >>>>> Then run config.sh again. Like Nirmal mentioned you shouldn't
> install puppet
> >>>>> agent manually.
> >>>>>
> >>>>>
> >>>>> Regards,
> >>>>> Chamila de Alwis
> >>>>> Software Engineer | WSO2 | +94772207163
> >>>>> Blog: code.chamiladealwis.com
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Regards,
> >>>>
> >>>> Madhawa Bandara
> >>>> Software Engineer
> >>>> WSO2, Inc.
> >>>> lean.enterprise.middleware
> >>>>
> >>>> Mobile - +94777487726
> >>>> Blog - classdeffound.blogspot.com
> >>>
> >>>
> >>
> >
>
>
>
> --
> Akila Ravihansa Perera
> Software Engineer, WSO2
> Committer & PMC Member, Apache Stratos
>
> Blog: http://ravihansa3000.blogspot.com
>



-- 
Regards,

*Madhawa Bandara*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777487726*
Blog* - *classdeffound.blogspot.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
Hi,

Can you post cartridge agent log files? What exactly is the issue? Did
you change Puppet IP accordingly when installing Stratos? You need to
change CEP IP in Puppet master nodes.pp as well.

Thanks.

On Sun, Aug 31, 2014 at 9:17 AM, Madhawa Bandara <ma...@wso2.com> wrote:
> Hi,
> I have already installed the puppet master in my local machine. Then I tried
> installing it on another open stack instance. But still it fails when
> installing the php cartridge with the cartridge agent.
> Thanks
>
> On 28 Aug 2014 07:35, "Prasanna Dangalla" <pr...@wso2.com> wrote:
>>
>> Hi,
>> I have installed a puppet master in 192.168.18.165. Check with this puppet
>> master. This is an instance in http://192.168.18.25 which is named as
>> cp-puppet-master-prasanna
>>
>>
>>
>> Prasanna Dangalla
>> Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>> cell: +94 777 55 80 30 | +94 718 11 27 51
>> twitter: @prasa77
>>
>>
>> On Sun, Aug 24, 2014 at 11:21 PM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>>
>>> If php is successfully installed in the instance then that means puppet
>>> agent must have worked as expected.
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>>
>>> On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> No I didn't install puppet agent manually. I just followed the
>>>> instructions in [1] and [2] and provided php as the stratos service-name.
>>>> I noticed that php is successfully installed in the instance. Any
>>>> thoughts?
>>>>
>>>> [1] -
>>>> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>>>>
>>>> [2} -
>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>>>>
>>>>
>>>>
>>>> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <ch...@wso2.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com>
>>>>> wrote:
>>>>>>
>>>>>> How can I provide arguments when running the config.sh in the puppet
>>>>>> agent?
>>>>>
>>>>>
>>>>> I guess you can edit the puppetinstall.sh script.
>>>>>
>>>>> After downloading the puppetinstall script you'll find the puppet agent
>>>>> run line at :258. Add --waitforcert=300 (120 is the default it seems) to it.
>>>>> Then run config.sh again. Like Nirmal mentioned you shouldn't install puppet
>>>>> agent manually.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Chamila de Alwis
>>>>> Software Engineer | WSO2 | +94772207163
>>>>> Blog: code.chamiladealwis.com
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Madhawa Bandara
>>>> Software Engineer
>>>> WSO2, Inc.
>>>> lean.enterprise.middleware
>>>>
>>>> Mobile - +94777487726
>>>> Blog - classdeffound.blogspot.com
>>>
>>>
>>
>



-- 
Akila Ravihansa Perera
Software Engineer, WSO2
Committer & PMC Member, Apache Stratos

Blog: http://ravihansa3000.blogspot.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Madhawa Bandara <ma...@wso2.com>.
Hi,
I have already installed the puppet master in my local machine. Then I
tried installing it on another open stack instance. But still it fails when
installing the php cartridge with the cartridge agent.
Thanks
On 28 Aug 2014 07:35, "Prasanna Dangalla" <pr...@wso2.com> wrote:

> Hi,
> I have installed a puppet master in 192.168.18.165. Check with this puppet
> master. This is an instance in http://192.168.18.25 which is named as
> cp-puppet-master-prasanna
> <http://192.168.18.25/project/instances/fd497804-88b2-4f9f-830c-74fb063ab064/>
>
>
>
> Prasanna Dangalla
> Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
> cell: +94 777 55 80 30 | +94 718 11 27 51
> twitter: @prasa77
>
>
> On Sun, Aug 24, 2014 at 11:21 PM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> If php is successfully installed in the instance then that means puppet
>> agent must have worked as expected.
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>>
>> On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> No I didn't install puppet agent manually. I just followed the
>>> instructions in [1] and [2] and provided php as the stratos service-name
>>> .
>>> I noticed that php is successfully installed in the instance. Any
>>> thoughts?
>>>
>>> [1] -
>>> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>>>
>>> [2} -
>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>>>
>>>
>>>
>>> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <ch...@wso2.com>
>>> wrote:
>>>
>>>>
>>>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com>
>>>> wrote:
>>>>
>>>>> How can I provide arguments when running the config.sh in the puppet
>>>>> agent?
>>>>>
>>>>
>>>> I guess you can edit the puppetinstall.sh script.
>>>>
>>>> After downloading the puppetinstall script you'll find the puppet agent
>>>> run line at :258. Add --waitforcert=300 (120 is the default it seems) to
>>>> it. Then run config.sh again. Like Nirmal mentioned you shouldn't install
>>>> puppet agent manually.
>>>>
>>>>
>>>> Regards,
>>>> Chamila de Alwis
>>>> Software Engineer | WSO2 | +94772207163
>>>> Blog: code.chamiladealwis.com
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> *Madhawa Bandara*
>>> Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - *+94777487726 <%2B94777487726>*
>>> Blog* - *classdeffound.blogspot.com
>>>
>>
>>
>

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Prasanna Dangalla <pr...@wso2.com>.
Hi,
I have installed a puppet master in 192.168.18.165. Check with this puppet
master. This is an instance in http://192.168.18.25 which is named as
cp-puppet-master-prasanna
<http://192.168.18.25/project/instances/fd497804-88b2-4f9f-830c-74fb063ab064/>



Prasanna Dangalla
Software Engineer, WSO2, Inc.; http://wso2.com/
lean.enterprise.middleware

cell: +94 777 55 80 30 | +94 718 11 27 51
twitter: @prasa77


On Sun, Aug 24, 2014 at 11:21 PM, Chamila De Alwis <ch...@wso2.com>
wrote:

> If php is successfully installed in the instance then that means puppet
> agent must have worked as expected.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
>
> On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com>
> wrote:
>
>> Hi,
>>
>> No I didn't install puppet agent manually. I just followed the
>> instructions in [1] and [2] and provided php as the stratos service-name
>> .
>> I noticed that php is successfully installed in the instance. Any
>> thoughts?
>>
>> [1] -
>> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>>
>> [2} -
>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>>
>>
>>
>> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>
>>>
>>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com>
>>> wrote:
>>>
>>>> How can I provide arguments when running the config.sh in the puppet
>>>> agent?
>>>>
>>>
>>> I guess you can edit the puppetinstall.sh script.
>>>
>>> After downloading the puppetinstall script you'll find the puppet agent
>>> run line at :258. Add --waitforcert=300 (120 is the default it seems) to
>>> it. Then run config.sh again. Like Nirmal mentioned you shouldn't install
>>> puppet agent manually.
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>> *Madhawa Bandara*
>> Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+94777487726 <%2B94777487726>*
>> Blog* - *classdeffound.blogspot.com
>>
>
>

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Chamila De Alwis <ch...@wso2.com>.
If php is successfully installed in the instance then that means puppet
agent must have worked as expected.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com




On Sun, Aug 24, 2014 at 10:07 PM, Madhawa Bandara <ma...@wso2.com> wrote:

> Hi,
>
> No I didn't install puppet agent manually. I just followed the
> instructions in [1] and [2] and provided php as the stratos service-name.
> I noticed that php is successfully installed in the instance. Any thoughts?
>
> [1] -
> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>
> [2} -
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>
>
>
> On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>>
>> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com>
>> wrote:
>>
>>> How can I provide arguments when running the config.sh in the puppet
>>> agent?
>>>
>>
>> I guess you can edit the puppetinstall.sh script.
>>
>> After downloading the puppetinstall script you'll find the puppet agent
>> run line at :258. Add --waitforcert=300 (120 is the default it seems) to
>> it. Then run config.sh again. Like Nirmal mentioned you shouldn't install
>> puppet agent manually.
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
>
> --
> Regards,
>
> *Madhawa Bandara*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+94777487726 <%2B94777487726>*
> Blog* - *classdeffound.blogspot.com
>

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Madhawa Bandara <ma...@wso2.com>.
Hi,

No I didn't install puppet agent manually. I just followed the instructions
in [1] and [2] and provided php as the stratos service-name.
I noticed that php is successfully installed in the instance. Any thoughts?

[1] -
http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/

[2} -
https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack



On Sun, Aug 24, 2014 at 8:59 PM, Chamila De Alwis <ch...@wso2.com> wrote:

>
> On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com> wrote:
>
>> How can I provide arguments when running the config.sh in the puppet
>> agent?
>>
>
> I guess you can edit the puppetinstall.sh script.
>
> After downloading the puppetinstall script you'll find the puppet agent
> run line at :258. Add --waitforcert=300 (120 is the default it seems) to
> it. Then run config.sh again. Like Nirmal mentioned you shouldn't install
> puppet agent manually.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
Regards,

*Madhawa Bandara*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777487726*
Blog* - *classdeffound.blogspot.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Chamila De Alwis <ch...@wso2.com>.
On Sun, Aug 24, 2014 at 8:03 PM, Madhawa Bandara <ma...@wso2.com> wrote:

> How can I provide arguments when running the config.sh in the puppet
> agent?
>

I guess you can edit the puppetinstall.sh script.

After downloading the puppetinstall script you'll find the puppet agent run
line at :258. Add --waitforcert=300 (120 is the default it seems) to it.
Then run config.sh again. Like Nirmal mentioned you shouldn't install
puppet agent manually.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Madhawa Bandara <ma...@wso2.com>.
Hi,

autosign is already set to *true* there in the puppet.conf.

I found here [1] that setting the arguments --test --waitforcert=60 in
puppet agent might be a solution.
How can I provide arguments when running the config.sh in the puppet agent?


[1] -
http://grokbase.com/t/gg/puppet-users/127avaq8nf/err-could-not-request-certificate-execution-expired


Thanks,
Madhawa




On Sun, Aug 24, 2014 at 1:32 PM, Chamila De Alwis <ch...@wso2.com> wrote:

>
> On Sat, Aug 23, 2014 at 11:17 PM, Madhawa Bandara <ma...@wso2.com>
> wrote:
>
>> Could not request certificate: execution expired
>
>
> This seems to be caused by puppet agent not being able to establish trust
> between itself and the master. There might not be anything if you issue
> `puppet cert list` on the puppet server.
>
> You can have puppet master auto sign every certificate request. To do this
> add the following line under the [master] section in the puppet.conf of the
> puppet master.
>
> autosign = true
>
> You can find additional details on how to enable more granular autosigning
> at this puppet documentation [1]
>
> [1] -
> https://docs.puppetlabs.com/puppet/latest/reference/ssl_autosign.html
>
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
Regards,

*Madhawa Bandara*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777487726*
Blog* - *classdeffound.blogspot.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Chamila De Alwis <ch...@wso2.com>.
On Sat, Aug 23, 2014 at 11:17 PM, Madhawa Bandara <ma...@wso2.com> wrote:

> Could not request certificate: execution expired


This seems to be caused by puppet agent not being able to establish trust
between itself and the master. There might not be anything if you issue
`puppet cert list` on the puppet server.

You can have puppet master auto sign every certificate request. To do this
add the following line under the [master] section in the puppet.conf of the
puppet master.

autosign = true

You can find additional details on how to enable more granular autosigning
at this puppet documentation [1]

[1] - https://docs.puppetlabs.com/puppet/latest/reference/ssl_autosign.html



Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Installing the PHP Cartridge and Stratos Cartridge Agent

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Madhawa,

On Sat, Aug 23, 2014 at 11:17 PM, Madhawa Bandara <ma...@wso2.com> wrote:

> Hi all,
>
> I need to create an image of a machine in Openstack with PHP and Stratos
> Cartridge Agent installed.
>
> I have created an Ubuntu 14.04 cloud instance in Openstack and installed
> the Puppet agent there.
>

Did you install puppet agent manually? If so you shouldn't be doing that
since config.sh suppose to install puppet agent too.

https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack#id-4.0.0CreatingaCartridgeonOpenStack-Quick


> The Puppet master is in my local machine.
>
> When running the config.sh for php following error is given:
>
> *Error: Could not request certificate: execution expired*
> *Exiting; failed to retrieve certificate and waitforcert is disabled*
> */bin/rm: cannot remove
> ‘/mnt/apache-stratos-cartridge-agent-4.0.0/wso2carbon.lck’: No such file or
> directory*
>
> What is the issue here?
>
> I'm following [1] and [2].
>
> [1] -
> http://udaraliyanage.wordpress.com/2014/04/11/creating-cartridge-for-apache-stratos/comment-page-1/
>
> [2} -
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+OpenStack
>
> Thanks.
>
> --
> Regards,
>
> *Madhawa Bandara*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+94777487726 <%2B94777487726>*
> Blog* - *classdeffound.blogspot.com
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/