Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Bhathiya Jayasekara
In your publisher node, does api-manager.xml has 'localhost' for gateway
url? If yes, please attach the api-manager.xml of publisher.

Thanks,
Bhathiya

On Fri, Nov 4, 2016 at 3:01 PM, Susinda Perera  wrote:

> I'm using localhost, as it gives me this error 'SSL peer failed hostname
> validation for name: 127.0.0.1', I created a keystore with 127.0.0.1 and
> tried and it worked. Have to check at which place it resolves localhost to
> 127.0.0.1.
>
> On Fri, Nov 4, 2016 at 2:27 PM, Bhathiya Jayasekara 
> wrote:
>
>>
>> On Fri, Nov 4, 2016 at 2:24 PM, Susinda Perera  wrote:
>>
>>> -Dorg.wso2.ignoreHostnameVerification=true
>>> This property is already in the wso2server.sh file, I.e having this did
>>> not helped me.
>>>
>>> On Fri, Nov 4, 2016 at 2:11 PM, Bhathiya Jayasekara 
>>> wrote:
>>>
 Hi Susinda,

 If you want to use IP instead of hostname, you have to create a cert
 for that IP. For CN validation, hostname and IP mapping is not used.

>>> I don't want to use the IP. but I tried that as a workaround only, just
>>> check if that works
>>>
>>
>> What I meant was why do you want to use IP to call the service? Why can't
>> you simply use 'localhost'?
>>
>> Thanks,
>> Bhathiya
>>
>>
>>>
 On a related note, using IPs for CN is not recommended in general.

 Thanks,
 Bhathiya

 On Fri, Nov 4, 2016 at 1:19 PM, Susinda Perera 
 wrote:

> Got this fixed by using a new keystore where primary key's CN is set
> to 127.0.0.1 and importing the public key of the same to
> client-truststore.jks.
> But i believe this is not the proper fix, as wso2carbon.jks already
> have the cert for localhost and we do not want to create another cert for
> 127.0.0.1.
> Any idea?
> Similar issues found in
> https://wso2.org/jira/browse/APIMANAGER-4205
> https://wso2.org/jira/browse/APIMANAGER-4626
>
> Thanks
> Susinda
>
> On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera 
> wrote:
>
>> Hi All
>> I'm getting this[1] $subject. Have anyone faced the same, what was
>> the resolution?
>>
>>
>> ERROR - APIGatewayManager Error occurred when publish to gateway
>> Production and Sandbox
>> org.apache.axis2.AxisFault: Error while contacting the authentication
>> admin services
>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>> ent.login(AbstractAPIGatewayAdminClient.java:92)
>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>> ent.setup(AbstractAPIGatewayAdminClient.java:50)
>> at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.> t>(APIGatewayAdminClient.java:37)
>> at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGatew
>> ay(APIGatewayManager.java:86)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway
>> (APIProviderImpl.java:1485)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPISta
>> tusChangeToGateways(APIProviderImpl.java:1294)
>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateA
>> PIStatusChangeToGateways(UserAwareAPIProvider.java:36)
>> at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(AP
>> IExecutor.java:136)
>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>> ltLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>> ltLifeCycle.invoke(DefaultLifeCycle.java:450)
>> at org.wso2.carbon.governance.registry.eventing.handlers.Govern
>> anceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.i
>> nvokeAspect(HandlerManager.java:2792)
>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycle
>> Manager.invokeAspect(HandlerLifecycleManager.java:518)
>> at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAs
>> pect(EmbeddedRegistry.java:2591)
>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.in
>> vokeAspect(CacheBackedRegistry.java:510)
>> at org.wso2.carbon.registry.core.session.UserRegistry.invokeAsp
>> ect(UserRegistry.java:1952)
>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleS
>> tatus(APIProviderImpl.java:3644)
>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeC
>> ycleStatus(UserAwareAPIProvider.java:148)
>> at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServic
>> 

Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Susinda Perera
I'm using localhost, as it gives me this error 'SSL peer failed hostname
validation for name: 127.0.0.1', I created a keystore with 127.0.0.1 and
tried and it worked. Have to check at which place it resolves localhost to
127.0.0.1.

On Fri, Nov 4, 2016 at 2:27 PM, Bhathiya Jayasekara 
wrote:

>
> On Fri, Nov 4, 2016 at 2:24 PM, Susinda Perera  wrote:
>
>> -Dorg.wso2.ignoreHostnameVerification=true
>> This property is already in the wso2server.sh file, I.e having this did
>> not helped me.
>>
>> On Fri, Nov 4, 2016 at 2:11 PM, Bhathiya Jayasekara 
>> wrote:
>>
>>> Hi Susinda,
>>>
>>> If you want to use IP instead of hostname, you have to create a cert for
>>> that IP. For CN validation, hostname and IP mapping is not used.
>>>
>> I don't want to use the IP. but I tried that as a workaround only, just
>> check if that works
>>
>
> What I meant was why do you want to use IP to call the service? Why can't
> you simply use 'localhost'?
>
> Thanks,
> Bhathiya
>
>
>>
>>> On a related note, using IPs for CN is not recommended in general.
>>>
>>> Thanks,
>>> Bhathiya
>>>
>>> On Fri, Nov 4, 2016 at 1:19 PM, Susinda Perera  wrote:
>>>
 Got this fixed by using a new keystore where primary key's CN is set to
 127.0.0.1 and importing the public key of the same to 
 client-truststore.jks.
 But i believe this is not the proper fix, as wso2carbon.jks already
 have the cert for localhost and we do not want to create another cert for
 127.0.0.1.
 Any idea?
 Similar issues found in
 https://wso2.org/jira/browse/APIMANAGER-4205
 https://wso2.org/jira/browse/APIMANAGER-4626

 Thanks
 Susinda

 On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera 
 wrote:

> Hi All
> I'm getting this[1] $subject. Have anyone faced the same, what was the
> resolution?
>
>
> ERROR - APIGatewayManager Error occurred when publish to gateway
> Production and Sandbox
> org.apache.axis2.AxisFault: Error while contacting the authentication
> admin services
> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
> ent.login(AbstractAPIGatewayAdminClient.java:92)
> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
> ent.setup(AbstractAPIGatewayAdminClient.java:50)
> at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient. t>(APIGatewayAdminClient.java:37)
> at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGatew
> ay(APIGatewayManager.java:86)
> at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway
> (APIProviderImpl.java:1485)
> at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPISta
> tusChangeToGateways(APIProviderImpl.java:1294)
> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateA
> PIStatusChangeToGateways(UserAwareAPIProvider.java:36)
> at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(AP
> IExecutor.java:136)
> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
> ltLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
> ltLifeCycle.invoke(DefaultLifeCycle.java:450)
> at org.wso2.carbon.governance.registry.eventing.handlers.Govern
> anceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.i
> nvokeAspect(HandlerManager.java:2792)
> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycle
> Manager.invokeAspect(HandlerLifecycleManager.java:518)
> at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAs
> pect(EmbeddedRegistry.java:2591)
> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.in
> vokeAspect(CacheBackedRegistry.java:510)
> at org.wso2.carbon.registry.core.session.UserRegistry.invokeAsp
> ect(UserRegistry.java:1952)
> at org.wso2.carbon.governance.api.common.dataobjects.Governance
> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
> at org.wso2.carbon.governance.api.common.dataobjects.Governance
> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
> at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleS
> tatus(APIProviderImpl.java:3644)
> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeC
> ycleStatus(UserAwareAPIProvider.java:148)
> at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServic
> eImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
> at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisChange
> LifecyclePost(ApisApi.java:91)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:62)
> at 

[Dev] Error while publishing apis to gateway

2016-11-04 Thread Susinda Perera
Hi All
I'm getting this[1] $subject. Have anyone faced the same, what was the
resolution?


ERROR - APIGatewayManager Error occurred when publish to gateway Production
and Sandbox
org.apache.axis2.AxisFault: Error while contacting the authentication admin
services
at
org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminClient.login(AbstractAPIGatewayAdminClient.java:92)
at
org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminClient.setup(AbstractAPIGatewayAdminClient.java:50)
at
org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.(APIGatewayAdminClient.java:37)
at
org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway(APIGatewayManager.java:86)
at
org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway(APIProviderImpl.java:1485)
at
org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPIStatusChangeToGateways(APIProviderImpl.java:1294)
at
org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateAPIStatusChangeToGateways(UserAwareAPIProvider.java:36)
at
org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(APIExecutor.java:136)
at
org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
at
org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.invoke(DefaultLifeCycle.java:450)
at
org.wso2.carbon.governance.registry.eventing.handlers.GovernanceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
at
org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2792)
at
org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java:518)
at
org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2591)
at
org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:510)
at
org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1952)
at
org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
at
org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
at
org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus(APIProviderImpl.java:3644)
at
org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus(UserAwareAPIProvider.java:148)
at
org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServiceImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
at
org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisChangeLifecyclePost(ApisApi.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at

Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Bhathiya Jayasekara
On Fri, Nov 4, 2016 at 2:24 PM, Susinda Perera  wrote:

> -Dorg.wso2.ignoreHostnameVerification=true
> This property is already in the wso2server.sh file, I.e having this did
> not helped me.
>
> On Fri, Nov 4, 2016 at 2:11 PM, Bhathiya Jayasekara 
> wrote:
>
>> Hi Susinda,
>>
>> If you want to use IP instead of hostname, you have to create a cert for
>> that IP. For CN validation, hostname and IP mapping is not used.
>>
> I don't want to use the IP. but I tried that as a workaround only, just
> check if that works
>

What I meant was why do you want to use IP to call the service? Why can't
you simply use 'localhost'?

Thanks,
Bhathiya


>
>> On a related note, using IPs for CN is not recommended in general.
>>
>> Thanks,
>> Bhathiya
>>
>> On Fri, Nov 4, 2016 at 1:19 PM, Susinda Perera  wrote:
>>
>>> Got this fixed by using a new keystore where primary key's CN is set to
>>> 127.0.0.1 and importing the public key of the same to client-truststore.jks.
>>> But i believe this is not the proper fix, as wso2carbon.jks already have
>>> the cert for localhost and we do not want to create another cert for
>>> 127.0.0.1.
>>> Any idea?
>>> Similar issues found in
>>> https://wso2.org/jira/browse/APIMANAGER-4205
>>> https://wso2.org/jira/browse/APIMANAGER-4626
>>>
>>> Thanks
>>> Susinda
>>>
>>> On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera 
>>> wrote:
>>>
 Hi All
 I'm getting this[1] $subject. Have anyone faced the same, what was the
 resolution?


 ERROR - APIGatewayManager Error occurred when publish to gateway
 Production and Sandbox
 org.apache.axis2.AxisFault: Error while contacting the authentication
 admin services
 at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
 ent.login(AbstractAPIGatewayAdminClient.java:92)
 at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
 ent.setup(AbstractAPIGatewayAdminClient.java:50)
 at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.>>> t>(APIGatewayAdminClient.java:37)
 at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGatew
 ay(APIGatewayManager.java:86)
 at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway
 (APIProviderImpl.java:1485)
 at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPISta
 tusChangeToGateways(APIProviderImpl.java:1294)
 at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateA
 PIStatusChangeToGateways(UserAwareAPIProvider.java:36)
 at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(AP
 IExecutor.java:136)
 at org.wso2.carbon.governance.registry.extensions.aspects.Defau
 ltLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
 at org.wso2.carbon.governance.registry.extensions.aspects.Defau
 ltLifeCycle.invoke(DefaultLifeCycle.java:450)
 at org.wso2.carbon.governance.registry.eventing.handlers.Govern
 anceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
 at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.i
 nvokeAspect(HandlerManager.java:2792)
 at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycle
 Manager.invokeAspect(HandlerLifecycleManager.java:518)
 at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAs
 pect(EmbeddedRegistry.java:2591)
 at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.in
 vokeAspect(CacheBackedRegistry.java:510)
 at org.wso2.carbon.registry.core.session.UserRegistry.invokeAsp
 ect(UserRegistry.java:1952)
 at org.wso2.carbon.governance.api.common.dataobjects.Governance
 ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
 at org.wso2.carbon.governance.api.common.dataobjects.Governance
 ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
 at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleS
 tatus(APIProviderImpl.java:3644)
 at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeC
 ycleStatus(UserAwareAPIProvider.java:148)
 at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServic
 eImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
 at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisChange
 LifecyclePost(ApisApi.java:91)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
 ssorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
 thodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca
 tion(AbstractInvoker.java:180)
 at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra
 ctInvoker.java:96)
 at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
 at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)

Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Susinda Perera
-Dorg.wso2.ignoreHostnameVerification=true
This property is already in the wso2server.sh file, I.e having this did not
helped me.

On Fri, Nov 4, 2016 at 2:11 PM, Bhathiya Jayasekara 
wrote:

> Hi Susinda,
>
> If you want to use IP instead of hostname, you have to create a cert for
> that IP. For CN validation, hostname and IP mapping is not used.
>
I don't want to use the IP. but I tried that as a workaround only, just
check if that works

>
> On a related note, using IPs for CN is not recommended in general.
>
> Thanks,
> Bhathiya
>
> On Fri, Nov 4, 2016 at 1:19 PM, Susinda Perera  wrote:
>
>> Got this fixed by using a new keystore where primary key's CN is set to
>> 127.0.0.1 and importing the public key of the same to client-truststore.jks.
>> But i believe this is not the proper fix, as wso2carbon.jks already have
>> the cert for localhost and we do not want to create another cert for
>> 127.0.0.1.
>> Any idea?
>> Similar issues found in
>> https://wso2.org/jira/browse/APIMANAGER-4205
>> https://wso2.org/jira/browse/APIMANAGER-4626
>>
>> Thanks
>> Susinda
>>
>> On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera  wrote:
>>
>>> Hi All
>>> I'm getting this[1] $subject. Have anyone faced the same, what was the
>>> resolution?
>>>
>>>
>>> ERROR - APIGatewayManager Error occurred when publish to gateway
>>> Production and Sandbox
>>> org.apache.axis2.AxisFault: Error while contacting the authentication
>>> admin services
>>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>>> ent.login(AbstractAPIGatewayAdminClient.java:92)
>>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>>> ent.setup(AbstractAPIGatewayAdminClient.java:50)
>>> at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.>> t>(APIGatewayAdminClient.java:37)
>>> at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGatew
>>> ay(APIGatewayManager.java:86)
>>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway
>>> (APIProviderImpl.java:1485)
>>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPISta
>>> tusChangeToGateways(APIProviderImpl.java:1294)
>>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateA
>>> PIStatusChangeToGateways(UserAwareAPIProvider.java:36)
>>> at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(AP
>>> IExecutor.java:136)
>>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>>> ltLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
>>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>>> ltLifeCycle.invoke(DefaultLifeCycle.java:450)
>>> at org.wso2.carbon.governance.registry.eventing.handlers.Govern
>>> anceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
>>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.i
>>> nvokeAspect(HandlerManager.java:2792)
>>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycle
>>> Manager.invokeAspect(HandlerLifecycleManager.java:518)
>>> at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAs
>>> pect(EmbeddedRegistry.java:2591)
>>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.in
>>> vokeAspect(CacheBackedRegistry.java:510)
>>> at org.wso2.carbon.registry.core.session.UserRegistry.invokeAsp
>>> ect(UserRegistry.java:1952)
>>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
>>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
>>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleS
>>> tatus(APIProviderImpl.java:3644)
>>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeC
>>> ycleStatus(UserAwareAPIProvider.java:148)
>>> at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServic
>>> eImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
>>> at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisChange
>>> LifecyclePost(ApisApi.java:91)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>> ssorImpl.java:62)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>> thodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:497)
>>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca
>>> tion(AbstractInvoker.java:180)
>>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra
>>> ctInvoker.java:96)
>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
>>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(S
>>> erviceInvokerInterceptor.java:59)
>>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleM
>>> essage(ServiceInvokerInterceptor.java:96)
>>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase
>>> 

Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Bhathiya Jayasekara
Hi Susinda,

If you want to use IP instead of hostname, you have to create a cert for
that IP. For CN validation, hostname and IP mapping is not used.

On a related note, using IPs for CN is not recommended in general.

Thanks,
Bhathiya

On Fri, Nov 4, 2016 at 1:19 PM, Susinda Perera  wrote:

