You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Maria Beckham <ma...@yahoo.com> on 2014/06/26 00:04:03 UTC

config.sh error

Hi All,

I am trying to create a generic cartridge. As part of this exercise, there is a step to run config.sh

But, when I run config.sh, I am getting the below error output. The hostname created by our sysadmins is big

stratos-master-229867.phx-os1.stratus.dev.eco.com.  They cannot change it just for my need, as it automatically created in openstack by their automated scripts.


Whats the solution or workaround?


Output:

Installation started. Please wait ...
hostname: name too long
[Error] Failed to update hostname.
/bin/rm: cannot remove `/mnt/apache-stratos-cartridge-agent-4.0.0-SNAPSHOT/wso2carbon.lck': No such file or directory

Re: config.sh error

Posted by Dinesh Bandara <di...@wso2.com>.
Through the config.sh we change the hostname of the cartridge instance as
follows;

*{RANDOMNUMBER}.default.{SERVICE_NAME}.{DOMAIN}*

In your case, length of the newly generated hostname will be exceed the
allowed maximum character length of your system.

There is a workaround for this problem. Change the random number generating
mechanism in your config.sh[1] and init.sh[2], default generated random
number contain 12 characters.

[1]
https://github.com/apache/stratos/blob/master/tools/puppet3-agent/config.sh#L37
[2]
https://github.com/apache/stratos/blob/master/tools/puppet3-agent/init.sh#L87



On Thu, Jun 26, 2014 at 9:32 AM, Maria Beckham <ma...@yahoo.com>
wrote:

> i can check and update u. but, how does it matter? this error is being
> thrown by config.sh right?
>
> i could access management url with same hostname right?
>
>   ------------------------------
>  *From:* Dinesh Bandara <di...@wso2.com>
> *To:* dev <de...@stratos.apache.org>; Maria Beckham <
> mariabeckham77@yahoo.com>
> *Sent:* Wednesday, June 25, 2014 8:57 PM
> *Subject:* Re: config.sh error
>
> Hi,
>
> Please check the maximum number of characters for a hostname by using the
> following command
>
> getconf HOST_NAME_MAX
>
>
>
>
>
>
> On Thu, Jun 26, 2014 at 3:34 AM, Maria Beckham <ma...@yahoo.com>
> wrote:
>
> Hi All,
>
>  I am trying to create a generic cartridge. As part of this exercise,
> there is a step to run config.sh
>
> But, when I run config.sh, I am getting the below error output. The
> hostname created by our sysadmins is big
>
> stratos-master-229867.phx-os1.stratus.dev.eco.com.  They cannot change it
> just for my need, as it automatically created in openstack by their
> automated scripts.
>
>  Whats the solution or workaround?
>
>
>  Output:
>
>  Installation started. Please wait ...
> hostname: name too long
> [Error] Failed to update hostname.
> /bin/rm: cannot remove
> `/mnt/apache-stratos-cartridge-agent-4.0.0-SNAPSHOT/wso2carbon.lck': No
> such file or directory
>
>
>
>
>
>
> --
> *Dinesh Bandara*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
>
>
>


-- 
*Dinesh Bandara*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

Re: config.sh error

Posted by Maria Beckham <ma...@yahoo.com>.
i can check and update u. but, how does it matter? this error is being thrown by config.sh right?

i could access management url with same hostname right?


________________________________
 From: Dinesh Bandara <di...@wso2.com>
To: dev <de...@stratos.apache.org>; Maria Beckham <ma...@yahoo.com> 
Sent: Wednesday, June 25, 2014 8:57 PM
Subject: Re: config.sh error
 


Hi,

Please check the maximum number of characters for a hostname by using the following command

getconf HOST_NAME_MAX








On Thu, Jun 26, 2014 at 3:34 AM, Maria Beckham <ma...@yahoo.com> wrote:

Hi All,
>
>
>I am trying to create a generic cartridge. As part of this exercise, there is a step to run config.sh
>
>
>But, when I run config.sh, I am getting the below error output. The hostname created by our sysadmins is big
>
>
>stratos-master-229867.phx-os1.stratus.dev.eco.com.  They cannot change it just for my need, as it automatically created in openstack by their automated scripts.
>
>
>
>Whats the solution or workaround?
>
>
>
>
>Output:
>
>
>Installation started. Please wait ...
>hostname: name too long
>[Error] Failed to update hostname.
>/bin/rm: cannot remove `/mnt/apache-stratos-cartridge-agent-4.0.0-SNAPSHOT/wso2carbon.lck': No such file or directory
>
>
>
>
>
>


-- 

Dinesh Bandara
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

Re: config.sh error

Posted by Dinesh Bandara <di...@wso2.com>.
Hi,

Please check the maximum number of characters for a hostname by using the
following command

getconf HOST_NAME_MAX




On Thu, Jun 26, 2014 at 3:34 AM, Maria Beckham <ma...@yahoo.com>
wrote:

> Hi All,
>
> I am trying to create a generic cartridge. As part of this exercise, there
> is a step to run config.sh
>
> But, when I run config.sh, I am getting the below error output. The
> hostname created by our sysadmins is big
>
> stratos-master-229867.phx-os1.stratus.dev.eco.com.  They cannot change it
> just for my need, as it automatically created in openstack by their
> automated scripts.
>
> Whats the solution or workaround?
>
>
> Output:
>
> Installation started. Please wait ...
> hostname: name too long
> [Error] Failed to update hostname.
> /bin/rm: cannot remove
> `/mnt/apache-stratos-cartridge-agent-4.0.0-SNAPSHOT/wso2carbon.lck': No
> such file or directory
>
>
>
>


-- 
*Dinesh Bandara*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware