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

Unable to Start #19

Closed
jimbolya0607 opened this issue Nov 18, 2016 · 10 comments
Closed

Unable to Start #19

jimbolya0607 opened this issue Nov 18, 2016 · 10 comments
Assignees
Labels

Comments

@jimbolya0607
Copy link

jimbolya0607 commented Nov 18, 2016

I'm sure this is an easy fix. Sorry, I'm not super familiar with linux.

Ran all steps to install from binary. Trying to run this locally from a linux laptop.

Ran command:
bin/thehive -Dconfig.file=/etc/thehive/application.conf

Recieved this:
Also, when I go to local host I get the apache default page.

[warn] o.r.Reflections - could not create Dir using directory from url file:/root/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)
[warn] o.r.Reflections - 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:/root/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)
[info] o.r.Reflections - Reflections took 2330 ms to scan 121 urls, producing 7307 keys and 74572 values 
[info] module - Loading model class models.CaseTemplateModel
[info] module - Loading model class models.ArtifactModel
[info] module - Loading model class models.UserModel
[info] module - Loading model class models.JobModel
[info] module - Loading model class models.ReportTemplateModel
[info] module - Loading model class models.AuditModel
[info] module - Loading model class models.CaseModel
[info] module - Loading model class models.AnalyzerModel
[info] module - Loading model class connectors.misp.MispModel
[info] module - Loading model class org.elastic4play.services.DBListModel
[info] module - Loading model class org.elastic4play.services.AttachmentModel
[info] module - Loading model class models.TaskModel
[info] module - Loading model class models.LogModel
[warn] o.r.Reflections - could not create Dir using directory from url file:/root/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)
[warn] o.r.Reflections - 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:/root/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)
[info] o.r.Reflections - Reflections took 1834 ms to scan 121 urls, producing 7307 keys and 74572 values 
[warn] o.r.Reflections - could not create Dir using directory from url file:/root/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)
[warn] o.r.Reflections - 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:/root/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)
[info] o.r.Reflections - Reflections took 1529 ms to scan 121 urls, producing 7307 keys and 74572 values 
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[info] o.e.plugins - [Aurora] modules [], plugins [], sites []
[info] c.misp.MispSrv - Update of MISP events is starting ...
[info] c.misp.MispSrv - 0 MISP event(s) updated
[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode. Your application is not secure.
[error] p.a.l.c.CryptoConfigParser - To set the application secret, please read http://playframework.com/documentation/latest/ApplicationSecret
[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode. Your application is not secure.
[error] p.a.l.c.CryptoConfigParser - To set the application secret, please read http://playframework.com/documentation/latest/ApplicationSecret
[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode. Your application is not secure.
[error] p.a.l.c.CryptoConfigParser - To set the application secret, please read http://playframework.com/documentation/latest/ApplicationSecret
[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode. Your application is not secure.
[error] p.a.l.c.CryptoConfigParser - To set the application secret, please read http://playframework.com/documentation/latest/ApplicationSecret
[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode. Your application is not secure.
[error] p.a.l.c.CryptoConfigParser - To set the application secret, please read http://playframework.com/documentation/latest/ApplicationSecret
[error] p.a.l.c.CryptoConfigParser - The application secret has not been set, and we are in prod mode. Your application is not secure.
[error] p.a.l.c.CryptoConfigParser - To set the application secret, please read http://playframework.com/documentation/latest/ApplicationSecret
Oops, cannot start the server.
@7256h0jj2: Configuration error
        at play.api.libs.crypto.CryptoConfigParser.get$lzycompute(Crypto.scala:498)
        at play.api.libs.crypto.CryptoConfigParser.get(Crypto.scala:465)
        at play.api.libs.crypto.CryptoConfigParser.get(Crypto.scala:463)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
        at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
        at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
        at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:61)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
        at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
        at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
        at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
        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)

EDIT THIS TITLE BEFORE POSTING. Use this template for bug reports. If you'd like to request a feature, please be as descriptive as possible and delete the template except the first section (Request Type)

Request Type

(select Bug or Feature Request and remove this part)
Bug / Feature Request

Work Environment

Question Answer
OS version (server) Debian, Ubuntu, CentOS, RedHat, ...
OS version (client) XP, Seven, 10, Ubuntu, ...
TheHive version / git hash 2.x, hash of the commit
Package Type Docker, Binary, From source
Browser type & version If applicable

Problem Description

Describe the problem/bug as clearly as possible.

Steps to Reproduce

  1. step 1
  2. step 2
  3. step 3...

Possible Solutions

(keep this section if you have suggestions on how to solve the problem. Otherwise delete it)

Complementary information

(add anything that can help identifying the problem such as logs, screenshots, configuration dumps etc.)

@To-om
Copy link
Contributor

To-om commented Nov 18, 2016

Hi,

First, make sure that configuration file (/etc/thehive/application.conf) is present and contains, at least "play.crypto.secret" item. Otherwise, execute the command describe in 4.2. Configuration of install guide.

Second, service port is 9000/tcp. After starting TheHive, open http://127.0.0.1:9000/ in your browser.

Regards,

Thomas

@To-om To-om added the question label Nov 18, 2016
@jimbolya0607
Copy link
Author

Will try this - thanks!

@To-om To-om self-assigned this Nov 18, 2016
@jimbolya0607
Copy link
Author

So I had to make the /etc/thehive/application.conf file and put the "play.crypto.secret" in the file. Ran the command again and received the following:

root@Master-Hive-Controller-Bot:~/thehive# bin/thehive -Dconfig.file=/etc/thehive/application.conf
Oops, cannot start the server.
Configuration error: Configuration error[/etc/thehive/application.conf: 2: Key 'play.crypto.secret' may not be followed by token: end of file]

@To-om
Copy link
Contributor

To-om commented Nov 18, 2016

Your configuration file is not valid. Commands you've executes create a good initial configuration file.
Please remove the file and execute the commands again :

sudo rm -f /etc/thehive/application.conf
(cat << _EOF_
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
play.crypto.secret="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1)"
_EOF_
) | sudo tee -a /etc/thehive/application.conf

@jimbolya0607
Copy link
Author

Ok - I copy / paste that command and received no errors.
Checked the application.conf file and it looks like it was created correctly.
Rebooted.
Started ES
Started Hive
Went to localhost:9000
Received:

This site can’t be reached

localhost refused to connect.

@jimbolya0607
Copy link
Author

so I added Listen 9000 to ports.conf and restarted apache. i can now at least get to the default apache page from localhost over port 9000.

@To-om
Copy link
Contributor

To-om commented Nov 18, 2016

TheHive doesn't require apache !
Stop apache service, restart TheHive, then open your browser with http://127.0.0.1:9000/
If it doesn't work, post the log file (located in logs/application.log).

@jimbolya0607
Copy link
Author

yea - i can't find the log file. or any log file for that matter. did a search *.log and nothing returned.
odd? probably. couldn't find the pid for thehive either so just killed apache. not much of a change. i could maybe uninstall apache but that borks up the MISP instance i'm trying to get working as well lol. probably what i'm going to have to do is wipe this machine and start from scratch.

@jeromeleonard
Copy link
Contributor

Hello,

To be honest, we are a bit lost where it has failed in the installation process. For the moment we do not know if you faced a bug or a problem in our installation guide.

We understood that you planned to install and run TheHive from binaries.
To be able te do our best to understand the problem you faced and to help you, we invite you to restart the installation of TheHive following our existing installation guide step by step. We tried to make it as you just have to copy/paste command lines.

During the installation process, take copies/screenshots of problems you encounter and please open a thread in the forum. Please, join some details about, your OS, the JRE (Oracle or OpenJDK), if ElasticSearch is installed, configured and started properly (and which version), and the more important, the step in the process that fails. Also tell us in which directory do you choose to install TheHive (the install guide suggest it to be /opt but you can choose your own).

We also understood that you want to run MISP on the same machine. We suggest you to get one sofware work at a time.

Thank you.

@jimbolya0607
Copy link
Author

Yup - that's pretty much what I'm going to do. Will keep you posted. Going to slice each platform up into its own vm. Thanks for being available for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants