I see log message created every 0.05 seconds.
To: /, MessageID: urn:uuid:33b0aab6-49a7-4646-bb49-883f202ff09b,
Direction: request, Envelope:
<?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body/>
</soapenv:Envelope>
when I click on more I dont see any more info
Type Date Log Message
2017-06-21 08:11:34,483 To: /, MessageID: urn:uuid:33b0aab6-49a7-4646-bb49-883f202ff09b, Direction: request,
Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body/></soapenv:Envelope> More
TID[-1234] [ESB] [2017-06-21 08:11:34,483] INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /, MessageID:
urn:uuid:33b0aab6-49a7-4646-bb49-883f202ff09b, Direction: request,
Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body/> </soapenv:Envelope>
I think that this is a ping message from WSO2. Is there a way to stop this?
It is over sizing my message logs..HELP
It sounds like your ESB receive a blank http request on / every 0.05s
When it receive a request on a non existing proxy service, default sequence "main" is executed (and it's behavior is to call log level="full")
Find who send this request to your ESB (monitoring probe ?)
Change default "main" sequence (remove log mediator)
Change defaut log4j.properties so that RollingFileAppender is used
It is generated by a log mediator included in your service:
https://docs.wso2.com/display/EI610/Log+Mediator
You can choose log level = "custom" to customize your log. See example 2 on the above page.
Related
I am using Wso2 EI 7.1.0, I implemented case like EI will get soap request that request will convert to json request then it will send to endpoint, from the endpoint EI will get json response that will convert to soap message again before responded to client. So here
Expected Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<message>
<response>success</response>
</message>
</soapenv:Body>
</soapenv:Envelope>
Getting Response:
<message>
<response>success</response>
</message>
Here soap tags are missing , So please update.
Thanks,
Ajay Babu Maguluri.
Most likely you are sending WSO2 a request with Content-Type application/xml (implying plain XML) So it will respond with a plain xml message without Soap envelope. In Postman try to set the content-type to text/xml.
This error message comes while uploading files
INFO - LogMediator To: /services/file, MessageID: urn:uuid:3fcb9ae1-bd3e-45d9-8ece-ac5658a51acb, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Error while building message, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><xformValues/></soapenv:Body></soapenv:Envelope>
I'm using wso2esb4.7.0. Wish to trace the logs at server side.for this i have created a simple service in which I have put log at inSequence,sequence1,sequence2 and outSequence.My output is look like :
[2015-02-18 11:08:10,937] INFO - LogMediator To: /services/LogDetection, MessageID: urn:uuid:cbd2c3df-f717-4a44-92e4-68ff12038d2a, Direction: request, partybranchid in INSEQUENCE OF MAIN PROXY = -1, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><partybranchid>-1</partybranchid></soapenv:Body></soapenv:Envelope>
[2015-02-18 11:08:10,947] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:a11ee439-65b0-4875-bb82-132267455fb2, Direction: response, Log in = SEQUENCE1, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns4:binary xmlns:axis2ns4="http://ws.apache.org/commons/ns/payload"></axis2ns4:binary></soapenv:Body></soapenv:Envelope>
[2015-02-18 11:08:10,955] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:ad3a016f-3e2c-49bf-bdb0-a40c7b91e25e, Direction: response, Log in = SEQUENCE2, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns5:binary xmlns:axis2ns5="http://ws.apache.org/commons/ns/payload"></axis2ns5:binary></soapenv:Body></soapenv:Envelope>
[2015-02-18 11:08:10,963] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:7a7b7f2d-3713-440d-b95c-583901848ec0, Direction: response, partybranchid in OUTSEQUENCE OF MAIN PROXY = -1, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns6:binary xmlns:axis2ns6="http://ws.apache.org/commons/ns/payload"></axis2ns6:binary></soapenv:Body></soapenv:Envelope>
Above log shows me that my pointer started moving from inSequence to seq1 to seq2 to outSequence. Each log having it's unique MessageID but it seems different for each log in same service too. If i wish to trace logs then MessageID is best option as it is unique parameter. But if it is different then how can i trace it?
I created proxy services using wso2dss for data insertion, so services working fine I am quite happy with this. But while any data duplication errors occurred in wso2dss I need to handle it in wso2esb so I kept this property in wso2esb for dss level error handle:
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
So its working fine I am getting 50000 code using this I am able to handle error while this error my esb showing this message:
[2014-03-07 11:22:40,778] INFO - LogMediator To: /services/GeoLocationInsertion, MessageID: urn:uuid:b51629e2-934e-4227-8f50-65fd9f719b8e, Direction: request, userid = -1212807836, username = sa|214057357158656, password = sa
[2014-03-07 11:22:40,783] INFO - LogMediator To: /services/ServiceLogin, MessageID: urn:uuid:1967bde1-d820-46f9-957d-55fbb6f7ea9e, Direction: request, usercode = sa, clientid = 214057357158656
[2014-03-07 11:22:40,833] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:24aea5ed-f4e2-4214-809b-b3101031edf7, Direction: response, faisal = true
[2014-03-07 11:22:40,838] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:42a17360-cd04-43bc-83ef-1f53b639de11, Direction: response, kk = true
[2014-03-07 11:22:40,853] WARN - EndpointContext Endpoint : endpoint_71f1485e740c2b97ec407fe4d3bf86929122480f208b6642 will be marked SUSPENDED as it failed
[2014-03-07 11:22:40,853] WARN - EndpointContext Suspending endpoint : endpoint_71f1485e740c2b97ec407fe4d3bf86929122480f208b6642 - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Fri Mar 07 11:23:10 IST 2014
[2014-03-07 11:22:40,856] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:42a17360-cd04-43bc-83ef-1f53b639de11, Direction: response, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 500000, ERROR_MESSAGE = null
[2014-03-07 11:22:40,857] INFO - LogMediator To: , WSAction: , SOAPAction: , MessageID: urn:uuid:42a17360-cd04-43bc-83ef-1f53b639de11, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ResponseJSON><Body><Data><Exception>duplicate key value violates or The system is attempting to access an inactive service </Exception></Data></Body><Status>500000</Status></ResponseJSON></soapenv:Body></soapenv:Envelope>
Above error message means my endpoint gone into suspend mode after 30sec it will automatically in active mode.
If any user tries on the same time he is unable to insert his correct data and he is losing the data due to endpoint nonavailability. So how we can keep endpoint in active mode?
If any other error will come this issue is not raising:
[2014-03-07 11:22:40,853] WARN - EndpointContext Suspending endpoint : endpoint_71f1485e740c2b97ec407fe4d3bf86929122480f208b6642 - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Fri Mar 07 11:23:10 IST 2014
So how would I do this?
If I remove the property I am unable to handle DSS level message and I am getting error like this even my user not getting any response:
[2014-03-07 11:20:51,816] ERROR - NativeWorkerPool Uncaught exception
java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to org.apache.axiom.soap.SOAPFault
at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.getFault(SOAPBodyImpl.java:120)
at org.apache.synapse.util.POXUtils.convertSOAPFaultToPOX(POXUtils.java:46)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:91)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:308)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:92)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:232)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
So that 30sec are so important, it causes my client's data loss. How could I avoid this endpoint failure?
The actual error in wso2dss is:
Nested Exception:-
org.postgresql.util.PSQLException: ERROR: column "deviceid" is of type bigint but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 81
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:105)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.getReader(DSOMDataSource.java:116)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:225)
... 41 more
I handle it in wso2esb fault and working fine also but endpoint failure is uncatchble
If you want to configure your DSS endpoint's suspension behavior in the ESB, please refer to the Endpoint Error Handling documentation.
If you drop the FORCE_ERROR_ON_SOAP_FAULT property, you should still be able to handle a soap fault from your DSS response in the out sequence of an ESB proxy.
yo can disable that config with this configuration in your endpoint:
<?xml version="1.0"?>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
I came up with this error myself and it was terrible to identify it and find a way to work with it. It seems there is a bug in older versions of WSO2 ESB (we have this problem with version 4.8.1) when dealing with a returned soap fault.
You can see the answer of #JorgeInfanteOsorio to disable the endpoint suspension, but you will need an workaround for the "Uncaught exception" issue. What I found is that it is possible to retrieve the parameters from the fault message and then "clear" the current payload, so any subsequent calls wont return the exception issue.
Example:
<!--
After we call a webservice on DSS or other webservice we check if the message contains a fault message
-->
<property xmlns:s="http://www.w3.org/2003/05/soap-envelope"
name="return_fault"
expression="/s:Envelope/s:Body/s:Fault"/>
<filter source="boolean(get-property('return_payzen_fault'))" regex="true">
<then>
<!--
There is a fault message on the payload...
-->
<!--
Retrieve the information from the fault message. How you will access it and which information you will retrieve may be different depending if the answer comes from a third part webservice or from your own DSS.
-->
<property xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" name="code" expression="/s:Envelope/s:Body/s:Fault/s:Code/s:faultcode"/>
<property xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" name="code" expression="/s:Envelope/s:Body/s:Fault/s:Code/s:faultstring"/>
<!--
Clear the payload containing the fault message
-->
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body/>
</soapenv:Envelope>
</format>
<args/>
</payloadFactory>
<!--
Now you can proceed and process the message as usual without getting the exception. You may probably use the parameters stored in the properties at the beginning to determine which error occured and what you are going to do next.
-->
</then>
</filter>
<!--
There is no fault message, you can proceed with the message processing here.
-->
Im trying out the Banking sample provided by WSO2 and when i do all the steps i see this error:
[2012-06-27 21:32:21,404] INFO - LogMediator To: http://shivaji:8283/services/AccountServiceProxy,WSAction: urn:createAccount,SOAPAction: urn:createAccount,ReplyTo: http://www.w3.org/2005/08/addressing/anonymous,MessageID: urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846,Direction: request,debug = accountProxy,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://shivaji:8283/services/AccountServiceProxy</wsa:To><wsa:MessageID>urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846</wsa:MessageID><wsa:Action>urn:createAccount</wsa:Action></soapenv:Header><soapenv:Body><createAccount xmlns="http://hcc.wso2">
<hcc:customerId xmlns:hcc="http://hcc.wso2">9_Duggi</hcc:customerId>
<hcc:isNewCustomer xmlns:hcc="http://hcc.wso2">0</hcc:isNewCustomer>
<hcc:accountType xmlns:hcc="http://hcc.wso2">CURRENT</hcc:accountType>
</createAccount></soapenv:Body></soapenv:Envelope>
[2012-06-27 21:32:21,428] INFO - TimeoutHandler This engine will expire all callbacks after : 86400 seconds, irrespective of the timeout action, after the specified or optional timeout
[2012-06-27 21:32:51,669] WARN - JMSSender Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:shivaji-51236-1340812606914-5:1:1 with JMS correlation ID : ID:shivaji-51236-1340812606914-5:1:1:1:1
[2012-06-27 21:33:21,309] INFO - LogMediator To: http://shivaji:8283/services/AccountServiceProxy,WSAction: urn:createAccount,SOAPAction: urn:createAccount,ReplyTo: http://www.w3.org/2005/08/addressing/anonymous,MessageID: urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846,Direction: request,debug = accountProxy,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://shivaji:8283/services/AccountServiceProxy</wsa:To><wsa:MessageID>urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846</wsa:MessageID><wsa:Action>urn:createAccount</wsa:Action></soapenv:Header><soapenv:Body><createAccount xmlns="http://hcc.wso2">
<hcc:customerId xmlns:hcc="http://hcc.wso2">9_Duggi</hcc:customerId>
<hcc:isNewCustomer xmlns:hcc="http://hcc.wso2">0</hcc:isNewCustomer>
<hcc:accountType xmlns:hcc="http://hcc.wso2">CURRENT</hcc:accountType>
</createAccount></soapenv:Body></soapenv:Envelope>
[2012-06-27 21:33:51,364] WARN - JMSSender Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:shivaji-51236-1340812606914-7:1:1 with JMS correlation ID : ID:shivaji-51236-1340812606914-7:1:1:1:1
[2012-06-27 21:34:21,319] INFO - LogMediator To: http://shivaji:8283/services/AccountServiceProxy,WSAction: urn:createAccount,SOAPAction: urn:createAccount,ReplyTo: http://www.w3.org/2005/08/addressing/anonymous,MessageID: urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846,Direction: request,debug = accountProxy,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://shivaji:8283/services/AccountServiceProxy</wsa:To><wsa:MessageID>urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846</wsa:MessageID><wsa:Action>urn:createAccount</wsa:Action></soapenv:Header><soapenv:Body><createAccount xmlns="http://hcc.wso2">
<hcc:customerId xmlns:hcc="http://hcc.wso2">9_Duggi</hcc:customerId>
<hcc:isNewCustomer xmlns:hcc="http://hcc.wso2">0</hcc:isNewCustomer>
<hcc:accountType xmlns:hcc="http://hcc.wso2">CURRENT</hcc:accountType>
</createAccount></soapenv:Body></soapenv:Envelope>
[2012-06-27 21:34:51,392] WARN - JMSSender Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:shivaji-51236-1340812606914-9:1:1 with JMS correlation ID : ID:shivaji-51236-1340812606914-9:1:1:1:1
[2012-06-27 21:35:21,324] INFO - LogMediator To: http://shivaji:8283/services/AccountServiceProxy,WSAction: urn:createAccount,SOAPAction: urn:createAccount,ReplyTo: http://www.w3.org/2005/08/addressing/anonymous,MessageID: urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846,Direction: request,debug = accountProxy,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>http://shivaji:8283/services/AccountServiceProxy</wsa:To><wsa:MessageID>urn:uuid:b909e8e6-70f3-426a-8ba8-637120762846</wsa:MessageID><wsa:Action>urn:createAccount</wsa:Action></soapenv:Header><soapenv:Body><createAccount xmlns="http://hcc.wso2">
<hcc:customerId xmlns:hcc="http://hcc.wso2">9_Duggi</hcc:customerId>
<hcc:isNewCustomer xmlns:hcc="http://hcc.wso2">0</hcc:isNewCustomer>
<hcc:accountType xmlns:hcc="http://hcc.wso2">CURRENT</hcc:accountType>
</createAccount></soapenv:Body></soapenv:Envelope>
[2012-06-27 21:35:51,405] WARN - JMSSender Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:shivaji-51236-1340812606914-11:1:1 with JMS correlation ID : ID:shivaji-51236-1340812606914-11:1:1:1:1
[2012-06-27 21:36:58,781] INFO - LogMediator To: /services/AccountServiceProxy,MessageID: urn:uuid:22be82b6-b160-4221-a421-34366240b8ac,Direction: request,debug = accountProxy,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body /></soapenv:Envelope>
[2012-06-27 21:37:28,825] WARN - JMSSender Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:shivaji-51236-1340812606914-13:1:1 with JMS correlation ID : ID:shivaji-51236-1340812606914-13:1:1:1:1
Can any on please help
This seems to be an issue in endpoints or WSDL ports.
You need to do the following to get this sorted out.
After you deploy the MainFrameMojoService with JMS transport enabled in the App Server, get the JMS endpoint from the Management console and set that service URL to the MainFrameEP endpoint.
Recheck all the WSDL files of the samples and check the port sections of each and every WSDL and make sure to correct the Service URLs there.
If you want more information, please have a look at the Developer Studio Webinar.
You can find the webinar source code from here.
Hope this helps!
Thanks and Regards,
Harshana