Skip to content

Resource not found by Assets controller #38

Closed
@peasead

Description

@peasead

Request Type

Bug

Work Environment

Question Answer
OS version (server) CentOS 7.0.2
OS version (client) MacOS 10.12.1
TheHive version / git hash Unknown, 7938d85
Package Type From source
Browser type & version Chrome 54.0.2840.71 (64-bit)

Problem Description

After building from source and starting TheHive, I get the following error in my browser.

A client error occurred (/index.html / /index.html : Resource not found by Assets controller.

Steps to Reproduce

  1. Build from source
  2. configure ElasticSearch and start
  3. perform initial config
  4. perform first start
  5. Browse to server:9000

Possible Solutions

  • The file /opt/thehive/conf does not exist...perhaps it is supposed to be created by Reflections?
  • The file /opt/thehive/conf does not exist...perhaps it is supposed to be copied from TheHive directory but the instructions say sudo cp TheHive/target/universal/stage /opt/thehive?
  • Conflict with Java version and Reflections (Java(TM) SE Runtime Environment (build 1.8.0_112-b15))
  • I have started over and done everything as root
  • I have checked /var/log/audit/audit.log for any selinux conflicts, I didn't see any, but I tried setenforce 0 to remove it from the equation

Complementary information

application.log without the conf directory being added by me.

2016-11-23 06:31:51,907 [WARN] from org.reflections.Reflections in main - could not create Dir using directory from url file:/opt/thehive/conf. skipping.
java.lang.NullPointerException: null
	at org.reflections.vfs.Vfs$DefaultUrlTypes$3.matches(Vfs.java:239)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:98)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:91)
	at org.reflections.Reflections.scan(Reflections.java:237)
	at org.reflections.Reflections.scan(Reflections.java:204)
	at org.reflections.Reflections.<init>(Reflections.java:129)
	at global.TheHive.configure(Module.scala:48)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
	at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
	at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
	at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
	at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
	at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2016-11-23 06:31:51,908 [WARN] from org.reflections.Reflections in main - could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/opt/thehive/conf]
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:109)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:91)
	at org.reflections.Reflections.scan(Reflections.java:237)
	at org.reflections.Reflections.scan(Reflections.java:204)
	at org.reflections.Reflections.<init>(Reflections.java:129)
	at global.TheHive.configure(Module.scala:48)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
	at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
	at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
	at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
	at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
	at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2016-11-23 06:31:53,304 [INFO] from org.reflections.Reflections in main - Reflections took 2716 ms to scan 121 urls, producing 7228 keys and 74031 values
2016-11-23 06:31:53,318 [INFO] from module in main - Loading model class models.AuditModel
2016-11-23 06:31:53,319 [INFO] from module in main - Loading model class org.elastic4play.services.AttachmentModel
2016-11-23 06:31:53,319 [INFO] from module in main - Loading model class models.AnalyzerModel
2016-11-23 06:31:53,319 [INFO] from module in main - Loading model class models.JobModel
2016-11-23 06:31:53,319 [INFO] from module in main - Loading model class models.ArtifactModel
2016-11-23 06:31:53,320 [INFO] from module in main - Loading model class models.TaskModel
2016-11-23 06:31:53,320 [INFO] from module in main - Loading model class models.UserModel
2016-11-23 06:31:53,320 [INFO] from module in main - Loading model class models.CaseTemplateModel
2016-11-23 06:31:53,320 [INFO] from module in main - Loading model class connectors.misp.MispModel
2016-11-23 06:31:53,321 [INFO] from module in main - Loading model class models.LogModel
2016-11-23 06:31:53,321 [INFO] from module in main - Loading model class org.elastic4play.services.DBListModel
2016-11-23 06:31:53,322 [INFO] from module in main - Loading model class models.ReportTemplateModel
2016-11-23 06:31:53,322 [INFO] from module in main - Loading model class models.CaseModel
2016-11-23 06:31:54,289 [WARN] from org.reflections.Reflections in main - could not create Dir using directory from url file:/opt/thehive/conf. skipping.
java.lang.NullPointerException: null
	at org.reflections.vfs.Vfs$DefaultUrlTypes$3.matches(Vfs.java:239)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:98)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:91)
	at org.reflections.Reflections.scan(Reflections.java:237)
	at org.reflections.Reflections.scan(Reflections.java:204)
	at org.reflections.Reflections.<init>(Reflections.java:129)
	at global.TheHive.configure(Module.scala:61)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
	at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
	at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
	at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
	at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
	at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2016-11-23 06:31:54,290 [WARN] from org.reflections.Reflections in main - could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/opt/thehive/conf]
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:109)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:91)
	at org.reflections.Reflections.scan(Reflections.java:237)
	at org.reflections.Reflections.scan(Reflections.java:204)
	at org.reflections.Reflections.<init>(Reflections.java:129)
	at global.TheHive.configure(Module.scala:61)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
	at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
	at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
	at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
	at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
	at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2016-11-23 06:31:55,275 [INFO] from org.reflections.Reflections in main - Reflections took 1952 ms to scan 121 urls, producing 7228 keys and 74031 values
2016-11-23 06:31:56,185 [WARN] from org.reflections.Reflections in main - could not create Dir using directory from url file:/opt/thehive/conf. skipping.
java.lang.NullPointerException: null
	at org.reflections.vfs.Vfs$DefaultUrlTypes$3.matches(Vfs.java:239)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:98)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:91)
	at org.reflections.Reflections.scan(Reflections.java:237)
	at org.reflections.Reflections.scan(Reflections.java:204)
	at org.reflections.Reflections.<init>(Reflections.java:129)
	at global.TheHive.configure(Module.scala:71)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
	at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
	at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
	at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
	at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
	at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2016-11-23 06:31:56,185 [WARN] from org.reflections.Reflections in main - could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/opt/thehive/conf]
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:109)
	at org.reflections.vfs.Vfs.fromURL(Vfs.java:91)
	at org.reflections.Reflections.scan(Reflections.java:237)
	at org.reflections.Reflections.scan(Reflections.java:204)
	at org.reflections.Reflections.<init>(Reflections.java:129)
	at global.TheHive.configure(Module.scala:71)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
	at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
	at com.google.inject.spi.Elements.getElements(Elements.java:110)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
	at com.google.inject.Guice.createInjector(Guice.java:96)
	at com.google.inject.Guice.createInjector(Guice.java:84)
	at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
	at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
	at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
	at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
	at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
	at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2016-11-23 06:31:57,143 [INFO] from org.reflections.Reflections in main - Reflections took 1864 ms to scan 121 urls, producing 7228 keys and 74031 values
2016-11-23 06:31:57,804 [INFO] from akka.event.slf4j.Slf4jLogger in application-akka.actor.default-dispatcher-3 - Slf4jLogger started
2016-11-23 06:31:58,370 [INFO] from org.elasticsearch.plugins in main - [Captain Barracuda] modules [], plugins [], sites []
2016-11-23 06:31:58,921 [INFO] from connectors.misp.MispSrv in application-akka.actor.default-dispatcher-3 - Update of MISP events is starting ...
2016-11-23 06:31:58,938 [INFO] from connectors.misp.MispSrv in application-akka.actor.default-dispatcher-3 - 0 MISP event(s) updated
2016-11-23 06:31:59,225 [INFO] from play.api.Play in main - Application started (Prod)
2016-11-23 06:31:59,419 [INFO] from play.core.server.NettyServer in main - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
2016-11-23 06:32:12,478 [INFO] from connectors.misp.MispSrv in Thread-7 - Stopping MISP fetching ...
2016-11-23 06:32:12,480 [WARN] from org.elastic4play.services.TempSrv in application-akka.actor.default-dispatcher-8 - Fail to remove temporary files (/tmp/6991801577547692013/play-request) : java.nio.file.NoSuchFileException: /tmp/6991801577547692013/play-request

application.log with the conf directory added by me

2016-11-23 07:07:55,096 [INFO] from org.reflections.Reflections in main - Reflections took 2655 ms to scan 122 urls, producing 7228 keys and 74031 values
2016-11-23 07:07:55,112 [INFO] from module in main - Loading model class models.AuditModel
2016-11-23 07:07:55,113 [INFO] from module in main - Loading model class org.elastic4play.services.AttachmentModel
2016-11-23 07:07:55,113 [INFO] from module in main - Loading model class models.AnalyzerModel
2016-11-23 07:07:55,113 [INFO] from module in main - Loading model class models.JobModel
2016-11-23 07:07:55,113 [INFO] from module in main - Loading model class models.ArtifactModel
2016-11-23 07:07:55,114 [INFO] from module in main - Loading model class models.TaskModel
2016-11-23 07:07:55,114 [INFO] from module in main - Loading model class models.UserModel
2016-11-23 07:07:55,114 [INFO] from module in main - Loading model class models.CaseTemplateModel
2016-11-23 07:07:55,114 [INFO] from module in main - Loading model class connectors.misp.MispModel
2016-11-23 07:07:55,115 [INFO] from module in main - Loading model class models.LogModel
2016-11-23 07:07:55,115 [INFO] from module in main - Loading model class org.elastic4play.services.DBListModel
2016-11-23 07:07:55,115 [INFO] from module in main - Loading model class models.ReportTemplateModel
2016-11-23 07:07:55,116 [INFO] from module in main - Loading model class models.CaseModel
2016-11-23 07:07:57,130 [INFO] from org.reflections.Reflections in main - Reflections took 2012 ms to scan 122 urls, producing 7228 keys and 74031 values
2016-11-23 07:07:58,961 [INFO] from org.reflections.Reflections in main - Reflections took 1827 ms to scan 122 urls, producing 7228 keys and 74031 values
2016-11-23 07:07:59,584 [INFO] from akka.event.slf4j.Slf4jLogger in application-akka.actor.default-dispatcher-3 - Slf4jLogger started
2016-11-23 07:08:00,205 [INFO] from org.elasticsearch.plugins in main - [Atum] modules [], plugins [], sites []
2016-11-23 07:08:00,779 [INFO] from connectors.misp.MispSrv in application-akka.actor.default-dispatcher-5 - Update of MISP events is starting ...
2016-11-23 07:08:00,796 [INFO] from connectors.misp.MispSrv in application-akka.actor.default-dispatcher-2 - 0 MISP event(s) updated
2016-11-23 07:08:01,196 [INFO] from play.api.Play in main - Application started (Prod)
2016-11-23 07:08:01,300 [INFO] from play.core.server.NettyServer in main - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
2016-11-23 07:08:15,812 [INFO] from connectors.misp.MispSrv in Thread-7 - Stopping MISP fetching ...
2016-11-23 07:08:15,814 [WARN] from org.elastic4play.services.TempSrv in application-akka.actor.default-dispatcher-6 - Fail to remove temporary files (/tmp/6456321865867718769/play-request) : java.nio.file.NoSuchFileException: /tmp/6456321865867718769/play-request

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions