Re: [Dev] API Manager - periodic failure of OAuth2Service for AccessTokens via the publisher API

2016-11-07 Thread Vanjikumaran Sivajothy
@malintha,

I also facing this in the KM nodes on the distributed deployment.

On Mon, Sep 19, 2016 at 4:25 AM, Malintha Amarasinghe 
wrote:

> Hi,
>
> Can you please share the exact API calls you used to reproduce the issue?
>
> Thanks!
>
> On Mon, Sep 19, 2016 at 4:40 PM, Alan Tucker Spida Solutions <
> a...@spidasolutions.com> wrote:
>
>> We are periodically seeing failures when trying to request Access Tokens
>> via the APIM publisher API. An instance of APIM will perform correctly
>> returning AccessTokens for a time. Occasionally, after restart it will fail
>> when requesting access tokens via the publisher API. After subsequent
>> restarts the same instance may or may not then return to operating
>> correctly. The test scenario in all cases is the same.
>>
>> Note that if the user (that is being used to request an access token)
>> logs into the API store of the APIM instance, subsequent requests via the
>> Publisher API will then succeed. This appears to be reproducible.
>>
>> On failure the typical stack trace below is seen:
>>
>> [2016-09-19 09:52:31,163]  INFO - TokenMgtDAO Thread pool size for
>> session persistent consumer : 100
>> [2016-09-19 09:52:31,262]  INFO - OAuthServerConfiguration The default
>> OAuth token issuer will be used. No custom token generator is set.
>> [2016-09-19 09:52:31,263]  INFO - OAuthServerConfiguration The default
>> Identity OAuth token issuer will be used. No custom token generator is set.
>> [2016-09-19 09:52:33,516]  WARN - AccessConfiguration Error loading
>> properties from file: access-log.properties
>> [2016-09-19 09:52:33,594]  INFO - TimeoutHandler This engine will expire
>> all callbacks after : 120 seconds, irrespective of the timeout action,
>> after the specified or optional timeout
>> [2016-09-19 09:52:33,798] ERROR - OAuth2Service Error occurred while
>> issuing the access token for Client ID : ***, User ID
>> , Scope : [apim:api_create] and Grant Type : password
>> java.lang.NullPointerException
>> at org.wso2.carbon.apimgt.impl.utils.APIUtil.getRESTAPIScopesFr
>> omConfig(APIUtil.java:5130)
>> at org.wso2.carbon.apimgt.keymgt.ScopesIssuer.setScopes(ScopesI
>> ssuer.java:100)
>> at org.wso2.carbon.apimgt.keymgt.handlers.ExtendedPasswordGrant
>> Handler.validateScope(ExtendedPasswordGrantHandler.java:168)
>> at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.
>> issue(AccessTokenIssuer.java:226)
>> at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessTok
>> en(OAuth2Service.java:219)
>> at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd
>> point.getAccessToken(OAuth2TokenEndpoint.java:246)
>> at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEnd
>> point.issueAccessToken(OAuth2TokenEndpoint.java:110)
>>
>>
>>
>>
>> [image: Spida Solutions] 
>> *Alan Tucker *
>> *Spida Solutions *
>> London • Bath • UK
>> +44 (0)78 0308 4376 <+44-780-308-4376>
>> +44 (0)12 4981 5081 <+44-12-4981-5081>
>> www.spidasolutions.com 
>>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Malintha Amarasinghe
> Software Engineer
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vanjikumaran Sivajothy
*Associate Technical Lead*
*WSO2 Inc. http://wso2.com *
 *+1-925-464-6816*
[image: Facebook]  [image: Twitter]
 [image: LinkedIn]
 [image:
Blogger]  [image: SlideShare]


This communication may contain privileged or other confidential information
and is intended exclusively for the addressee/s. If you are not the
intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print,
copy, re-transmit, disseminate, or otherwise use the information contained
in this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - periodic failure of OAuth2Service for AccessTokens via the publisher API

2016-09-19 Thread Malintha Amarasinghe
Hi,

Can you please share the exact API calls you used to reproduce the issue?

Thanks!

On Mon, Sep 19, 2016 at 4:40 PM, Alan Tucker Spida Solutions <
a...@spidasolutions.com> wrote:

