3

In WSO2 API Manager, I want to use an WSO2 ESB API to publish store management. I have change password in API manager in the API Manager and also changed <password> tag in /repository/conf/user-mgt.xml file.After changing password in API Manager (localhost:9443/carbon/), we are unable to publish API from WSO2 API publisher (localhost:9443/publisher/) to WSO2 Store (localhost:9443/store/).

We are facing issue mentioned below,

API Publisher - Error -

{"PUBLISHED" : "Production and Sandbox:Error while obtaining API information from gateway. Access Denied. Authentication failed - Invalid credentials provided." ,"UNPUBLISHED":""}||warning

Here is the api-manager.xml file,

<APIGateway>
    <!-- The environments to which an API will be published -->
    <Environments>
        <!-- Environments can be of different types. Allowed values are 'hybrid', 'production' and 'sandbox'.
             An API deployed on a 'production' type gateway will only support production keys
             An API deployed on a 'sandbox' type gateway will only support sandbox keys
             An API deployed on a 'hybrid' type gateway will support both production and sandbox keys. -->
        <!-- api-console element specifies whether the environment should be listed in API Console or not -->
        <Environment type="hybrid" api-console="true">
            <Name>Production and Sandbox</Name>
            <Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>
            <!-- Server URL of the API gateway -->
            <ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
            <!-- Admin username for the API gateway. -->
            <Username>${admin.username}</Username>
            <!-- Admin password for the API gateway.-->
            <Password>${admin.password}</Password>
            <!-- Endpoint URLs for the APIs hosted in this API gateway.-->
            <GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
        </Environment>
    </Environments>
</APIGateway>

I am newbie to WSO2 API Manager. How to change password for Super admin in WSO2 API Manager? how can I publish API into store after password change occurs?

Here is the wso2carbon.log file

TID: [-1234] [] [2018-05-11 15:38:16,677] ERROR {org.wso2.carbon.apimgt.impl.APIGatewayManager} -  Error occurred when publish to gateway Production and Sandbox {org.wso2.carbon.apimgt.impl.APIGatewayManager}
org.apache.axis2.AxisFault: Error while obtaining API information from gateway. Access Denied. Authentication failed - Invalid credentials provided.
    at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.getApi(APIGatewayAdminClient.java:149)
    at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway(APIGatewayManager.java:102)
    at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway(APIProviderImpl.java:1587)
    at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPIStatusChangeToGateways(APIProviderImpl.java:1391)
    at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateAPIStatusChangeToGateways(UserAwareAPIProvider.java:164)
    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:344)
    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:2607)
    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:4097)
    at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus(UserAwareAPIProvider.java:281)
    at sun.reflect.GeneratedMethodAccessor311.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
    at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
    at org.jaggeryjs.rhino.publisher.modules.api.c5._c_anonymous_1(/publisher/modules/api/life-cycles.jag:13)
    at org.jaggeryjs.rhino.publisher.modules.api.c5.call(/publisher/modules/api/life-cycles.jag)
    at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
    at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
    at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
    at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
    at org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_13(/publisher/modules/api/module.jag:47)
    at org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
    at org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0._c_anonymous_1(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag:64)
    at org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0.call(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag)
    at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
    at org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0._c_script_0(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag:5)
    at org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0.call(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
    at org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0.call(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag)
    at org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0.exec(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
    at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:124)
    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:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:80)
    at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:91)
    at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:60)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
    at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
    at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
    at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axis2.AxisFault: Access Denied. Authentication failed - Invalid credentials provided.
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:381)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:456)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.wso2.carbon.apimgt.gateway.stub.APIGatewayAdminStub.getApi(APIGatewayAdminStub.java:4878)
    at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.getApi(APIGatewayAdminClient.java:145)
    ... 90 more
Riyafa Abdul Hameed
  • 7,417
  • 6
  • 40
  • 55
VIVEK-MDU
  • 2,483
  • 3
  • 36
  • 63
  • 1
    If you change the password in `user-mgt.xml`, it should work. Is this a standalone pack? – Bee May 10 '18 at 16:37
  • @Bee... for your information, we are using Standalaone pack wso2am. – VIVEK-MDU May 11 '18 at 07:29
  • sorry, i don't understand what the issue is. what do you mena by `it's working in apim`? what do you mean by `publishing in store`? you can only publish APIs from `publisher`. – Bee May 11 '18 at 07:44
  • what I meant to say, Change password is working fine in WSO2 API Manager , Publisher and Store. but not publish APIs from publisher. It will create APIs in Publisher , but we couldn`t able to publish APIs from Publisher. – VIVEK-MDU May 11 '18 at 08:54
  • Can you post `` section of `api-manager.xml`? – Bee May 11 '18 at 08:58
  • @Bee... Here, i have modified my question with api-manager.xml file.Please review my api-manager.xml file. – VIVEK-MDU May 11 '18 at 09:28
  • 1
    It looks ok. Can you try hardcoding `` of ``? – Bee May 11 '18 at 09:45
  • Yes we tried to hardcoding just like "admin@123" but not working for us. @Bee.. – VIVEK-MDU May 11 '18 at 09:49
  • this is strange. can you post the complete error log which is printed in the console or wso2carbon.log? – Bee May 11 '18 at 09:50
  • @Bee..I have added `WSO2CARBON.LOG` file. Kindly review it and let me know your feedback. – VIVEK-MDU May 11 '18 at 10:16
  • Did you try hardcoding both new and old passwords? – Bee May 11 '18 at 10:18
  • Yeah! i tried both old password "admin" and new password "admin@123". when i change new password "admin@123", publish APIs is not working properly – VIVEK-MDU May 11 '18 at 10:36
  • @Bee do you have any idea for this? let me know your feedback.? – VIVEK-MDU May 14 '18 at 05:43
  • For some reason, the value is not picked. If you restart the server properly it should work. It's a bit hard to help you on this remotely at this point. – Bee May 14 '18 at 08:22
  • Once again, i tried to restart the server properly, its not working fine. Please give me any suggestion ? – VIVEK-MDU May 14 '18 at 13:52
  • If you can login with new credentials, that means the problem is with the `` config. Try to save in a different editor. – Bee May 14 '18 at 14:59

1 Answers1

3

we have solved this issue. Here, we have mention step for publish API after change password occurs,

  1. First of all, we need to change password in API Manager Tool. In API Manager portal, go to Users and Roles -> List -> Change Password and create your new password.
  2. And then, we need to add new password <AdminUser> tag in repository->conf->user-mgt.xml file.
  3. Finally, we need to kill/stop the wso2server.sh/wso2server.bat process file and re-start that file for executing API manager.

Regards,
Vivek KT.

VIVEK-MDU
  • 2,483
  • 3
  • 36
  • 63