As mentioned in document here https://docs.wso2.com/display/AM210/Configuring+APIM+Analytics#StandardSetup
When email username is enabled in WSO2 APIM then must be [email protected]@carbon.super. Also same username is kept in user-mgmt.xml under in WSO2 APIM. Well this set up is breaking and I am not able to see analytics from WSO2 APIM publisher. Does anyone knows what's wrong with analytics when email username is enabled? Below is log from both WSO2 APIM and Analytics. Please note in below log I have truncated some lines of logs since they were so may lines and was creating problem while posting but main error line is shown properly.
WSO2 APIM log:
TID: [-1] [] [2019-01-02 12:55:31,408] ERROR {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker} - Error while trying to connect to the endpoint. Cannot borrow client for ssl://das.wso2-test:7712. {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker}
org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Cannot borrow client for ssl://das.wso2-test:7712.
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:131)
Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Error while trying to login to the data receiver.
at org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint.login(ThriftDataEndpoint.java:54)
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:125)
... 6 more
Caused by: org.apache.thrift.transport.TTransportException
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
Analytics log:
TID: [-1234] [] [2019-01-02 11:55:33,464] INFO {org.wso2.carbon.databridge.core.DataBridge} - user [email protected]@carbon.super connected {org.wso2.carbon.databridge.core.DataBridge}
TID: [-1234] [] [2019-01-02 11:55:33,464] ERROR {org.wso2.carbon.identity.authentication.AuthenticationServiceImpl} - Invalid User : [email protected] {org.wso2.carbon.identity.authentication.AuthenticationServiceImpl}
TID: [-1234] [] [2019-01-02 11:55:33,464] ERROR {org.apache.thrift.server.TThreadPoolServer} - Thrift error occurred during processing of message. {org.apache.thrift.server.TThreadPoolServer}
org.apache.thrift.protocol.TProtocolException: Required field 'message' was not present! Struct: ThriftAuthenticationException(message:null)
TID: [-1234] [] [2019-01-02 11:55:33,465] WARN {org.apache.thrift.transport.TIOStreamTransport} - Error closing output stream. {org.apache.thrift.transport.TIOStreamTransport}
java.net.SocketException: Socket is closed
I tried all possible approach mentioned in documents but still analytics is not working when email username. Is this already existing issue in WSO2 APIM 2.1.0? I'm asking because I found exact same issue open in github https://github.com/wso2/analytics-apim/issues/583
api-manager.xml:
<ThrottlingConfigurations>
<EnableAdvanceThrottling>true</EnableAdvanceThrottling>
<DataPublisher>
<Username>[email protected]@carbon.super</Username>
<Analytics>
<DASUsername>[email protected]@carbon.super</DASUsername>
<DASPassword>${admin.password}</DASPassword>
usr-.xml:
<UserName>[email protected]@carbon.super</UserName>
<Password>admin</Password>
carbml:
<EnableEmailUserName>true</EnableEmailUserName>
Also changes jndi.properties:
connectionfactory.TopicConnectionFactory = amqp://admin!wso2.com!carbon.super:admin@clientid/carbon?brokerlist='tcp://${xxx.trafficManager.host}:${xxx.trafficManager.jms.port}'
connectionfactory.QueueConnectionFactory = amqp://admin!wso2.com!carbon.super:admin@clientID/test?brokerlist='tcp://${xxx.trafficManager.host}:${xxx.trafficManager.jms.port}'
Analytics should work even after enabling email username.