hashview / hashview-old

A web front-end for password cracking and analytics
http://www.hashview.io
GNU General Public License v3.0
619 stars 134 forks source link

Got error : “Internal Server Error” #376

Open stobre opened 6 years ago

stobre commented 6 years ago

Hi. I inserted about 170 million rows into table HASHES of database HASHVIEW, and then I visit https://127.0.0.1:4567/analytics, it takes a long time and the page shows "Internal Server Error". server log: 08:41:12 web.1 | 192.168.1.9 - - [27 nov/2017:08:41:12 +0800] "GET /analytics HTTP/1.1" 500 30 342.5436 08:41:12 web.1 | 192.168.1.9 - - [27 nov/2017:08:35:30 CST] "GET /analytics HTTP/1.1" 500 30

Could you help to figure it out. Thanks a lot!

i128 commented 6 years ago

Are these cracked or uncracked hashes? Also how much ram is in place on the system running hashview.

i128 commented 6 years ago

If possible re-run hashview in dev mode:

RACK_ENV=development rake db:setup

Update config/database.hml

RACK_ENV=development foreman start

And then try re-importing and calling the analytics page. In development, a new DB will be created and shouldnt overwrite any existing hashes used in prod. This should provide a more detailed error message. Also if the 150 million records are public, let me know what set they are and i'll try running similar load tests.

wfsunwj commented 6 years ago

These are cracked hashes. system ram is 64GB

i128 commented 6 years ago

Do any of the cracked results contain a non English characters or symbols?

wfsunwj commented 6 years ago

cracked results does not contain non-english characters. Include only a-zA-Z0-9. analytics.rb have a SQL: SELECT a.username, h.plaintext FROM hashes h LEFT JOIN hashfilehashes a on h.id = a.hash_id LEFT JOIN hashfiles f on a.hashfile_id = f.id WHERE (h.cracked = 1) This results is 170 million?

i128 commented 6 years ago

Im attempting to pull down a hashfile of similar or larger size for testing, in the meantime, (if you dont want to run in development mode), could you try enabling debugging by modifying the Procfile in the project home directory by changing the last entry from: web: ruby ./hashview.rb to web: ruby -d ./hashview.rb

Then restart hashview, view the analytics page, and see if any more verbose error messages are displayed.

wfsunwj commented 6 years ago

modified the profile:web: ruby -d ./hashview.rb restart hashview:RACK_ENV=development foreman start server log: 14:15:38 web.1 | /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/openssl/ssl.rb:290: warning: using default DH parameters. 14:15:38 web.1 | /usr/local/rvm/gems/ruby-2.2.2/gems/sinatra-flash-0.3.0/lib/sinatra/flash.rb:15: warning: instance variable @flash not initialized 14:15:38 web.1 | 127.0.0.1 - - [27/Nov/2017:14:15:38 +0800] "POST /v1/agents/0cea5500-cc00-0000-b000-bb9946644000/heartbeat HTTP/1.1" 200 47 0.0030 14:15:38 web.1 | localhost - - [27/Nov/2017:14:15:38 CST] "POST /v1/agents/0cea5500-cc00-0000-b000-bb9946644000/heartbeat HTTP/1.1" 200 47 14:15:38 web.1 | - -> /v1/agents/0cea5500-cc00-0000-b000-bb9946644000/heartbeat 14:15:38 web.1 | Exception EOFError' at /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/openssl/buffering.rb:61 - end of file reached 14:15:38 web.1 | ExceptionWEBrick::HTTPStatus::EOFError' at /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError

i128 commented 6 years ago

Those error messages are "normal" (or more specifically, unrelated), are there anything else beyond that?

wfsunwj commented 6 years ago

Except for the "Internal Server Error", there is no error message, so i have to delete the "analytics"