> Got this fixed by using a new keystore where primary key's CN is set to
> 127.0.0.1 and importing the public key of the same to client-truststore.jks.
> But i believe this is not the proper fix, as wso2carbon.jks already have
> the cert for localhost and we do not want to create another cert for
> 127.0.0.1.
> Any idea?
> Similar issues found in
> https://wso2.org/jira/browse/APIMANAGER-4205
> https://wso2.org/jira/browse/APIMANAGER-4626
>
> Thanks
> Susinda
>
> On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera  wrote:
>
>> Hi All
>> I'm getting this[1] $subject. Have anyone faced the same, what was the
>> resolution?
>>
>>
>> ERROR - APIGatewayManager Error occurred when publish to gateway
>> Production and Sandbox
>> org.apache.axis2.AxisFault: Error while contacting the authentication
>> admin services
>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>> ent.login(AbstractAPIGatewayAdminClient.java:92)
>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>> ent.setup(AbstractAPIGatewayAdminClient.java:50)
>> at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.> t>(APIGatewayAdminClient.java:37)
>> at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGatew
>> ay(APIGatewayManager.java:86)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway
>> (APIProviderImpl.java:1485)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPISta
>> tusChangeToGateways(APIProviderImpl.java:1294)
>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateA
>> PIStatusChangeToGateways(UserAwareAPIProvider.java:36)
>> at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(AP
>> IExecutor.java:136)
>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>> ltLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>> ltLifeCycle.invoke(DefaultLifeCycle.java:450)
>> at org.wso2.carbon.governance.registry.eventing.handlers.Govern
>> anceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.i
>> nvokeAspect(HandlerManager.java:2792)
>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycle
>> Manager.invokeAspect(HandlerLifecycleManager.java:518)
>> at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAs
>> pect(EmbeddedRegistry.java:2591)
>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.in
>> vokeAspect(CacheBackedRegistry.java:510)
>> at org.wso2.carbon.registry.core.session.UserRegistry.invokeAsp
>> ect(UserRegistry.java:1952)
>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleS
>> tatus(APIProviderImpl.java:3644)
>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeC
>> ycleStatus(UserAwareAPIProvider.java:148)
>> at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServic
>> eImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
>> at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisChange
>> LifecyclePost(ApisApi.java:91)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca
>> tion(AbstractInvoker.java:180)
>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(
>> AbstractInvoker.java:96)
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(
>> ServiceInvokerInterceptor.java:59)
>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleM
>> essage(ServiceInvokerInterceptor.java:96)
>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase
>> InterceptorChain.java:308)
>> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(C
>> hainInitiationObserver.java:121)
>> at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke
>> (AbstractHTTPDestination.java:251)
>> at org.apache.cxf.transport.servlet.ServletController.invokeDes
>> tination(ServletController.java:234)
>> at org.apache.cxf.transport.servlet.ServletController.invoke(
>> 

Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Abimaran Kugathasan
Hi Susinda,

I guess, you are using API Manager 2.0. Hostname verification is mandatory
from carbon kernel 4.4.x onwards. In the latest version, they have agreed
to keep this in configuration level.

>From the exception trace, I guess, your operation uses http client to
communicate, in this case, you can use below property to suppress the
hostname verification.

-Dorg.wso2.ignoreHostnameVerification=true


On Fri, Nov 4, 2016 at 1:19 PM, Susinda Perera  wrote:

> Got this fixed by using a new keystore where primary key's CN is set to
> 127.0.0.1 and importing the public key of the same to client-truststore.jks.
> But i believe this is not the proper fix, as wso2carbon.jks already have
> the cert for localhost and we do not want to create another cert for
> 127.0.0.1.
> Any idea?
> Similar issues found in
> https://wso2.org/jira/browse/APIMANAGER-4205
> https://wso2.org/jira/browse/APIMANAGER-4626
>
> Thanks
> Susinda
>
> On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera  wrote:
>
>> Hi All
>> I'm getting this[1] $subject. Have anyone faced the same, what was the
>> resolution?
>>
>>
>> ERROR - APIGatewayManager Error occurred when publish to gateway
>> Production and Sandbox
>> org.apache.axis2.AxisFault: Error while contacting the authentication
>> admin services
>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>> ent.login(AbstractAPIGatewayAdminClient.java:92)
>> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminCli
>> ent.setup(AbstractAPIGatewayAdminClient.java:50)
>> at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.> t>(APIGatewayAdminClient.java:37)
>> at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGatew
>> ay(APIGatewayManager.java:86)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway
>> (APIProviderImpl.java:1485)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPISta
>> tusChangeToGateways(APIProviderImpl.java:1294)
>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateA
>> PIStatusChangeToGateways(UserAwareAPIProvider.java:36)
>> at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(AP
>> IExecutor.java:136)
>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>> ltLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
>> at org.wso2.carbon.governance.registry.extensions.aspects.Defau
>> ltLifeCycle.invoke(DefaultLifeCycle.java:450)
>> at org.wso2.carbon.governance.registry.eventing.handlers.Govern
>> anceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.i
>> nvokeAspect(HandlerManager.java:2792)
>> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycle
>> Manager.invokeAspect(HandlerLifecycleManager.java:518)
>> at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAs
>> pect(EmbeddedRegistry.java:2591)
>> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.in
>> vokeAspect(CacheBackedRegistry.java:510)
>> at org.wso2.carbon.registry.core.session.UserRegistry.invokeAsp
>> ect(UserRegistry.java:1952)
>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
>> at org.wso2.carbon.governance.api.common.dataobjects.Governance
>> ArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
>> at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleS
>> tatus(APIProviderImpl.java:3644)
>> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeC
>> ycleStatus(UserAwareAPIProvider.java:148)
>> at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServic
>> eImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
>> at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisChange
>> LifecyclePost(ApisApi.java:91)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca
>> tion(AbstractInvoker.java:180)
>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra
>> ctInvoker.java:96)
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(S
>> erviceInvokerInterceptor.java:59)
>> at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleM
>> essage(ServiceInvokerInterceptor.java:96)
>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase
>> InterceptorChain.java:308)
>> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(C
>> hainInitiationObserver.java:121)
>> at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke
>> (AbstractHTTPDestination.java:251)
>> at 

