Repository: TheHive-Project/TheHive

Issue #95: docker image: $.post(...).success is not a function
Created: 2017-01-18T13:39:20Z
Request Type
Bug
Work Environment



Question
Answer




OS version (server)
Ubuntu


OS version (client)
16.10


TheHive version / git hash
certbdf/thehive:latest


Package Type
Docker


Browser type & version
firefox 50, chrome 55



Problem Description
When i try to start up thehive via docker ( sudo docker run --rm --publish 127.0.0.1:9000:9000 --volume $PWD/thehive:/data certbdf/thehive:latest ) and open the URL i get an empty screen.
The Error console in the browser shows:
Error: a.post(...).success is not a function
    at Object.requestStream (http://localhost:9000/scripts/scripts.ddd215ef.js:3:24364)
    at Object.init (http://localhost:9000/scripts/scripts.ddd215ef.js:3:23307)
    at new <anonymous> (http://localhost:9000/scripts/scripts.ddd215ef.js:1:9179)
    at Object.h [as instantiate] (http://localhost:9000/scripts/vendor.8c6bb835.js:5:6891)
    at http://localhost:9000/scripts/vendor.8c6bb835.js:6:1757
    at Object.<anonymous> (http://localhost:9000/scripts/vendor.8c6bb835.js:18:11709)
    at http://localhost:9000/scripts/vendor.8c6bb835.js:4:22589
    at va (http://localhost:9000/scripts/vendor.8c6bb835.js:5:28772)
    at n (http://localhost:9000/scripts/vendor.8c6bb835.js:5:21089)
    at g (http://localhost:9000/scripts/vendor.8c6bb835.js:

Steps to Reproduce

mkdir thehive; chmod 777 thehive
sudo docker run --rm --publish 127.0.0.1:9000:9000 --volume $PWD/thehive:/data
firefox localhost:9000

Complementary information
docker startup log
[2017-01-18 13:29:21,218][INFO ][node                     ] [Radion the Atomic Man] version[2.3.5], pid[7], build[90f439f/2016-07-27T10:36:52Z]
[2017-01-18 13:29:21,220][INFO ][node                     ] [Radion the Atomic Man] initializing ...
[2017-01-18 13:29:22,215][INFO ][plugins                  ] [Radion the Atomic Man] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2017-01-18 13:29:22,257][INFO ][env                      ] [Radion the Atomic Man] using [1] data paths, mounts [[/data (/dev/sda1)]], net usable_space [604.1gb], net total_space [961.7gb], spins? [possibly], types [ext4]
[2017-01-18 13:29:22,257][INFO ][env                      ] [Radion the Atomic Man] heap size [990.7mb], compressed ordinary object pointers [true]
[2017-01-18 13:29:25,767][INFO ][node                     ] [Radion the Atomic Man] initialized
[2017-01-18 13:29:25,767][INFO ][node                     ] [Radion the Atomic Man] starting ...
[2017-01-18 13:29:25,858][INFO ][transport                ] [Radion the Atomic Man] publish_address {172.17.0.2:9300}, bound_addresses {[::]:9300}
[2017-01-18 13:29:25,864][INFO ][discovery                ] [Radion the Atomic Man] hive/9ozGnevWQD-uy6kga54x1A
[info] o.r.Reflections - Reflections took 4950 ms to scan 122 urls, producing 7307 keys and 74845 values 
[info] module - Loading model class org.elastic4play.services.DBListModel
[info] module - Loading model class models.ArtifactModel
[info] module - Loading model class connectors.misp.MispModel
[info] module - Loading model class models.CaseTemplateModel
[info] module - Loading model class org.elastic4play.services.AttachmentModel
[info] module - Loading model class models.UserModel
[info] module - Loading model class models.ReportTemplateModel
[info] module - Loading model class models.AuditModel
[info] module - Loading model class models.JobModel
[info] module - Loading model class models.AnalyzerModel
[info] module - Loading model class models.LogModel
[info] module - Loading model class models.CaseModel
[info] module - Loading model class models.TaskModel
[2017-01-18 13:29:28,941][INFO ][cluster.service          ] [Radion the Atomic Man] new_master {Radion the Atomic Man}{9ozGnevWQD-uy6kga54x1A}{172.17.0.2}{172.17.0.2:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2017-01-18 13:29:28,974][INFO ][http                     ] [Radion the Atomic Man] publish_address {172.17.0.2:9200}, bound_addresses {[::]:9200}
[2017-01-18 13:29:28,975][INFO ][node                     ] [Radion the Atomic Man] started
[2017-01-18 13:29:29,007][INFO ][gateway                  ] [Radion the Atomic Man] recovered [0] indices into cluster_state
[info] o.r.Reflections - Reflections took 3309 ms to scan 122 urls, producing 7307 keys and 74845 values 
[info] o.r.Reflections - Reflections took 2726 ms to scan 122 urls, producing 7307 keys and 74845 values 
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[info] o.e.plugins - [the Living Darkness Null] modules [], plugins [], sites []
[info] c.misp.MispSrv - Update of MISP events is starting ...
[info] c.misp.MispSrv - 0 MISP event(s) updated
[info] play.api.Play - Application started (Prod)
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

Duplicate issue #94: Error during systemctl start thehive
Created: 2017-01-18T08:50:32Z
Request Type
Bug / Feature Request
Work Environment



Question
Answer




OS version (server)
CentOS


https://github.com/CERT-BDF/TheHive/issues/new



TheHive version / git hash
2.x, hash of the commit


Package Type
From source


Browser type & version
If applicable



Problem Description
Hello, my log file of the service "thehive" hangs after the line :
"p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000"
The output of the comand "curl -v http://127.0.0.1:9000" is:
About to connect() to 127.0.0.1 port 9000 (#0)
Trying 127.0.0.1...
Connected to 127.0.0.1 (127.0.0.1) port 9000 (#0)
GET / HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:9000
Accept: /
HTTP/1.1 303 See Other
Location: /index.html
Content-Length: 0
Date: Wed, 18 Jan 2017 08:40:25 GMT
Connection #0 to host 127.0.0.1 left intact

And I have any error message in ElasticSearch!
Thank you for your help!
Complementary information
Log file:
>Jan 18 08:54:45 localhost systemd: Started TheHive.
Jan 18 08:54:45 localhost systemd: Starting TheHive...
Jan 18 08:54:54 localhost thehive: [info] o.r.Reflections - Reflections took 4177 ms to scan 122 urls, producing 7228 keys and 74304 values
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class org.elastic4play.services.DBListModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.CaseModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.ReportTemplateModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.ArtifactModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.JobModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.CaseTemplateModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class connectors.misp.MispModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.TaskModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.AuditModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.AnalyzerModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.UserModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class org.elastic4play.services.AttachmentModel
Jan 18 08:54:54 localhost thehive: [info] module - Loading model class models.LogModel
Jan 18 08:54:57 localhost thehive: [info] o.r.Reflections - Reflections took 3383 ms to scan 122 urls, producing 7228 keys and 74304 values
Jan 18 08:55:01 localhost thehive: [info] o.r.Reflections - Reflections took 3376 ms to scan 122 urls, producing 7228 keys and 74304 values
Jan 18 08:55:02 localhost thehive: [info] a.e.s.Slf4jLogger - Slf4jLogger started
Jan 18 08:55:02 localhost thehive: [info] o.e.plugins - [Nick Fury] modules [], plugins [], sites []
Jan 18 08:55:03 localhost thehive: [info] c.misp.MispSrv - Update of MISP events is starting ...
Jan 18 08:55:03 localhost thehive: [info] c.misp.MispSrv - 0 MISP event(s) updated
Jan 18 08:55:04 localhost thehive: [info] play.api.Play - Application started (Prod)
Jan 18 08:55:04 localhost thehive: [info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

Closing comment (2017-01-18T20:15:04Z): After reading another issue I've found that my problem is related to #95 as I have that error in my browser console. After checking my version of Angular I do indeed have the 1.6.1 requirement. Utilizing the bower.json from the release/2.10.0 branch before executing bin/activatior clean stage solved my issue.