You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Asanka Sanjaya Herath <an...@gmail.com> on 2015/06/06 07:48:48 UTC

[Error] Failed to start an instance in GCE

Hi All,

I used latest Stratos master branch code and tried to deploy an application
in GCE. I'm getting this error. Any help is highly appreciated.

[2015-06-06 05:04:21,391]  INFO
{org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
-  Member created: [service-name] php [cluster-id]
single-cartridge-app.my-php.php.domain [member-id]
single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
[cluster-instance-id] single-cartridge-app-1
[2015-06-06 05:04:23,996] ERROR
{org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
an instance. MemberContext [applicationId=single-cartridge-app,
cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
instanceId=null, partition=Partition [id=partition-1, description=null,
isPublic=false, provider=gce, properties=Properties [properties=[Property
[name=region, value=default]]]], defaultPrivateIP=null,
defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
initTime=1433567061119, lbClusterId=null,
networkPartitionId=network-partition-1, kubernetesPodId=null,
kubernetesPodLabel=null, loadBalancingIPType=Private,
instanceMetadata=null, properties=Properties [properties=[Property
[name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
empty. Length must be 3 to 63 symbols..
java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
constraints. Reason: Can't be null or empty. Length must be 3 to 63
symbols..
at
org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
at
org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
at
org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
at
org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
at
org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
at
org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
at
org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
at
org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
at
com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
at
com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
at
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
at com.google.common.collect.Iterators.any(Iterators.java:679)
at com.google.common.collect.Iterables.any(Iterables.java:623)
at
org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
at
org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
at
org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
at
org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
at
org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
at
org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)


-- 
Thanks,
Regards,
ASH

Re: [Error] Failed to start an instance in GCE

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
​Thanks for the help Lahiru,Isuru and Gayan, Problem solved once I delete
the instance named ha-proxy. I'll follow what you mentioned Lahiru.​

On Sun, Jun 7, 2015 at 7:22 AM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi Asanka,
>
> Start your application name with an integer(mentioned in json). We prefix
> the application name to the member-id.
>
> This is a limitation we have when we use GCE. GCE API doesn't like it when
> the instance name is not started with an integer.
>
> Thanks.
>
> On Sun, Jun 7, 2015 at 12:14 PM, Gayan Gunarathne <ga...@wso2.com> wrote:
>
>> Hi Asanka,
>>
>> On Sun, Jun 7, 2015 at 11:27 AM, Asanka Sanjaya Herath <
>> angal.sh@gmail.com> wrote:
>>
>>> Hi Isuru,
>>>
>>> i'm continuously getting this error. I did debugging but I couldn't be
>>> able to find the fault or a object called "ha" . But I suddenly noticed
>>> that I have an instance created manually in GCE called ha-proxy. Once I
>>> delete that the error was gone.
>>>
>> Are you try to spawn the instance name "ha-proxy" ? This may be the
>> issue. As you have already have a instance with that name you may not allow
>> to create a instance with the same name.
>>
>>
>>> It seems like that is a bug in Jclouds. It doesn't allow us to create
>>> new instances using Jclouds API when  we have instances with just two
>>> letter names(eg: ha-proxy or just ha).
>>>
>> Can't you create a instance with ha when there is no other instance
>> called ha in GCE?
>>
>>
>>>
>>> On Sun, Jun 7, 2015 at 4:38 AM, Isuru Haththotuwa <is...@apache.org>
>>> wrote:
>>>
>>>> Hi Asanka,
>>>>
>>>> The error says what caused it:
>>>>
>>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns
>>>> naming constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>>> symbols..
>>>>
>>>> Are you getting this continuously? If so, can you put a debug point in
>>>> startInstance method in JcloudsIaaS class and see what is causing this
>>>> IllegalArgumentException.
>>>>
>>>> On Sat, Jun 6, 2015 at 11:18 AM, Asanka Sanjaya Herath <
>>>> angal.sh@gmail.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I used latest Stratos master branch code and tried to deploy an
>>>>> application in GCE. I'm getting this error. Any help is highly appreciated.
>>>>>
>>>>> [2015-06-06 05:04:21,391]  INFO
>>>>> {org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
>>>>> -  Member created: [service-name] php [cluster-id]
>>>>> single-cartridge-app.my-php.php.domain [member-id]
>>>>> single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
>>>>> [cluster-instance-id] single-cartridge-app-1
>>>>> [2015-06-06 05:04:23,996] ERROR
>>>>> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
>>>>> an instance. MemberContext [applicationId=single-cartridge-app,
>>>>> cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
>>>>> memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
>>>>> instanceId=null, partition=Partition [id=partition-1, description=null,
>>>>> isPublic=false, provider=gce, properties=Properties [properties=[Property
>>>>> [name=region, value=default]]]], defaultPrivateIP=null,
>>>>> defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
>>>>> initTime=1433567061119, lbClusterId=null,
>>>>> networkPartitionId=network-partition-1, kubernetesPodId=null,
>>>>> kubernetesPodLabel=null, loadBalancingIPType=Private,
>>>>> instanceMetadata=null, properties=Properties [properties=[Property
>>>>> [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
>>>>> Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
>>>>> empty. Length must be 3 to 63 symbols..
>>>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns
>>>>> naming constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>>>> symbols..
>>>>> at
>>>>> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
>>>>> at
>>>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
>>>>> at
>>>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
>>>>> at
>>>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
>>>>> at
>>>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
>>>>> at
>>>>> org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
>>>>> at
>>>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
>>>>> at
>>>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
>>>>> at
>>>>> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
>>>>> at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
>>>>> at
>>>>> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>>>>> at
>>>>> com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
>>>>> at
>>>>> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>>>>> at
>>>>> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>>>>> at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
>>>>> at com.google.common.collect.Iterators.any(Iterators.java:679)
>>>>> at com.google.common.collect.Iterables.any(Iterables.java:623)
>>>>> at
>>>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
>>>>> at
>>>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
>>>>> at
>>>>> org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
>>>>> at
>>>>> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>>> at
>>>>> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>>>>> at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
>>>>> at
>>>>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
>>>>> at
>>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
>>>>> at
>>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
>>>>> at
>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>> at
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>
>>>>>
>>>>> --
>>>>> Thanks,
>>>>> Regards,
>>>>> ASH
>>>>>
>>>>> --
>>>>> Thanks and Regards,
>>>>>
>>>>> Isuru H.
>>>>> +94 716 358 048* <http://wso2.com/>*
>>>>>
>>>>>
>>>>> * <http://wso2.com/>*
>>>>>
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Thanks,
>>> Regards,
>>> ASH
>>>
>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gayang@wso2.com  | mobile : +94 766819985
>>
>>
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Thanks,
Regards,
ASH

Re: [Error] Failed to start an instance in GCE

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi Asanka,

Start your application name with an integer(mentioned in json). We prefix
the application name to the member-id.

This is a limitation we have when we use GCE. GCE API doesn't like it when
the instance name is not started with an integer.

Thanks.

On Sun, Jun 7, 2015 at 12:14 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

> Hi Asanka,
>
> On Sun, Jun 7, 2015 at 11:27 AM, Asanka Sanjaya Herath <angal.sh@gmail.com
> > wrote:
>
>> Hi Isuru,
>>
>> i'm continuously getting this error. I did debugging but I couldn't be
>> able to find the fault or a object called "ha" . But I suddenly noticed
>> that I have an instance created manually in GCE called ha-proxy. Once I
>> delete that the error was gone.
>>
> Are you try to spawn the instance name "ha-proxy" ? This may be the
> issue. As you have already have a instance with that name you may not allow
> to create a instance with the same name.
>
>
>> It seems like that is a bug in Jclouds. It doesn't allow us to create new
>> instances using Jclouds API when  we have instances with just two letter
>> names(eg: ha-proxy or just ha).
>>
> Can't you create a instance with ha when there is no other instance called
> ha in GCE?
>
>
>>
>> On Sun, Jun 7, 2015 at 4:38 AM, Isuru Haththotuwa <is...@apache.org>
>> wrote:
>>
>>> Hi Asanka,
>>>
>>> The error says what caused it:
>>>
>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
>>> constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>> symbols..
>>>
>>> Are you getting this continuously? If so, can you put a debug point in
>>> startInstance method in JcloudsIaaS class and see what is causing this
>>> IllegalArgumentException.
>>>
>>> On Sat, Jun 6, 2015 at 11:18 AM, Asanka Sanjaya Herath <
>>> angal.sh@gmail.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I used latest Stratos master branch code and tried to deploy an
>>>> application in GCE. I'm getting this error. Any help is highly appreciated.
>>>>
>>>> [2015-06-06 05:04:21,391]  INFO
>>>> {org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
>>>> -  Member created: [service-name] php [cluster-id]
>>>> single-cartridge-app.my-php.php.domain [member-id]
>>>> single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
>>>> [cluster-instance-id] single-cartridge-app-1
>>>> [2015-06-06 05:04:23,996] ERROR
>>>> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
>>>> an instance. MemberContext [applicationId=single-cartridge-app,
>>>> cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
>>>> memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
>>>> instanceId=null, partition=Partition [id=partition-1, description=null,
>>>> isPublic=false, provider=gce, properties=Properties [properties=[Property
>>>> [name=region, value=default]]]], defaultPrivateIP=null,
>>>> defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
>>>> initTime=1433567061119, lbClusterId=null,
>>>> networkPartitionId=network-partition-1, kubernetesPodId=null,
>>>> kubernetesPodLabel=null, loadBalancingIPType=Private,
>>>> instanceMetadata=null, properties=Properties [properties=[Property
>>>> [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
>>>> Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
>>>> empty. Length must be 3 to 63 symbols..
>>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns
>>>> naming constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>>> symbols..
>>>> at
>>>> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
>>>> at
>>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
>>>> at
>>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
>>>> at
>>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
>>>> at
>>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
>>>> at
>>>> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
>>>> at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
>>>> at
>>>> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>>>> at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
>>>> at
>>>> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>>>> at
>>>> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>>>> at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
>>>> at com.google.common.collect.Iterators.any(Iterators.java:679)
>>>> at com.google.common.collect.Iterables.any(Iterables.java:623)
>>>> at
>>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
>>>> at
>>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
>>>> at
>>>> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>> at
>>>> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>>>> at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
>>>> at
>>>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>> at java.lang.Thread.run(Thread.java:745)
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Regards,
>>>> ASH
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>>
>> --
>> Thanks,
>> Regards,
>> ASH
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

phone: +94773325954
email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Error] Failed to start an instance in GCE

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
Hi Gayan,

No, I didn't try to spawn an instance named ha-proxy. I was trying to
deploy an application using Stratos in GCE.

Before that, I had created an instance named ha-proxy manually in GCE. In
that case we cannot create another instance using *any name *(Not ha-proxy
or ha) using Jclouds API. Because it seems like before creating an
instance, Jclouds scans all the other instances created in GCE. And once it
finds an instance which has just two or one letter for the name(before
"-"), throws an exception. Same type of issue can be found in here[1].


[1].
https://mail-archives.apache.org/mod_mbox/jclouds-user/201408.mbox/%3CCAD7EdunUxv4szAs-sHm9msX8jSm6c3EbWmQ2zAz+zR94=HZRGg@mail.gmail.com%3E

On Sun, Jun 7, 2015 at 6:44 AM, Gayan Gunarathne <ga...@wso2.com> wrote:

> Hi Asanka,
>
> On Sun, Jun 7, 2015 at 11:27 AM, Asanka Sanjaya Herath <angal.sh@gmail.com
> > wrote:
>
>> Hi Isuru,
>>
>> i'm continuously getting this error. I did debugging but I couldn't be
>> able to find the fault or a object called "ha" . But I suddenly noticed
>> that I have an instance created manually in GCE called ha-proxy. Once I
>> delete that the error was gone.
>>
> Are you try to spawn the instance name "ha-proxy" ? This may be the
> issue. As you have already have a instance with that name you may not allow
> to create a instance with the same name.
>
>
>> It seems like that is a bug in Jclouds. It doesn't allow us to create new
>> instances using Jclouds API when  we have instances with just two letter
>> names(eg: ha-proxy or just ha).
>>
> Can't you create a instance with ha when there is no other instance called
> ha in GCE?
>
>
>>
>> On Sun, Jun 7, 2015 at 4:38 AM, Isuru Haththotuwa <is...@apache.org>
>> wrote:
>>
>>> Hi Asanka,
>>>
>>> The error says what caused it:
>>>
>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
>>> constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>> symbols..
>>>
>>> Are you getting this continuously? If so, can you put a debug point in
>>> startInstance method in JcloudsIaaS class and see what is causing this
>>> IllegalArgumentException.
>>>
>>> On Sat, Jun 6, 2015 at 11:18 AM, Asanka Sanjaya Herath <
>>> angal.sh@gmail.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I used latest Stratos master branch code and tried to deploy an
>>>> application in GCE. I'm getting this error. Any help is highly appreciated.
>>>>
>>>> [2015-06-06 05:04:21,391]  INFO
>>>> {org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
>>>> -  Member created: [service-name] php [cluster-id]
>>>> single-cartridge-app.my-php.php.domain [member-id]
>>>> single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
>>>> [cluster-instance-id] single-cartridge-app-1
>>>> [2015-06-06 05:04:23,996] ERROR
>>>> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
>>>> an instance. MemberContext [applicationId=single-cartridge-app,
>>>> cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
>>>> memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
>>>> instanceId=null, partition=Partition [id=partition-1, description=null,
>>>> isPublic=false, provider=gce, properties=Properties [properties=[Property
>>>> [name=region, value=default]]]], defaultPrivateIP=null,
>>>> defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
>>>> initTime=1433567061119, lbClusterId=null,
>>>> networkPartitionId=network-partition-1, kubernetesPodId=null,
>>>> kubernetesPodLabel=null, loadBalancingIPType=Private,
>>>> instanceMetadata=null, properties=Properties [properties=[Property
>>>> [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
>>>> Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
>>>> empty. Length must be 3 to 63 symbols..
>>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns
>>>> naming constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>>> symbols..
>>>> at
>>>> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
>>>> at
>>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
>>>> at
>>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
>>>> at
>>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
>>>> at
>>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
>>>> at
>>>> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
>>>> at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
>>>> at
>>>> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>>>> at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
>>>> at
>>>> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>>>> at
>>>> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>>>> at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
>>>> at com.google.common.collect.Iterators.any(Iterators.java:679)
>>>> at com.google.common.collect.Iterables.any(Iterables.java:623)
>>>> at
>>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
>>>> at
>>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
>>>> at
>>>> org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
>>>> at
>>>> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>> at
>>>> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>>>> at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
>>>> at
>>>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
>>>> at
>>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>> at java.lang.Thread.run(Thread.java:745)
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Regards,
>>>> ASH
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>>
>> --
>> Thanks,
>> Regards,
>> ASH
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>



-- 
Thanks,
Regards,
ASH

Re: [Error] Failed to start an instance in GCE

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi Asanka,

On Sun, Jun 7, 2015 at 11:27 AM, Asanka Sanjaya Herath <an...@gmail.com>
wrote:

> Hi Isuru,
>
> i'm continuously getting this error. I did debugging but I couldn't be
> able to find the fault or a object called "ha" . But I suddenly noticed
> that I have an instance created manually in GCE called ha-proxy. Once I
> delete that the error was gone.
>
Are you try to spawn the instance name "ha-proxy" ? This may be the issue.
As you have already have a instance with that name you may not allow to
create a instance with the same name.


> It seems like that is a bug in Jclouds. It doesn't allow us to create new
> instances using Jclouds API when  we have instances with just two letter
> names(eg: ha-proxy or just ha).
>
Can't you create a instance with ha when there is no other instance called
ha in GCE?


>
> On Sun, Jun 7, 2015 at 4:38 AM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> Hi Asanka,
>>
>> The error says what caused it:
>>
>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
>> constraints. Reason: Can't be null or empty. Length must be 3 to 63
>> symbols..
>>
>> Are you getting this continuously? If so, can you put a debug point in
>> startInstance method in JcloudsIaaS class and see what is causing this
>> IllegalArgumentException.
>>
>> On Sat, Jun 6, 2015 at 11:18 AM, Asanka Sanjaya Herath <
>> angal.sh@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I used latest Stratos master branch code and tried to deploy an
>>> application in GCE. I'm getting this error. Any help is highly appreciated.
>>>
>>> [2015-06-06 05:04:21,391]  INFO
>>> {org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
>>> -  Member created: [service-name] php [cluster-id]
>>> single-cartridge-app.my-php.php.domain [member-id]
>>> single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
>>> [cluster-instance-id] single-cartridge-app-1
>>> [2015-06-06 05:04:23,996] ERROR
>>> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
>>> an instance. MemberContext [applicationId=single-cartridge-app,
>>> cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
>>> memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
>>> instanceId=null, partition=Partition [id=partition-1, description=null,
>>> isPublic=false, provider=gce, properties=Properties [properties=[Property
>>> [name=region, value=default]]]], defaultPrivateIP=null,
>>> defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
>>> initTime=1433567061119, lbClusterId=null,
>>> networkPartitionId=network-partition-1, kubernetesPodId=null,
>>> kubernetesPodLabel=null, loadBalancingIPType=Private,
>>> instanceMetadata=null, properties=Properties [properties=[Property
>>> [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
>>> Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
>>> empty. Length must be 3 to 63 symbols..
>>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
>>> constraints. Reason: Can't be null or empty. Length must be 3 to 63
>>> symbols..
>>> at
>>> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
>>> at
>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
>>> at
>>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
>>> at
>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
>>> at
>>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
>>> at
>>> org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
>>> at
>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
>>> at
>>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
>>> at
>>> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
>>> at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
>>> at
>>> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>>> at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
>>> at
>>> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>>> at
>>> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>>> at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
>>> at com.google.common.collect.Iterators.any(Iterators.java:679)
>>> at com.google.common.collect.Iterables.any(Iterables.java:623)
>>> at
>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
>>> at
>>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
>>> at
>>> org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
>>> at
>>> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>> at
>>> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>>> at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
>>> at
>>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
>>> at
>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
>>> at
>>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>> at java.lang.Thread.run(Thread.java:745)
>>>
>>>
>>> --
>>> Thanks,
>>> Regards,
>>> ASH
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
> Thanks,
> Regards,
> ASH
>



-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 766819985

Re: [Error] Failed to start an instance in GCE

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
Hi Isuru,

i'm continuously getting this error. I did debugging but I couldn't be able
to find the fault or a object called "ha" . But I suddenly noticed that I
have an instance created manually in GCE called ha-proxy. Once I delete
that the error was gone. It seems like that is a bug in Jclouds. It doesn't
allow us to create new instances using Jclouds API when  we have instances
with just two letter names(eg: ha-proxy or just ha).

On Sun, Jun 7, 2015 at 4:38 AM, Isuru Haththotuwa <is...@apache.org> wrote:

> Hi Asanka,
>
> The error says what caused it:
>
> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
> constraints. Reason: Can't be null or empty. Length must be 3 to 63
> symbols..
>
> Are you getting this continuously? If so, can you put a debug point in
> startInstance method in JcloudsIaaS class and see what is causing this
> IllegalArgumentException.
>
> On Sat, Jun 6, 2015 at 11:18 AM, Asanka Sanjaya Herath <angal.sh@gmail.com
> > wrote:
>
>> Hi All,
>>
>> I used latest Stratos master branch code and tried to deploy an
>> application in GCE. I'm getting this error. Any help is highly appreciated.
>>
>> [2015-06-06 05:04:21,391]  INFO
>> {org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
>> -  Member created: [service-name] php [cluster-id]
>> single-cartridge-app.my-php.php.domain [member-id]
>> single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
>> [cluster-instance-id] single-cartridge-app-1
>> [2015-06-06 05:04:23,996] ERROR
>> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
>> an instance. MemberContext [applicationId=single-cartridge-app,
>> cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
>> memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
>> instanceId=null, partition=Partition [id=partition-1, description=null,
>> isPublic=false, provider=gce, properties=Properties [properties=[Property
>> [name=region, value=default]]]], defaultPrivateIP=null,
>> defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
>> initTime=1433567061119, lbClusterId=null,
>> networkPartitionId=network-partition-1, kubernetesPodId=null,
>> kubernetesPodLabel=null, loadBalancingIPType=Private,
>> instanceMetadata=null, properties=Properties [properties=[Property
>> [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
>> Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
>> empty. Length must be 3 to 63 symbols..
>> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
>> constraints. Reason: Can't be null or empty. Length must be 3 to 63
>> symbols..
>> at
>> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
>> at
>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
>> at
>> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
>> at
>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
>> at
>> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
>> at
>> org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
>> at
>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
>> at
>> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
>> at
>> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
>> at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
>> at
>> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>> at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
>> at
>> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>> at
>> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>> at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
>> at com.google.common.collect.Iterators.any(Iterators.java:679)
>> at com.google.common.collect.Iterables.any(Iterables.java:623)
>> at
>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
>> at
>> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
>> at
>> org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
>> at
>> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>> at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
>> at
>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
>> at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
>> at
>> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:745)
>>
>>
>> --
>> Thanks,
>> Regards,
>> ASH
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Thanks,
Regards,
ASH

Re: [Error] Failed to start an instance in GCE

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi Asanka,

The error says what caused it:

java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
constraints. Reason: Can't be null or empty. Length must be 3 to 63
symbols..

Are you getting this continuously? If so, can you put a debug point in
startInstance method in JcloudsIaaS class and see what is causing this
IllegalArgumentException.

On Sat, Jun 6, 2015 at 11:18 AM, Asanka Sanjaya Herath <an...@gmail.com>
wrote:

> Hi All,
>
> I used latest Stratos master branch code and tried to deploy an
> application in GCE. I'm getting this error. Any help is highly appreciated.
>
> [2015-06-06 05:04:21,391]  INFO
> {org.apache.stratos.messaging.message.processor.topology.MemberCreatedMessageProcessor}
> -  Member created: [service-name] php [cluster-id]
> single-cartridge-app.my-php.php.domain [member-id]
> single-cartridge-app.my-php.php.domain9d4fe844-6f74-47d4-8d4a-de00d4982a2f
> [cluster-instance-id] single-cartridge-app-1
> [2015-06-06 05:04:23,996] ERROR
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Failed to start
> an instance. MemberContext [applicationId=single-cartridge-app,
> cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain,
> memberId=single-cartridge-app.my-php.php.domain7b2d9a8c-76a8-4432-871b-1e257bd7560e,
> instanceId=null, partition=Partition [id=partition-1, description=null,
> isPublic=false, provider=gce, properties=Properties [properties=[Property
> [name=region, value=default]]]], defaultPrivateIP=null,
> defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null,
> initTime=1433567061119, lbClusterId=null,
> networkPartitionId=network-partition-1, kubernetesPodId=null,
> kubernetesPodLabel=null, loadBalancingIPType=Private,
> instanceMetadata=null, properties=Properties [properties=[Property
> [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=2]]]] Cause:
> Object 'ha' doesn't match dns naming constraints. Reason: Can't be null or
> empty. Length must be 3 to 63 symbols..
> java.lang.IllegalArgumentException: Object 'ha' doesn't match dns naming
> constraints. Reason: Can't be null or empty. Length must be 3 to 63
> symbols..
> at
> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
> at
> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51)
> at
> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
> at
> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
> at
> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
> at
> org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39)
> at
> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89)
> at
> org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51)
> at
> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
> at com.google.common.collect.Iterators$8.transform(Iterators.java:794)
> at
> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
> at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
> at
> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
> at
> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
> at com.google.common.collect.Iterators.indexOf(Iterators.java:771)
> at com.google.common.collect.Iterators.any(Iterators.java:679)
> at com.google.common.collect.Iterables.any(Iterables.java:623)
> at
> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:197)
> at
> org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121)
> at
> org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127)
> at
> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
> at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source)
> at
> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.startInstance(JcloudsIaas.java:133)
> at
> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.startInstance(InstanceCreator.java:109)
> at
> org.apache.stratos.cloud.controller.services.impl.InstanceCreator.run(InstanceCreator.java:68)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
>
>
> --
> Thanks,
> Regards,
> ASH
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>