olacabs / jackhammer

Jackhammer - One Security vulnerability assessment/management tool to solve all the security team problems.
https://jch.olacabs.com/userguide
Other
718 stars 162 forks source link

Can't Access Jackhammer - Error: We're sorry, but something went wrong. If you are the application owner check the logs for more information. #23

Closed sidheshenator closed 7 years ago

sidheshenator commented 7 years ago

I was able to access jackhammer. However, now I am getting an error

We're sorry, but something went wrong.

If you are the application owner check the logs for more information.

when I try to access it via Chrome over port 5000.

Here are the logs -

root@jackhammer-nginx:/home/sidheshenator/jackhammer# docker-compose up -d
Creating network "jackhammer_default" with the default driver
Creating jackhammer_redis_1 ... 
Creating jackhmmaer-db ... 
Creating jackhammer_redis_1
Creating jackhammer_redis_1 ... done
Creating jackhammer_web_1 ... 
Creating jackhammer_web_1 ... done
root@jackhammer-nginx:/home/sidheshenator/jackhammer# docker-compose logs
Attaching to jackhammer_web_1, jackhmmaer-db, jackhammer_redis_1
web_1      | Puma starting in single mode...
web_1      | * Version 2.14.0 (ruby 2.3.0-p0), codename: Fuchsia Friday
web_1      | * Min threads: 0, max threads: 16
web_1      | * Environment: production
web_1      | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:458: warning: already initialized constant Readline::HISTORY
web_1      | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:486: warning: already initialized constant Readline::FILENAME_COMPLETION_PROC
web_1      | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:517: warning: already initialized constant Readline::USERNAME_COMPLETION_PROC
web_1      | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:523: warning: already initialized constant Readline::VERSION
web_1      | * Listening on tcp://0.0.0.0:3000
web_1      | Use Ctrl-C to stop
jackhmmaer-db | Initializing database
jackhmmaer-db | 2017-05-17T17:07:52.470795Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
jackhmmaer-db | 2017-05-17T17:07:58.157026Z 0 [Warning] InnoDB: New log files created, LSN=45790
jackhmmaer-db | 2017-05-17T17:07:58.879713Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
jackhmmaer-db | 2017-05-17T17:07:58.981477Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 60ab2d86-3b23-11e7-a9f2-0242ac120003.
jackhmmaer-db | 2017-05-17T17:07:58.990931Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
jackhmmaer-db | 2017-05-17T17:07:58.991685Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
jackhmmaer-db | 2017-05-17T17:08:01.389731Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:01.389836Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:01.389887Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:01.389913Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:01.389977Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | Database initialized
jackhmmaer-db | Initializing certificates
jackhmmaer-db | Generating a 2048 bit RSA private key
jackhmmaer-db | .....................................................................................................+++
jackhmmaer-db | ........................................................................................................................+++
jackhmmaer-db | unable to write 'random state'
jackhmmaer-db | writing new private key to 'ca-key.pem'
jackhmmaer-db | -----
jackhmmaer-db | Generating a 2048 bit RSA private key
jackhmmaer-db | ..............................................................+++
jackhmmaer-db | ........+++
jackhmmaer-db | unable to write 'random state'
jackhmmaer-db | writing new private key to 'server-key.pem'
jackhmmaer-db | -----
jackhmmaer-db | Generating a 2048 bit RSA private key
jackhmmaer-db | .......+++
jackhmmaer-db | .+++
jackhmmaer-db | unable to write 'random state'
jackhmmaer-db | writing new private key to 'client-key.pem'
jackhmmaer-db | -----
jackhmmaer-db | Certificates initialized
jackhmmaer-db | MySQL init process in progress...
jackhmmaer-db | 2017-05-17T17:08:06.304582Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
jackhmmaer-db | 2017-05-17T17:08:06.306298Z 0 [Note] mysqld (mysqld 5.7.18) starting as process 135 ...
jackhmmaer-db | 2017-05-17T17:08:06.318166Z 0 [Note] InnoDB: PUNCH HOLE support available
jackhmmaer-db | 2017-05-17T17:08:06.318234Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
jackhmmaer-db | 2017-05-17T17:08:06.318254Z 0 [Note] InnoDB: Uses event mutexes
jackhmmaer-db | 2017-05-17T17:08:06.318270Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
jackhmmaer-db | 2017-05-17T17:08:06.318300Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
jackhmmaer-db | 2017-05-17T17:08:06.318316Z 0 [Note] InnoDB: Using Linux native AIO
jackhmmaer-db | 2017-05-17T17:08:06.318698Z 0 [Note] InnoDB: Number of pools: 1
jackhmmaer-db | 2017-05-17T17:08:06.318932Z 0 [Note] InnoDB: Using CPU crc32 instructions
jackhmmaer-db | 2017-05-17T17:08:06.322017Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
jackhmmaer-db | 2017-05-17T17:08:06.344603Z 0 [Note] InnoDB: Completed initialization of buffer pool
jackhmmaer-db | 2017-05-17T17:08:06.346698Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
jackhmmaer-db | 2017-05-17T17:08:06.358406Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
jackhmmaer-db | 2017-05-17T17:08:06.405283Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
jackhmmaer-db | 2017-05-17T17:08:06.405455Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
jackhmmaer-db | 2017-05-17T17:08:06.998775Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
jackhmmaer-db | 2017-05-17T17:08:06.999770Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
jackhmmaer-db | 2017-05-17T17:08:06.999819Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
jackhmmaer-db | 2017-05-17T17:08:07.000677Z 0 [Note] InnoDB: Waiting for purge to start
jackhmmaer-db | MySQL init process in progress...
jackhmmaer-db | 2017-05-17T17:08:07.050849Z 0 [Note] InnoDB: 5.7.18 started; log sequence number 2536227
jackhmmaer-db | 2017-05-17T17:08:07.052416Z 0 [Note] Plugin 'FEDERATED' is disabled.
jackhmmaer-db | 2017-05-17T17:08:07.061730Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
redis_1    | 1:C 17 May 17:07:52.352 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1    |                 _._                                                  
redis_1    |            _.-``__ ''-._                                             
redis_1    |       _.-``    `.  `_.  ''-._           Redis 3.2.8 (00000000/0) 64 bit
redis_1    |   .-`` .-```.  ```\/    _.,_ ''-._                                   
redis_1    |  (    '      ,       .-`  | `,    )     Running in standalone mode
redis_1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1    |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1    |   `-._    `-._  `-./  _.-'    _.-'                                   
redis_1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
redis_1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1    |  |    `-._`-._        _.-'_.-'    |                                  
redis_1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1    |       `-._    `-.__.-'    _.-'                                       
redis_1    |           `-._        _.-'                                           
redis_1    |               `-.__.-'                                               
redis_1    | 
redis_1    | 1:M 17 May 17:07:52.358 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1    | 1:M 17 May 17:07:52.358 # Server started, Redis version 3.2.8
redis_1    | 1:M 17 May 17:07:52.358 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1    | 1:M 17 May 17:07:52.358 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1    | 1:M 17 May 17:07:52.358 * The server is now ready to accept connections on port 6379
jackhmmaer-db | 2017-05-17T17:08:07.061923Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
jackhmmaer-db | 2017-05-17T17:08:07.063556Z 0 [Warning] CA certificate ca.pem is self signed.
jackhmmaer-db | 2017-05-17T17:08:07.067612Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170517 17:08:07
jackhmmaer-db | 2017-05-17T17:08:07.077350Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:07.077419Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:07.077487Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:07.077512Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:07.078954Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:07.090918Z 0 [Note] Event Scheduler: Loaded 0 events
jackhmmaer-db | 2017-05-17T17:08:07.095283Z 0 [Note] mysqld: ready for connections.
jackhmmaer-db | Version: '5.7.18'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
jackhmmaer-db | 2017-05-17T17:08:07.095324Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 
jackhmmaer-db | 2017-05-17T17:08:07.095339Z 0 [Note] Beginning of list of non-natively partitioned tables
jackhmmaer-db | 2017-05-17T17:08:07.116407Z 0 [Note] End of list of non-natively partitioned tables
jackhmmaer-db | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
jackhmmaer-db | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
jackhmmaer-db | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
jackhmmaer-db | 2017-05-17T17:08:16.293286Z 5 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:16.293363Z 5 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:16.293394Z 5 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:16.293425Z 5 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:16.293465Z 5 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | mysql: [Warning] Using a password on the command line interface can be insecure.
jackhmmaer-db | mysql: [Warning] Using a password on the command line interface can be insecure.
jackhmmaer-db | ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'root'@'%'
jackhmmaer-db | 2017-05-17T17:08:17.390571Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
jackhmmaer-db | 2017-05-17T17:08:17.397958Z 0 [Note] mysqld (mysqld 5.7.18) starting as process 1 ...
jackhmmaer-db | 2017-05-17T17:08:17.404950Z 0 [Note] InnoDB: PUNCH HOLE support available
jackhmmaer-db | 2017-05-17T17:08:17.404998Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
jackhmmaer-db | 2017-05-17T17:08:17.405015Z 0 [Note] InnoDB: Uses event mutexes
jackhmmaer-db | 2017-05-17T17:08:17.405028Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
jackhmmaer-db | 2017-05-17T17:08:17.405039Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
jackhmmaer-db | 2017-05-17T17:08:17.405049Z 0 [Note] InnoDB: Using Linux native AIO
jackhmmaer-db | 2017-05-17T17:08:17.405382Z 0 [Note] InnoDB: Number of pools: 1
jackhmmaer-db | 2017-05-17T17:08:17.405569Z 0 [Note] InnoDB: Using CPU crc32 instructions
jackhmmaer-db | 2017-05-17T17:08:17.411998Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
jackhmmaer-db | 2017-05-17T17:08:17.428654Z 0 [Note] InnoDB: Completed initialization of buffer pool
jackhmmaer-db | 2017-05-17T17:08:17.430583Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
jackhmmaer-db | 2017-05-17T17:08:17.442119Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
jackhmmaer-db | 2017-05-17T17:08:17.443012Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 2536246
jackhmmaer-db | 2017-05-17T17:08:17.838749Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 7778816
jackhmmaer-db | 2017-05-17T17:08:18.299873Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 6861312
jackhmmaer-db | 2017-05-17T17:08:18.729194Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 12104192
jackhmmaer-db | 2017-05-17T17:08:18.732651Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 12140172
jackhmmaer-db | 2017-05-17T17:08:18.738714Z 0 [Note] InnoDB: Database was not shutdown normally!
jackhmmaer-db | 2017-05-17T17:08:18.738756Z 0 [Note] InnoDB: Starting crash recovery.
jackhmmaer-db | 2017-05-17T17:08:18.763259Z 0 [Note] InnoDB: Starting an apply batch of log records to the database...
jackhmmaer-db | InnoDB: Progress in percent: 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
jackhmmaer-db | 2017-05-17T17:08:19.459747Z 0 [Note] InnoDB: Apply batch completed
jackhmmaer-db | 2017-05-17T17:08:19.562983Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
jackhmmaer-db | 2017-05-17T17:08:19.563074Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
jackhmmaer-db | 2017-05-17T17:08:19.563145Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
jackhmmaer-db | 2017-05-17T17:08:20.151328Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
jackhmmaer-db | 2017-05-17T17:08:20.152290Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
jackhmmaer-db | 2017-05-17T17:08:20.152335Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
jackhmmaer-db | 2017-05-17T17:08:20.153275Z 0 [Note] InnoDB: Waiting for purge to start
jackhmmaer-db | 2017-05-17T17:08:20.204397Z 0 [Note] InnoDB: 5.7.18 started; log sequence number 12140172
jackhmmaer-db | 2017-05-17T17:08:20.205410Z 0 [Note] Plugin 'FEDERATED' is disabled.
jackhmmaer-db | 2017-05-17T17:08:20.219550Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
jackhmmaer-db | 2017-05-17T17:08:20.220789Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170517 17:08:20
jackhmmaer-db | 2017-05-17T17:08:20.229391Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
jackhmmaer-db | 2017-05-17T17:08:20.246909Z 0 [Warning] CA certificate ca.pem is self signed.
jackhmmaer-db | 2017-05-17T17:08:20.249286Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
jackhmmaer-db | 2017-05-17T17:08:20.249360Z 0 [Note] IPv6 is available.
jackhmmaer-db | 2017-05-17T17:08:20.249384Z 0 [Note]   - '::' resolves to '::';
jackhmmaer-db | 2017-05-17T17:08:20.249434Z 0 [Note] Server socket created on IP: '::'.
jackhmmaer-db | 2017-05-17T17:08:20.348541Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:20.348572Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:20.348590Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:20.348599Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:20.353324Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
jackhmmaer-db | 2017-05-17T17:08:20.402172Z 0 [Note] Event Scheduler: Loaded 0 events
jackhmmaer-db | 2017-05-17T17:08:20.410779Z 0 [Note] mysqld: ready for connections.
jackhmmaer-db | Version: '5.7.18'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
jackhmmaer-db | 2017-05-17T17:08:20.410818Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 
jackhmmaer-db | 2017-05-17T17:08:20.410832Z 0 [Note] Beginning of list of non-natively partitioned tables
jackhmmaer-db | 2017-05-17T17:08:20.452223Z 0 [Note] End of list of non-natively partitioned tables

Some more container information -

root@jackhammer-nginx:/home/sidheshenator/jackhammer# docker ps --all
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS                     NAMES
f78ac7d70dc4        jackhammer_web      "bash -c 'mkdir -p..."   5 minutes ago       Up 5 minutes               0.0.0.0:5000->3000/tcp    jackhammer_web_1
66ea6be2fa1e        mysql               "docker-entrypoint..."   5 minutes ago       Up 5 minutes (unhealthy)   0.0.0.0:3306->3306/tcp    jackhmmaer-db
cb0bd58fd1e2        redis               "docker-entrypoint..."   5 minutes ago       Up 5 minutes               0.0.0.0:32783->6379/tcp   jackhammer_redis_1
root@jackhammer-nginx:/home/sidheshenator/jackhammer# 
sidheshenator commented 7 years ago

I removed all the associated container, volumes, networks and re-built it. It somehow worked.