Re: [Dev] Error while publishing apis to gateway

2016-11-04 Thread Susinda Perera
Got this fixed by using a new keystore where primary key's CN is set to
127.0.0.1 and importing the public key of the same to client-truststore.jks.
But i believe this is not the proper fix, as wso2carbon.jks already have
the cert for localhost and we do not want to create another cert for
127.0.0.1.
Any idea?
Similar issues found in
https://wso2.org/jira/browse/APIMANAGER-4205
https://wso2.org/jira/browse/APIMANAGER-4626

Thanks
Susinda

On Fri, Nov 4, 2016 at 12:53 PM, Susinda Perera  wrote:

> Hi All
> I'm getting this[1] $subject. Have anyone faced the same, what was the
> resolution?
>
>
> ERROR - APIGatewayManager Error occurred when publish to gateway
> Production and Sandbox
> org.apache.axis2.AxisFault: Error while contacting the authentication
> admin services
> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminClient.login(
> AbstractAPIGatewayAdminClient.java:92)
> at org.wso2.carbon.apimgt.impl.utils.AbstractAPIGatewayAdminClient.setup(
> AbstractAPIGatewayAdminClient.java:50)
> at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.<
> init>(APIGatewayAdminClient.java:37)
> at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway(
> APIGatewayManager.java:86)
> at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway(
> APIProviderImpl.java:1485)
> at org.wso2.carbon.apimgt.impl.APIProviderImpl.
> propergateAPIStatusChangeToGateways(APIProviderImpl.java:1294)
> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.
> propergateAPIStatusChangeToGateways(UserAwareAPIProvider.java:36)
> at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(
> APIExecutor.java:136)
> at org.wso2.carbon.governance.registry.extensions.aspects.
> DefaultLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712)
> at org.wso2.carbon.governance.registry.extensions.aspects.
> DefaultLifeCycle.invoke(DefaultLifeCycle.java:450)
> at org.wso2.carbon.governance.registry.eventing.handlers.
> GovernanceEventingHandler.invokeAspect(GovernanceEventingHandler.java:338)
> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.
> invokeAspect(HandlerManager.java:2792)
> at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.
> invokeAspect(HandlerLifecycleManager.java:518)
> at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.
> invokeAspect(EmbeddedRegistry.java:2591)
> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(
> CacheBackedRegistry.java:510)
> at org.wso2.carbon.registry.core.session.UserRegistry.
> invokeAspect(UserRegistry.java:1952)
> at org.wso2.carbon.governance.api.common.dataobjects.
> GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829)
> at org.wso2.carbon.governance.api.common.dataobjects.
> GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808)
> at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus(
> APIProviderImpl.java:3644)
> at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus(
> UserAwareAPIProvider.java:148)
> at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServiceImpl.
> apisChangeLifecyclePost(ApisApiServiceImpl.java:252)
> at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.
> apisChangeLifecyclePost(ApisApi.java:91)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(
> AbstractInvoker.java:180)
> at org.apache.cxf.service.invoker.AbstractInvoker.
> invoke(AbstractInvoker.java:96)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.
> run(ServiceInvokerInterceptor.java:59)
> at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(
> ServiceInvokerInterceptor.java:96)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)
> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(
> ChainInitiationObserver.java:121)
> at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
> AbstractHTTPDestination.java:251)
> at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
> ServletController.java:234)
> at org.apache.cxf.transport.servlet.ServletController.
> invoke(ServletController.java:208)
> at org.apache.cxf.transport.servlet.ServletController.
> invoke(ServletController.java:160)
> at org.apache.cxf.transport.servlet.CXFNonSpringServlet.
> invoke(CXFNonSpringServlet.java:180)
> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(
> AbstractHTTPServlet.java:293)
> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.
> doPost(AbstractHTTPServlet.java:212)
> at