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 import an output from a content pack #1423

Closed
adi-f opened this issue Sep 16, 2015 · 1 comment
Closed

Cannot import an output from a content pack #1423

adi-f opened this issue Sep 16, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@adi-f
Copy link

@adi-f adi-f commented Sep 16, 2015

When I try to import an output from a content pack it fails. I tried this with Graylog 1.1.6 and 1.2.0

Example failing content pack:

{
  "id" : null,
  "name" : "output-test2",
  "description" : "testing with another output",
  "category" : "playground",
  "inputs" : [ ],
  "streams" : [ ],
  "outputs" : [ {
    "id" : "55f932cbe4b0d937f08c5ac4",
    "title" : "stdout",
    "type" : "org.graylog2.outputs.LoggingOutput",
    "configuration" : {
      "prefix" : "STD-OUT >"
    }
  } ],
  "dashboards" : [ ],
  "grok_patterns" : [ ]
}

Stacktrace (from Graylog 1.2.0):

2015-09-16T11:29:32.652+02:00 ERROR [BundleImporter] Error while creating dashboards. Starting rollback.
java.lang.IllegalArgumentException: Supplied output must be of implementation type OutputImpl, not class org.graylog2.streams.OutputImpl
        at org.graylog2.streams.OutputServiceMJImpl.implOrFail(OutputServiceMJImpl.java:143)
        at org.graylog2.streams.OutputServiceMJImpl.create(OutputServiceMJImpl.java:87)
        at org.graylog2.bundles.BundleImporter.createOutput(BundleImporter.java:421)
        at org.graylog2.bundles.BundleImporter.createOutputs(BundleImporter.java:413)
        at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:134)
        at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:112)
        at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:105)
        at org.graylog2.rest.resources.system.bundles.BundleResource.applyBundle(BundleResource.java:174)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
        at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
        at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
        at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
        at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:606)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
2015-09-16T11:29:32.653+02:00 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
java.lang.IllegalArgumentException: Supplied output must be of implementation type OutputImpl, not class org.graylog2.streams.OutputImpl
        at org.graylog2.streams.OutputServiceMJImpl.implOrFail(OutputServiceMJImpl.java:143)
        at org.graylog2.streams.OutputServiceMJImpl.create(OutputServiceMJImpl.java:87)
        at org.graylog2.bundles.BundleImporter.createOutput(BundleImporter.java:421)
        at org.graylog2.bundles.BundleImporter.createOutputs(BundleImporter.java:413)
        at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:134)
        at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:112)
        at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:105)
        at org.graylog2.rest.resources.system.bundles.BundleResource.applyBundle(BundleResource.java:174)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
        at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
        at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
        at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
        at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:606)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
@dennisoelkers
Copy link
Member

@dennisoelkers dennisoelkers commented Sep 16, 2015

Thanks for reporting this. It has been fixed already and the fix will be included in the next patch release.

@joschi joschi added the bug label Sep 16, 2015
@joschi joschi added this to the 1.2.1 milestone Sep 16, 2015
joschi added a commit that referenced this issue Sep 16, 2015
Fix import of content packs containing outputs
Fixes #1423
@joschi joschi closed this in e1f87d5 Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants