JMeter: LoggingCSSParseErrorHandler: Browser compliant mode skipped CSS - jmeter

JMeter version 4.0
I have the following error in jmeter.log
WARN c.h.c.r.e.LoggingCSSParseErrorHandler: Browser compliant mode skipped CSS from [xx:xx] starting at token ' ' until [xx:xx] to token ';' (based on com.helger.css.parser.ParseException: Encountered unexpected token: ")" ")"
at line xx, column xx.
Was expecting one of:
"+"
"-"
)
I don't want to disable css parser in jmeter.properties.

You can ignore such exceptions using JMeter property, set it in user.properties:
css.parser.ignore_all_css_errors=true
# Let the CSS Parser ignore all css errors
#css.parser.ignore_all_css_errors=true

Related

Can severity be set conditionally for imfile input in rsyslog 8.32?

I have a text logfile from an application that is formatted like so...
2019-12-18 12:32:00 DEBUG This is a debugging line
2019-12-18 12:32:15 This is a informational line
2019-12-18 12:32:17 WARNING This is a warning line
2019-12-18 12:32:33 ERROR This is an error line
2019-12-18 12:33:44 ERROR This is a multi-line error message
This is more of the previous error message
2019-12-18 12:34:15 This is back to another informational line
I have configured rsyslog to ingest this file using the imfile module and ship it off to my central syslog server...
module(load="imfile")
input(type="imfile"
file="/usr/share/myapplication/myapplication.log"
tag="myapplication-log:"
facility="local4"
severity="info"
startmsg.regex="^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2} [0-9]{1,2}:[0-9]{2}:[0-9]{2} "
readTimeout="5"
)
*.* #192.168.1.4
So far so good. The remote syslog server receives the lines correctly and handles the multi-line error as a single message. Almost perfect, but now I want to expand things a bit.
All syslog messages in the above are sent as local4.info as expected. The original message lines contain enough information for me to be able to correctly identify the proper 'severity' level for the message and I'd like to be able to do that, but I can't seem to figure out the method.
Something to the effect of this non-working pseudo-code...
if $programname == "myapplication-log" then {
if ($msg contains " DEBUG ") then severity debug;
if ($msg contains " WARNING ") then severity warn;
if ($msg contains " ERROR ") then severity error;
}
Any help appreciated. Thanks.
-- EDIT for clarity --
As #meuh pointed out, this could be accomplished at the output phase using templating, but my preference would be to have the severity correctly determined during the input phase. This way, any outputs of this message log are handled exactly the same as any other log and I don't have to remember to perform special output handling if my outputs change a year from now.
A better pseudo-code example of what I am looking for would be...
input(type="imfile"
file="/usr/share/myapplication/myapplication.log"
tag="myapplication-log:"
facility="local4"
severity="info"
severity="debug" if ($msg contains " DEBUG ");
severity="warn" if ($msg contains " WARNING ");
severity="error" if ($msg contains " ERROR ");
startmsg.regex="^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2} [0-9]{1,2}:[0-9]{2}:[0-9]{2} "
readTimeout="5"
)
Once the input has been parsed, you enter a second phase where you have access to the properties and can create a template variation on the usual network output. The <prio> part of the output is made up from
prio = facility*8 + severity
where rfc5424 lists the numbers for each facility and severity: Local4 is 20, severity debug is 7, warning 4, error 3.
The standard RSYSLOG_ForwardFormat used to send messages is defined as
template(name="RSYSLOG_ForwardFormat" type="string"
string="<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%
%msg:::sp-if-no-1st-sp%%msg%")
You want to recalculate the %PRI% property. You cannot change the property but you can have your own local variables, eg $.myprio and use that. The result is:
template(name="myformat" type="string"
string="<%$.myprio%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32% %msg:::sp-if-no-1st-sp%%msg%")
if $programname == "myapplication-log" then {
set $.myseverity = 6;
if ($msg contains " DEBUG ") then set $.myseverity = 7;
if ($msg contains " WARNING ") then set $.myseverity = 4;
if ($msg contains " ERROR ") then set $.myseverity = 3;
set $.myprio = 20*8+$.myseverity;
*.* #192.168.1.4;myformat
}
For alternatives, look through the rsyslog modules for input, parsing, message modification and output. Possibilities are
input module improg that can run a program and accept input piped from it,
the parser pmnormalize using liblognorm which can parse data according to your rules, and
modification module mmnormalize using the same liblognorm which can modify the message.
The lognorm parser is probably the definitive solution, but is fairly complex and I cannot provide further advice in using it.
However, improg is a simple way to externalize the pre-processing into a separate program written in any suitable language, or even a shell script, using inotify to tail the input file and munge the lines before passing them on to rsyslog.

Facing an error while writing the info in local file through Jmeter

I have tried the below script even I have changed the path as well, but still, I am facing the same issue.
basecost=vars.get("_baseCost");
File=new FileOutputStream ("‪‪‪C:/Rajesh/Automation Stuff/rajesh.txt",true);
P=new PrintStream(File);
this.interpreter.setOut(P);
print(basecost);
File.close();
getting below error
ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: `` File=new FileOutputStream
("‪‪‪C:/Rajesh/Automation Stuff/rajesh.txt",true); P= . . . '' : Object
constructor
While looking into this, I have found that there are some encoded characters in below line of your code which are the reason for its failure.
File=new FileOutputStream (
How I found it ?
Open notepad++ and paste your code in it. Go to 'Encoding' and select 'Encode in ANSI'
As you click on Encode in ANSI, you will see some encoded characters (see below screenshot) in the second line of code(where Jmeter throwing error). Remove those encoded characters and use the code in Jmeter Bean-shell. It will work fine now.
Don't use Beanshell for scripting, it's a form of performance anti-pattern, since JMeter 3.1 you should be using JSR223 Test Elements and Groovy language.
Example code:
new File("‪‪‪C:/Rajesh/Automation Stuff/rajesh.txt") << vars.get("_baseCost")
More information:
Groovy: Writing Files
Apache Groovy - Why and How You Should Use It

Setting expanded output style in sass doesn´t work

I want to change output style in my sass file to expanded but setting :
sass --watch style.scss:style.css --style expanded
doesn´t work for me. Instead it return me this
Encoding::CompatibilityError: incompatible character encodings: CP852 and UTF-8
Use --trace for backtrace.
Is there any possible to fix it? I´m not quite sure about it too because I´m new in Sass.But when I tried first , things went well in my single line selector in compresed style .I did some changes in sass file, I have here now more selectors formated in expanded output style , but it seems that problem is that compiler still want to see my sass file in compresed output style because it gives me back this:
Compilation Error
Error: Invalid CSS after "body {": expected "}", was "{"
on line 1 of sass/c:\Users\Doma\Desktop\Nové webovky\Javascript
& webovky\alfabeta\pionyr.sass
body { {
Can someone please help? Maybe is some basic thing but I really didn´t find solution to this and I searched in many sources
Thank you very much
that happening because you use native language not english for your operation system to change that and make sure sass compiler working without errors write this in terminal/command line before you use sass compiling command chcp 1252 after code activated use sass compile as expected sass --watch style.scss:style.css --style expanded
update
sometimes this error happening because silly mistake try this may help some causes this solution with helpfully change the path name from c:\Users\Doma\Desktop\Nové webovky\Javascript & webovky\alfabeta\pionyr.sass to c:\Users\Doma\Desktop\Nov webovky\Javascript & webovky\alfabeta\pionyr.sass
just take out é form the folder path and try again.

Gradle complains about bracket

I got really strange behavior in Gradle. I didn't change anything and it stop works.
It show this error:
startup failed:
build file 'D:\project\modules\view\build.gradle': 45: expecting ')', found '}' # line 45, column 1.
}
^
1 error
Open File
This is how my gradle.build looks like:
And this is my pathingJar task, I have also no idea why it's marked as yellow (it wasn't before and i'm pretty sure i didn't change anything)
Does someone know an reason?
The if in boot is missing a )
if(Os.isFamily(Os.FAMILY_WINDOWS)) // the last ')' was missing
{
// code omitted
}

YAML Syntax Error

I am developing a permissions.yml file for PermissionsEx in Bukkit.
I recently encountered an error whilst validating the syntax, after exhausting all my options the error still reads "syntax error on line 130, col 18: `' " (There is no tab spacing in this code)
The code can be found here
http://pastebin.com/KDKvd18H
If someone would be able to assist me in correcting this error it will be greatly appreciated.
Kind Regards,
Cian
I found a tab (\t) character after one line. I fixed your YAML and at least the online YAML parser understands it. Here you go: http://pastebin.com/uLTs42FA. The problem was after the following part:
Duke:
prefix: '&6[&1D&2u&1k&2e&6]&8 '
options:
rank: '900'
permissions:
- essentials.heal
- essentials.kit
- essentials.balance
- essentials.pay
- essentials.afk
- essentials.help
- essentials.helpop

Resources