0
votes

I'm working on WSO2 Carbon MessageBox(SQS) in order to subscribe a queue and then read the messages from messagebox for batch processing.

There are some useful tutorials like :

http://wso2.org/project/message-broker/1.0.2/docs/samples/messagebox_as_event_sink.html

And they are working successfully when trying to connect to a MessageBox on the local WSO2 ESB instance.

However it is failing when receiving messages from the MessageBox with same configuration on a remote WSO2 instance.

These are the log messages on WSO2 ESB.

Authentication looks ok (second log message) but, "ReceiveMessage" request is failing in AuthenticationHandler.

TID: [] [WSO2 ESB] [2012-07-12 09:49:19,597] ERROR {org.apache.axis2.engine.AxisEngine} - Failed to get secret id of user

41ca9541e96a077766d2 {org.apache.axis2.engine.AxisEngine}org.apache.axis2.AxisFault: Failed to get secret id of user 41ca9541e96a077766d2 at org.wso2.carbon.messagebox.sqs.internal.module.AuthenticationHandler.invoke(AuthenticationHandler.java:80) at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340) at org.apache.axis2.engine.Phase.invoke(Phase.java:313) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154) at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)

 TID: [] [WSO2 ESB] [2012-07-12 09:49:19,401] INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -

'admin' logged in at [2012-07-12 09:49:19,0401] from IP address {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil

Am I doing something wrong or need to do some specific configuration?

1

1 Answers

0
votes

if your message box in a remote machine then your http request should have the authentication header as specified by the SQS specification. This seems like you have not send a valid request with a user name and secret id. And also sqs:// will only work in local environments.