Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Got error : “Internal Server Error” #376

Open
stobre opened this issue Nov 27, 2017 · 9 comments
Open

Got error : “Internal Server Error” #376

stobre opened this issue Nov 27, 2017 · 9 comments

Comments

@stobre
Copy link

stobre commented Nov 27, 2017

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
Copy link
Contributor

i128 commented Nov 27, 2017

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

@i128
Copy link
Contributor

i128 commented Nov 27, 2017

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
Copy link

wfsunwj commented Nov 27, 2017

These are cracked hashes. system ram is 64GB

@i128
Copy link
Contributor

i128 commented Nov 27, 2017

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

@wfsunwj
Copy link

wfsunwj commented Nov 27, 2017

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
Copy link
Contributor

i128 commented Nov 27, 2017

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
Copy link

wfsunwj commented Nov 27, 2017

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 | Exception WEBrick::HTTPStatus::EOFError' at /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:80 - WEBrick::HTTPStatus::EOFError

@i128
Copy link
Contributor

i128 commented Nov 27, 2017

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

@wfsunwj
Copy link

wfsunwj commented Dec 7, 2017

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

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

No branches or pull requests

3 participants