How to change default log level in wso2 esb - wso2

I have downloaded wso2 esb 5.0.0 into local but when I started it's starting with log level DEBUG. I would like t change the log level to ERROR by default when ever server started.
Looks like log level in registry will override log level in property files so is there a way to edit log level in registry or any other configuration file

All WSO2 products uses a log4j based logging mechanism. Through log4j.properties file, <ESB_HOME>/repository/conf directory, this can be controlled.
WSO2 recommends to not to modify log4j.properties directly but rather through management console. The settings in the management console override the settings in log4j.properties.
For the respective loggers, check the log level and set it appropriately.
TRACE - Designates finer-grained informational events than the DEBUG.
DEBUG - Designates fine-grained informational events that are most useful to debug an application.
INFO - Designates informational messages that highlight the progress
of the application at coarse-grained level.
WARN - Designates potentially harmful situations.
ERROR - Designates error events that might still allow the application to continue running.
FATAL - Designates very severe error events that will presumably lead
the application to abort.
For the following loggers, change the log levels to ERROR.
log4j.category.org.apache.synapse=ERROR
log4j.category.org.apache.synapse.transport=ERROR
log4j.category.org.apache.axis2=ERROR
log4j.category.org.apache.axis2.transport=ERROR
log4j.logger.org.wso2=ERROR
log4j.logger.org.wso2.carbon=ERROR
log4j.appender.CARBON_LOGFILE.threshold=ERROR
log4j.appender.CARBON_MEMORY.threshold=ERROR
log4j.appender.CARBON_SYS_LOG.threshold=ERROR
log4j.appender.AUDIT_LOGFILE.threshold=ERROR
note: Even Important info statements like server startup will not be printed due to this change.
Refer the post for insights into tracking messages across different WSO2 components: http://muralitechblog.com/wso2-esb-how-to-track-messages/
https://docs.wso2.com/display/ESB490/Setting+Up+Logging

Related

How can I filter out errors on sentry to avoid consuming my quota?

I'm using Sentry to log my errors, but there are errors I'm not able to fix (or could not be fixed by me) like
OSError (write error)
Or error that come from RQ (each time I deploy my app)
Or client errors (which are client.errors)
I can't just ignore them because I consume all my quota. How I can filter out this errors?
Here some references for interested people.
uwsgi: OSError: write error during GET request
Fixing broken pipe error in uWSGI with Python
https://github.com/unbit/uwsgi/issues/1623
I created a Gist for rate limiting the amount of events that are being send to Sentry:
https://gist.github.com/jurrian/e22f8e724b8499a29c5537e956f0dc7f
It uses ratelimitingfilter which can be configured to set a rate per minute, and additionally add a burst to start rate limiting after a number of events.
I get the same errors, but i never had any problems with my quota. But if you really want to filter it, you can just do it in your sdk:
https://docs.sentry.io/error-reporting/configuration/filtering/?platform=python
But beware, this could hide other errors as mentioned here:
https://github.com/pypa/warehouse/issues/679
To safe yourself some quota, you have two options:
Avoid forwarding events client side, thus preventing events being send to sentry at all. Have a look at the docs for available client-side filters. The drawback with this approach is of course that you need a new code deployment for any adjustment of client-side filters and some clients may not instantly reflect your code changes.
Avoid forwarding events on sentry's side, via inbound filters ([Project] > Project Settings > Inbound Filters). According to the sentry documentation on quota usage, events filtered via inbound filters are not affecting your quota.
Inbound filters include:
Common browser extension errors
Events coming from localhost
Known legacy browsers errors
Known web crawlers
By their error message
From specific release versions of your code
From certain IP addresses
Business plans and above also allow to filter events by error messages.

Why do embedded Jetty examples do server.dump(System.err)?

All the examples of embedded Jetty I see do server.dump(System.err). I can't find any docs on what that does or why.
When you see server.dump(System.err) this is a dump of the state of the Server object to the System.err console appendable.
Jetty operates on a LifeCycle model, where every component can be started and stopped and has the ability to track its state.
The Server object is a specialized ContainerLifeCycle which operates like all other LifeCycle objects but also has child beans that follow the LifeCycle behaviors.
The call server.dump(System.err) is actually the ContainerLifeCycle.dump(Appendable) call for the Server.
This top level Server dump is called The Jetty Dump Tool.
See https://www.eclipse.org/jetty/documentation/current/jetty-dump-tool.html for details, including a sample output.

Google Cloud Dataprep: Transformation engine unavailable due to prior crash (exit code: -1)

