Rhizome-Conifer / conifer

Collect and revisit web pages.
https://conifer.rhizome.org
Apache License 2.0
1.49k stars 120 forks source link

Unable to start webrecorder / shepherd because proxy-certs/webrecorder-ca.pem is missing #373

Open kelvinhammond opened 7 years ago

kelvinhammond commented 7 years ago

I followed the instructions in the README.md for docker-compose. I saw these errors when checking the docker logs webrecorder_app_1

I assume these certs need to be generated. I'll try that but can the webrecorder or dockerfile be updated add exact commands to README.md or have the webrecorder do it automatically?

2017-06-27 14:41:32,452: [DEBUG]:                                                                                                                                                                                  
2017-06-27 14:41:32,836: [DEBUG]: Starting new HTTP connection (1): shepherd                                                                                                                                       
2017-06-27 14:41:33,152: [DEBUG]: http://shepherd:9020 "GET /api/browsers/browsers HTTP/1.1" 200 2                                                                                                                 
Traceback (most recent call last):                                                                                                                                                                                 
  File "./webrecorder/main.py", line 9, in <module>                                                                                                                                                                
    application = AppController().app                                                                                                                                                                              
  File "./webrecorder/appcontroller.py", line 126, in __init__                                                                                                                                                     
    proxy_options=self._get_proxy_options())                                                                                                                                                                       
  File "/usr/local/lib/python3.5/site-packages/wsgiprox/wsgiprox.py", line 356, in __init__                                                                                                                        
    cert_not_before=-3600)                                                                                                                                                                                         
  File "/usr/local/lib/python3.5/site-packages/certauth/certauth.py", line 73, in __init__                                                                                                                         
    res = self.load_root_ca_cert(overwrite=overwrite)                                                                                                                                                              
  File "/usr/local/lib/python3.5/site-packages/certauth/certauth.py", line 95, in load_root_ca_cert                                                                                                                
    self.ca_file_cache[ROOT_CA] = cert_str                                                                                                                                                                         
  File "/usr/local/lib/python3.5/site-packages/certauth/certauth.py", line 276, in __setitem__                                                                                                                     
    with open(filename, 'wb') as fh:
PermissionError: [Errno 13] Permission denied: './proxy-certs/webrecorder-ca.pem'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
kelvinhammond commented 7 years ago

A quick fix: chown -R 1000:1000 <the whole git repo> seems to work.

I do not recommend doing this.

ikreymer commented 7 years ago

What OS are you running WR on? We generally run/test on Ubuntu, and seems that the permissions work as expected with Docker on Ubuntu, but maybe not on other distros. Will take a look.

kelvinhammond commented 7 years ago

I'm running on archlinux. I've had a few other docker containers do this too, changing he permissions seems to fix this.