> We are periodically seeing failures when trying to request Access Tokens
> via the APIM publisher API. An instance of APIM will perform correctly
> returning AccessTokens for a time. Occasionally, after restart it will fail
> when requesting access tokens via the publisher API. After subsequent
> restarts the same instance may or may not then return to operating
> correctly. The test scenario in all cases is the same.
>
> Note that if the user (that is being used to request an access token) logs
> into the API store of the APIM instance, subsequent requests via the
> Publisher API will then succeed. This appears to be reproducible.
>
> On failure the typical stack trace below is seen:
>
> [2016-09-19 09:52:31,163]  INFO - TokenMgtDAO Thread pool size for session
> persistent consumer : 100
> [2016-09-19 09:52:31,262]  INFO - OAuthServerConfiguration The default
> OAuth token issuer will be used. No custom token generator is set.
> [2016-09-19 09:52:31,263]  INFO - OAuthServerConfiguration The default
> Identity OAuth token issuer will be used. No custom token generator is set.
> [2016-09-19 09:52:33,516]  WARN - AccessConfiguration Error loading
> properties from file: access-log.properties
> [2016-09-19 09:52:33,594]  INFO - TimeoutHandler This engine will expire
> all callbacks after : 120 seconds, irrespective of the timeout action,
> after the specified or optional timeout
> [2016-09-19 09:52:33,798] ERROR - OAuth2Service Error occurred while
> issuing the access token for Client ID : ***, User ID
> , Scope : [apim:api_create] and Grant Type : password
> java.lang.NullPointerException
> at org.wso2.carbon.apimgt.impl.utils.APIUtil.getRESTAPIScopesFromConfig(
> APIUtil.java:5130)
> at org.wso2.carbon.apimgt.keymgt.ScopesIssuer.setScopes(
> ScopesIssuer.java:100)
> at org.wso2.carbon.apimgt.keymgt.handlers.ExtendedPasswordGrantHandler.
> validateScope(ExtendedPasswordGrantHandler.java:168)
> at org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issue(
> AccessTokenIssuer.java:226)
> at org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(
> OAuth2Service.java:219)
> at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.
> getAccessToken(OAuth2TokenEndpoint.java:246)
> at org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.
> issueAccessToken(OAuth2TokenEndpoint.java:110)
>
>
>
>
> [image: Spida Solutions] 
> *Alan Tucker *
> *Spida Solutions *
> London • Bath • UK
> +44 (0)78 0308 4376 <+44-780-308-4376>
> +44 (0)12 4981 5081 <+44-12-4981-5081>
> www.spidasolutions.com 
>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Malintha Amarasinghe
Software Engineer
*WSO2, Inc. - lean | enterprise | middleware*
http://wso2.com/

Mobile : +94 712383306
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] API Manager - periodic failure of OAuth2Service for AccessTokens via the publisher API

2016-09-19 Thread Alan Tucker Spida Solutions
We are periodically seeing failures when trying to request Access Tokens via 
the APIM publisher API. An instance of APIM will perform correctly returning 
AccessTokens for a time. Occasionally, after restart it will fail when 
requesting access tokens via the publisher API. After subsequent restarts the 
same instance may or may not then return to operating correctly. The test 
scenario in all cases is the same.

Note that if the user (that is being used to request an access token) logs into 
the API store of the APIM instance, subsequent requests via the Publisher API 
will then succeed. This appears to be reproducible.

On failure the typical stack trace below is seen:

[2016-09-19 09:52:31,163]  INFO - TokenMgtDAO Thread pool size for session 
persistent consumer : 100
[2016-09-19 09:52:31,262]  INFO - OAuthServerConfiguration The default OAuth 
token issuer will be used. No custom token generator is set.
[2016-09-19 09:52:31,263]  INFO - OAuthServerConfiguration The default Identity 
OAuth token issuer will be used. No custom token generator is set.
[2016-09-19 09:52:33,516]  WARN - AccessConfiguration Error loading properties 
from file: access-log.properties
[2016-09-19 09:52:33,594]  INFO - TimeoutHandler This engine will expire all 
callbacks after : 120 seconds, irrespective of the timeout action, after the 
specified or optional timeout
[2016-09-19 09:52:33,798] ERROR - OAuth2Service Error occurred while issuing 
the access token for Client ID : ***, User ID 
, Scope : [apim:api_create] and Grant Type : password
java.lang.NullPointerException
at 
org.wso2.carbon.apimgt.impl.utils.APIUtil.getRESTAPIScopesFromConfig(APIUtil.java:5130)
at 
org.wso2.carbon.apimgt.keymgt.ScopesIssuer.setScopes(ScopesIssuer.java:100)
at 
org.wso2.carbon.apimgt.keymgt.handlers.ExtendedPasswordGrantHandler.validateScope(ExtendedPasswordGrantHandler.java:168)
at 
org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer.issue(AccessTokenIssuer.java:226)
at 
org.wso2.carbon.identity.oauth2.OAuth2Service.issueAccessToken(OAuth2Service.java:219)
at 
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.getAccessToken(OAuth2TokenEndpoint.java:246)
at 
org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint.issueAccessToken(OAuth2TokenEndpoint.java:110)




    

Alan Tucker 
Spida Solutions 
London • Bath • UK
+44 (0)78 0308 4376 
+44 (0)12 4981 5081 
www.spidasolutions.com 

 

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev