2

I have a simple setup of WSO2 APIM with MYSQL and have published APIs using the admin user.

On changing the default admin password for API manager I am able to login using the new password on Publisher/Store but not use the published apis.

Have followed the WSO2 documentation on changing the password. Restarted the WSO2 APIM

On calling the published API, I see the following response:

{"fault":{"code":900900,"message":"Unclassified Authentication Failure","description":"Error while accessing backend services for API key validation"}}

Below is the stacktrace of the error observed in wso2-apigw-errors.log:

org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Cannot borrow client for ssl://10.93.16.127:9711.
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:134)
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:59)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Error while trying to login to data receiver :/10.93.16.127:9711
    at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint.login(BinaryDataEndpoint.java:50)
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:128)
    ... 6 more
Caused by: org.wso2.carbon.databridge.commons.exception.AuthenticationException: wrong userName or password
    at sun.reflect.GeneratedConstructorAccessor194.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryEventSender.processResponse(BinaryEventSender.java:163)
    at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint.login(BinaryDataEndpoint.java:44)
    ... 7 more

This error goes away as soon as I change the password back to the default "admin".

Amrut
  • 37
  • 6

1 Answers1

1

Please check if you have correct password here.

<ThrottlingConfigurations>
    <EnableAdvanceThrottling>true</EnableAdvanceThrottling>
    <TrafficManager>
        <Type>Binary</Type>
        <ReceiverUrlGroup>tcp://${carbon.local.ip}:${receiver.url.port}</ReceiverUrlGroup>
        <AuthUrlGroup>ssl://${carbon.local.ip}:${auth.url.port}</AuthUrlGroup>
        <Username>admin</Username>
        <Password>admin</Password>
    </TrafficManager>
Bee
  • 12,251
  • 11
  • 46
  • 73
  • Its set to ```${admin.password}```. Also the password was updated through Carbon UI and persistence is MYSQL, wont the password change be automatically be picked up from MYSQL? – Amrut May 30 '19 at 16:44
  • Did you configure the user-mgt.xml in traffic manager? If not, try hard coding admin/admin here. – Bee May 31 '19 at 03:47
  • Have not updated user-mgt.xml, it still contains default. Also as per the documentation: "_Note that the password in the user-mgt.xml file is written to the primary user store when the server starts for the first time. Thereafter, the password will be validated from the primary user store and not from the user-mgt.xml file. Therefore, if you need to change the admin password stored in the user store, you cannot simply change the value in the user-mgt.xml file. To change the super admin password, you must use the Change Password option from the management console._". – Amrut May 31 '19 at 04:26
  • Sorry for not being clear. What I asked was did you configure a userstore in the traffic manager? If not, do as I said above. – Bee May 31 '19 at 04:43