Error in running the code for requesting a certificate


#1

Can someone help me with the root cause of the error. I created a new bitcoin identity and filled in all the fields. After clicking the submit button, i got this error. Please help. Is it because the database is not initialised or something?

from flask.ext.themes2 import (Themes)
2017-07-20 17:38:01,562 - cert_viewer - INFO - Configured a file system certificate store with path=cert_data
2017-07-20 17:38:02,190 - werkzeug - INFO - * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
2017-07-20 17:38:20,679 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:20] “GET / HTTP/1.1” 200 -
2017-07-20 17:38:21,108 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:21] “GET /_themes/default/css/style.css HTTP/1.1” 304 -
2017-07-20 17:38:21,110 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:21] “GET /_themes/default/css/index.css HTTP/1.1” 304 -
2017-07-20 17:38:21,113 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:21] “GET /_themes/default/css/faq.css HTTP/1.1” 304 -
2017-07-20 17:38:21,140 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:21] “GET /static/js/verification.js HTTP/1.1” 304 -
2017-07-20 17:38:21,268 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:21] “GET /_themes/default/img/logo.png HTTP/1.1” 304 -
2017-07-20 17:38:21,270 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:21] “GET /_themes/default/img/favicon.ico HTTP/1.1” 304 -
2017-07-20 17:38:29,041 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:29] “GET /request HTTP/1.1” 200 -
2017-07-20 17:38:29,310 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:29] “GET /_themes/default/css/request.css HTTP/1.1” 304 -
2017-07-20 17:38:29,313 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:29] “GET /static/js/register.js HTTP/1.1” 304 -
2017-07-20 17:38:29,315 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:29] “GET /static/img/logo.png HTTP/1.1” 304 -
2017-07-20 17:38:29,366 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:29] “GET /_themes/default/img/radio.png HTTP/1.1” 304 -
2017-07-20 17:38:45,002 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:45] “GET /_themes/default/img/radio-selected.png HTTP/1.1” 304 -
2017-07-20 17:38:52,693 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /bitcoinkeys HTTP/1.1” 200 -
2017-07-20 17:38:52,743 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /_themes/default/css/keys.css HTTP/1.1” 304 -
2017-07-20 17:38:52,752 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /static/js/dist/dotdotdot.js HTTP/1.1” 304 -
2017-07-20 17:38:52,820 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /static/js/dist/bitcoinjs.min.js HTTP/1.1” 304 -
2017-07-20 17:38:52,821 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /static/js/dist/qrcode.min.js HTTP/1.1” 304 -
2017-07-20 17:38:52,822 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /static/js/dist/clipboard.min.js HTTP/1.1” 304 -
2017-07-20 17:38:52,824 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /static/js/bitcoinkeys.js HTTP/1.1” 304 -
2017-07-20 17:38:52,825 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:38:52] “GET /static/js/print.js HTTP/1.1” 304 -
2017-07-20 17:39:14,828 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:39:14] “GET /request?identity=true&address=1MaqBJC3TPeCms8X9s2W4tcJ77W1fjC4Hv HTTP/1.1” 200 -
2017-07-20 17:40:04,843 - root - ERROR - Unhandled Exception: localhost:27017: [Errno 111] Connection refused
Traceback (most recent call last):
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1612, in full_dispatch_request
rv = self.dispatch_request()
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/views.py”, line 84, in view
return self.dispatch_request(*args, **kwargs)
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/views.py”, line 149, in dispatch_request
return meth(*args, **kwargs)
File “/root/cert-viewer/cert_viewer/views/request_view.py”, line 21, in post
introduction_store_bridge.insert_introduction(user_data)
File “/root/cert-viewer/cert_viewer/introduction_store_bridge.py”, line 11, in insert_introduction
intro_store.insert(introduction)
File “/root/cert-viewer/cert_viewer/introduction_store_bridge.py”, line 6, in insert
self.intro_db.introductions.insert_one(intro)
File “/root/blockchain certificates/lib/python3.5/site-packages/pymongo/collection.py”, line 654, in insert_one
with self._socket_for_writes() as sock_info:
File “/usr/lib/python3.5/contextlib.py”, line 59, in enter
return next(self.gen)
File “/root/blockchain certificates/lib/python3.5/site-packages/pymongo/mongo_client.py”, line 823, in _get_socket
server = self._get_topology().select_server(selector)
File “/root/blockchain certificates/lib/python3.5/site-packages/pymongo/topology.py”, line 214, in select_server
address))
File “/root/blockchain certificates/lib/python3.5/site-packages/pymongo/topology.py”, line 189, in select_servers
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
2017-07-20 17:40:04,941 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:40:04] “POST /request?identity=true&address=1MaqBJC3TPeCms8X9s2W4tcJ77W1fjC4Hv HTTP/1.1” 500 -
2017-07-20 17:40:04,992 - root - ERROR - Page not found: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Traceback (most recent call last):
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1612, in full_dispatch_request
rv = self.dispatch_request()
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1590, in dispatch_request
self.raise_routing_exception(req)
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1573, in raise_routing_exception
raise request.routing_exception
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/ctx.py”, line 294, in match_request
self.url_adapter.match(return_rule=True)
File “/root/blockchain certificates/lib/python3.5/site-packages/werkzeug/routing.py”, line 1573, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2017-07-20 17:40:05,006 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:40:05] “GET /favicon.ico HTTP/1.1” 404 -
2017-07-20 17:40:05,009 - root - ERROR - Page not found: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Traceback (most recent call last):
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1612, in full_dispatch_request
rv = self.dispatch_request()
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1590, in dispatch_request
self.raise_routing_exception(req)
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/app.py”, line 1573, in raise_routing_exception
raise request.routing_exception
File “/root/blockchain certificates/lib/python3.5/site-packages/flask/ctx.py”, line 294, in match_request
self.url_adapter.match(return_rule=True)
File “/root/blockchain certificates/lib/python3.5/site-packages/werkzeug/routing.py”, line 1573, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2017-07-20 17:40:05,010 - werkzeug - INFO - 127.0.0.1 - - [20/Jul/2017 17:40:05] “GET /favicon.ico HTTP/1.1” 404 -

Process finished with exit code 0


#2

Did you run the steps in “Advanced: Docker Setup”? This is the easiest way to enable certificate requests. The docker image initializes a mongodb instance that will be used to store the requests.

Thanks,
Kim