Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot POST on Regex Tester (error 500) #2471

Alexwii opened this issue Jul 12, 2016 · 0 comments

Cannot POST on Regex Tester (error 500) #2471

Alexwii opened this issue Jul 12, 2016 · 0 comments


Copy link

@Alexwii Alexwii commented Jul 12, 2016

Hello everyone.

I will start to excuse for my english...

I'm actually install a Graylog for production. And when I have tested, I haven't had this problem.

Problem description

When I want test my regular expression on "Extractor Configuration" graylog print this:

Could not try regular expression. Make sure that it is valid.
Details: Error: cannot POST (500)

And logs file say:

2016-07-12T09:53:44.555+02:00 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
        at java.util.regex.Pattern.error( ~[?:1.8.0_20]
        at java.util.regex.Pattern.sequence( ~[?:1.8.0_20]
        at java.util.regex.Pattern.expr( ~[?:1.8.0_20]
        at java.util.regex.Pattern.compile( ~[?:1.8.0_20]
        at java.util.regex.Pattern.<init>( ~[?:1.8.0_20]
        at java.util.regex.Pattern.compile( ~[?:1.8.0_20]
        at ~[graylog.jar:?]
        at ~[graylog.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20]
        at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:1.8.0_20]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:1.8.0_20]
        at java.lang.reflect.Method.invoke( ~[?:1.8.0_20]
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$ ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply( ~[graylog.jar:?]
        at org.glassfish.jersey.server.ServerRuntime$ [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors$ [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors$ [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
        at org.glassfish.jersey.process.internal.RequestScope.runInScope( [graylog.jar:?]
        at org.glassfish.jersey.server.ServerRuntime.process( [graylog.jar:?]
        at org.glassfish.jersey.server.ApplicationHandler.handle( [graylog.jar:?]
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service( [graylog.jar:?]
        at org.glassfish.grizzly.http.server.HttpHandler$ [graylog.jar:?]
        at com.codahale.metrics.InstrumentedExecutorService$ [graylog.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_20]
        at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_20]
        at [?:1.8.0_20]

Steps to reproduce the problem

  1. Add an extractor to an input
  2. Choose "Grok Pattern" or "Regular expression"
  3. In "Condition" choose "Only attempt extraction if field matches regular expression"
  4. Write just one regular expression
  5. Message appears and logs


  • Graylog Version: 2.0.3
  • Elasticsearch Version: 2.3.3
  • MongoDB Version: 3.2.7
  • Operating System: Redhat 6.6
  • Browser version: Chrome 50
joschi pushed a commit that referenced this issue Jul 12, 2016
@joschi joschi added the bug label Jul 12, 2016
@joschi joschi added this to the 2.1.0 milestone Jul 12, 2016
@joschi joschi self-assigned this Jul 12, 2016
edmundoa added a commit that referenced this issue Jul 13, 2016
* Properly handle PatternSyntaxException in RegexTesterResource

Fixes #2471

* Don't lose exception stack trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.