Graylog2 not showing any messages in specific stream - regex

In our Symfony2 application we query an external API for a certain service we provide. This API (let's call it Acme API) sometimes throws error messages that we forward to Graylog2 via Monolog and Gelf to keep track of outages. Every error is logged on error level with $logger->err().
The messages are shown in the normal message pool, but the custom stream that collects these API error messages isn't showing any message at all.
So my main question is: Why is Graylog refusing to show messages in the stream and what can we do to change that behaviour?
Configurations
There is a total of 35 streams at the moment (This because we have a bunch of applications on our servers).
Every message that is given to Monolog has the same pattern:
Acme API Error on "{user action}": {error description}. Additional information: "{more information provided from the API}" on server "{web server name}" and domain "{domain}" for user "{session ID}"
The Graylog stream rules are as follows:
Host (regex): ^((?!mycompany-staging).)*$ // Needed to show only logs from the live servers
Facility: app
Full Message (regex): Acme API.*
(We've also tried to set the Full Message regex to .*Acme API.* and Acme API Error.*, but none of these worked)
The monolog configuration is as follows:
// config_prod.yml
// ...
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
level: debug
nested:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
graylog:
type: gelf
level: warning
publisher:
hostname: mycompany-monitoring.mycompany.ch
// ...

Seemed to be a problem with Graylog2 itself, the stream started working normally after updating Graylog to the newest version and recreating the stream.

Related

MessagingException: Error encountered while executing mapping - Where to see response message?

I'm running an SAP PI/PO scenario and having a problem with finding the response message (the error one).
Scenario:
PROXY (class) -> SAP PI/PO 7.5 -> SOAP (wsdl)
The error when executing the scenario is:
Transmitting the message using connection
SOAP_http://sap.com/xi/XI/System failed, due to:
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
Error encountered while executing mapping:
com.sap.aii.af.service.mapping.MappingException:
com.sap.aii.utilxi.misc.api.ResourceException: Could not determine
mapping steps for message 3b14b3f8-0860-11ed-a034-000001795062
The problem is that I cannot find the message (3b14b3f8-0860-11ed-a034-000001795062) in SAP PI monitor. It's the response message (who is causing the error), as the request message I did find in the monitor and it's correct.
Where I can find it? Why is not showing?
From what I read, this problem happens with several reasons, I just want to find this message.
The webservice works correctly, I test it in SOAP UI.
To find the response message (which contains the error), we have to first activate the Integrated Configuration log (it's not active by default).
To activate the log, we have to follow these steps (more info: https://blogs.sap.com/2012/11/06/message-staging-and-logging-options-in-advanced-adapter-engine-of-pi-73x/)
Go to "Advanced Settings" in the target Integrated Configuration.
Change the "Use global configuration" radio button to "Use scenario-specific configuration" in both, "Staging" and "Loging".
Change all "Staging" lists to "Store".
Change all "Logging" lists to "Log".
Save and activate.
Now, in the SAP PO monitor (Message monitor), by clicking the "Related Messages" option, we can see the response message error.
In this case, the error was:
<sap:Error xmlns:sap='http://sap.com/xi/XI/Message/30'
SOAP:mustUnderstand='1'>sap:CategoryXIAdapter</sap:Category><sap:Code
area='SOAP'>FAULT</sap:Code>sap:P1http://schemas.microsoft.com/ws/2005/05/addressing/none</sap:P1>sap:P2ActionNotSupported</sap:P2>sap:AdditionalTextThe
message with Action '' cannot be processed at the receiver, due to a
ContractFilter mismatch at the EndpointDispatcher. This may be because
of either a contract mismatch (mismatched Actions between sender and
receiver) or a binding/security mismatch between the sender and the
receiver. Check that sender and receiver have the same contract and
the same binding (including security requirements, e.g. Message,
Transport, None).</sap:AdditionalText><sap:ApplicationFaultMessage
namespace='http://schemas.microsoft.com/ws/2005/05/addressing/none'>ActionNotSupported</sap:ApplicationFaultMessage></sap:Error>
In which the Action was empty.

Multipart file upload failing some times on docker container on AWS

I have an hapi server running on AWS docker container and it exposes a file upload API. This API runs smoothly on my local machine, but when deployed to AWS it fails some times with an error "Incomplete multipart payload". The error does not occur always, but only at some times.
The images which I am uploading are small in size(less than 100 kb) only and this failure is not because of slow network as I have tested it on multiple networks.
After debugging hapi modules for payload parsing, I have found that Pez module who is parsing the payload is throwing this error. I also noticed that when this error happens Pez modules onClose event is called and none of the parse events occurs and hence it returns the "Incomplete multipart payload" error. The Pez state is at "preamble" when this happens, for successful parse case, the state is "epilogue".
My hapi route config is
config: {
payload: {
maxBytes: 20971520,
output: 'data',
parse: true,
allow: 'multipart/form-data'
}
}
Can somebody suggest why is the parsing fails at times or why the onClose event is called before parsing happens?

catching Talend error in web Application

I have created a Talend job and deployed it as a Axis Web Service.
I am calling this Web Service from my Web Application.
My application and web service are deployed over Tomcat server.
For Valid Inputs:
Runs Perfectly.
For Invalid Inputs:
It throws Error/exceptions in Tomcat Server.
I want this Errors into my application. I didn't get any error related information in the Response sent by web service.
Error message on Tomcat Server
XML response of Web service
If I understand your question you are not so much asking how to fix this error, but how to get feedback about your error. There are several ways but here is a simple method.
Add a tLogCatcher to your job, and point its output to a tSendMail component. You can run the output thru a tMap do things like adding HTML formatting. You can also create a joblet with these two components and use the joblet in every job so you do not have to recreate it every time.
The diagram below shows a real simple case where I add tLogCatcher and tSendMail directly to the job. When there is an error it will send me an email with the details. You can use any of the columns in row11, I am only using job and message in my example.
This error : For input string "fabrik"
is generated by the tFileInputExcel component when encountering a non valid field (expected : integer ; given : string). You can't directly catch this error with the tFileInputExcel component (it's just printed out on the console).
However, you can use a tSchemaComplianceCheck component after your tFileInputExcelComponent : it will throw an error if a data is not valid for your schema. This component has a reject link to catch the error.
tFileInputExcel->tSchemaComplianceCheck->tMap->tMSOutput
If you use tLogCatcher component to catch the error then, at the end of the flow, you can add a tBufferOutput component. Keep the fields with the information you want for.
component configuration
The result will be like this (note that they are shown in the same order):
result

ColdFusion 2016 - Security service not available

CF 2016 on windows10 with IIS
I've checked other threads on similar issues and they don't appear to apply.
My laptop has needed to be crash-started on a number of occasions recently due to the laptop not waking up from sleep mode. A couple of times ColdFusion 2016 didn't start automatically and needed to be manually started. Now, ColdFusion appears to be starting automatically, but now I'm getting an error:
HTTP Error 500.0 - The Security service is not available.
I'm afraid I have no idea where to start on this or even what additional information to provide. So, I would really appreciate any hints.
The remainder of the error has the following information:
Detailed Error Information:
Module: IsapiModule Notification: ExecuteRequestHandler
Handler: ISAPI-dll
Error Code: 0x00000000
Requested URL: http://zbay_sys:80/jakarta/isapi_redirect.dll
Physical Path : C:\ColdFusion2016\config\wsconfig\1\isapi_redirect.dll
Logon Method: Anonymous
Logon User : Anonymous
I really hope I don't have to re-install CF
Glad, that you are sorted.
The error message says, "The Security service is not available." Thus IIS is showing http based error 500. If the service is not starting, there could likely be a problem at ColdFusion end.
Please try the following, if you face the similar issue in future:–
Stop ColdFusion service (if not already)
Launch Command prompt as Administrator
Browse to cf_root\cfusion\bin and run the following
command coldfusion.exe -start console
Try to access the CF Admin, once the services are started.
In case it gives an error message, please share the same.

SSIS 2012 - Web Service Task - Output Exceptions

I've got a Web Service Task in my Control Flow.
The actual Web Service type is void. For testing purposes, the Web Service just throws a new Exception, with a message.
I've got the task outputting to a variable User::ServiceResponse
The Failure path goes to a Send Mail Task, which uses the variable User::ServiceResponse... however, the email received does not contain any text.
When the package executes, the Immediate Window does show a long error, which in part contains my exception message. "Adams Error Message" towards the very end.
SSIS package "....\WebProfile.dtsx" starting.
Error: 0xC002F304 at SVC, Web Service Task: An error occurred with the following error message:
"Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException:
The Web Service threw an error during method execution.
The error is: System.Web.Services.Protocols.SoapException:
Server was unable to process request. --->
System.Exception: Adams Error Message
--- End of inner exception stack trace ---.
Without writing a lot of custom script... how can I get the exceptions from my Web Service Task into the Send Mail Task?