I am trying to create a flow using Google Cloud Dataprep. The flow takes a data set from Big Query which contains app events data from Firebase Analytics to flatten event parameters for easier analysis. I keep getting the following error before even being able to create the first step (recipe):
Transformation engine unavailable due to prior crash (exit code: -1)
See top right corner in the screenshot below
Screenshot
The error message you received is particularly challenging in that it
is so generic. The root cause could be within the platform, or it
could be in whatever execution environment you used for the job.
Unfortunately, we don't have the resources right now to capture and
document all of the error messages that can be emitted during the job
execution process, which can span a wide variety of servers and other
software platforms.
I encountered the same problem. First I tried following steps:
Refresh the browser (i.e., click the Reload button top left)
"Hard refresh" the browser (i.e., ctrl + Reload)
Clear cache + cookies (i.e., https://support.google.com/accounts/answer/9098093?co=GENIE.Platform=Desktop&hl=en&visit_id=636802035537591679-2642248633&rd=1)
References:
https://community.trifacta.com/s/question/0D51L00005dG3MXSA0/i-was-working-on-a-recipe-and-i-received-the-error-message-transformation-engine-unavailable-due-x-to-prior-crash-exit-code-1-why-am-i-getting-this-error
https://community.trifacta.com/s/question/0D51L00005choIbSAI/unable-to-develop-on-our-trifacta-42-platform-for-the-past-12-hours-steps-added-to-recipes-are-lost-and-having-to-recode-the-error-given-is-transformation-engine-unavailable-what-is-causing-this-error
However this did not solve the problem. Then I tried:
Confirm that your Chrome version is 68+. If not, please upgrade.
Navigate to chrome://nacl/ and ensure that PNaCl is enabled.
Navigate to chrome://components/ and ensure that the PNaCl Version is not 0.0.0.0. Click on Check for Updates
Did not solve the problem either.
References:
https://community.trifacta.com/s/question/0D51L00005dDrcmSAC/not-able-to-preview-data-sources-or-edit-recipes
I got the info from Trifacta, that there has been an internal issue after maintenance. So if non of the above solutions work, you just have to wait and see when they fix the problem.

CoRegisterClassObject returns error (session 0?)

A customer is running one of our programs, usually run as a service, as an application. The customer is getting the following error on CoRegisterClassObject():
The class is configured to run as a security id different from the caller.
It looks like some type of session 0 error, but why should CoRegisterClassObject() care about session 0? COM should allow both services (session 0) and apps (session > 0) and not care what registers what, shouldn't it?
Also, I don't like the fact that it's not in the list of errors returnable by CoRegisterClassObject(), as per the Microsoft doc webpage.
The error code in question is CO_E_WRONG_SERVER_IDENTITY (0x80004015).
Per this page:
COM security frequently asked questions
Q6 Why does CoRegisterClassObject return CO_E_WRONG_SERVER_IDENTITY? When launching my ATL 1.1 server service as an .exe file, I receive CO_E_WRONG_SERVER_IDENTITY from CoRegisterClassObject. (The class is configured to run as a security ID different from the caller.) This seems to occur whether I skip the CoInitializeSecurity or not. It fails running as a service or as an .exe file.
A. Many services are debugged by running them as console applications in the interactive user identity. Because the service is already registered to run in a different identity (configurable by the Services control panel applet), OLE fails the CoRegisterClassObject and RunningObjectTable::Register(ROTFLAGS_ALLOWANYCLIENT) calls by returning CO_E_WRONG_SERVER_IDENTITY to enforce security and to prevent malicious servers from spoofing the server. To debug by running in the interactive user's identity, make the following changes in the server's registry entries to prevent these failures:
• To prevent CoRegisterClassObject failure, remove the following named value:
[HKEY_CLASSES_ROOT\APPID\{0bf52b15-8cab-11cf-8572-00aa00c006cf}]
"LocalService"="HelloOleServerService"
• To prevent a IRunningObjectTable::Register(ROTFLAGS_ALLOWANYCLIENT) failure, follow these steps:
Remove the following named value:
[HKEY_CLASSES_ROOT\APPID\{0bf52b15-8cab-11cf-8572-00aa00c006cf}]
"LocalService"="HelloOleServerService"
Then add the following named value:
[HKEY_CLASSES_ROOT\APPID\{0bf52b15-8cab-11cf-8572-00aa00c006cf}]
"RunAs"="Interactive User"
You muist restore the modified registry entries after debugging.
I am assuming you would have to replace {0bf52b15-8cab-11cf-8572-00aa00c006cf} with your COM object's actual CLSID instead.

Where to look up error of sentry itself?

We've set up sentry on our server and sometimes we've got errors while working with sentry web interface. It looks like this:
There was an internal server error while processing your request.
You may reference this error as 0f77c43f3ced487085e225207f11beef.
Since the error code is always changing I assume it's pointing to some kind of error ID in some storage. But I can't find it.
There is an internal Sentry project. Usually it is located in the /sentry/ organization, but is not necessarily exposed to you in the UI as part of the organization selection.
There is an open ticket within Sentry to improve the visibility of this project:
https://github.com/getsentry/sentry/issues/1514