infobyte / faraday

Open Source Vulnerability Management Platform
https://www.faradaysec.com
GNU General Public License v3.0
5.05k stars 914 forks source link

"Faraday has lost connection to CouchDB" upon selecting bug bounty workspace #101

Closed Sir-Fancy closed 8 years ago

Sir-Fancy commented 8 years ago

I get the following errors when selecting a bug bounty workspace: The top-most window:

    Exception: 
    Traceback: Traceback (most recent call last):
  File "/usr/share/python-faraday/utils/error_report.py", line 131, in run_with_except_hook
    run_old(*args, **kw)
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/share/python-faraday/gui/gtk/application.py", line 558, in background_process
    workspace = ws.name
AttributeError: 'NoneType' object has no attribute 'name'

    Identifier: 404dfd3495c06b1560418716a4225d4edc1357034d1a326024bdac84b2798cbe
    Versions: OS: Kali kali-rolling kali-rolling,
              Faraday Version: 1.0.22
              Python Versions: Python 2.7.12 
 Modules: [  ]

The window underneath: http://i.imgur.com/M1pOvtF.png

Any idea what's going on?

joaquinlpereyra commented 8 years ago

Hello @Sir-Fancy!

We're going to try to reproduce this and get back to you. Thanks for the report!

joaquinlpereyra commented 8 years ago

@Sir-Fancy This may be a problem with Couch DB versions. What version are you using? Thanks for the feedback!

Sir-Fancy commented 8 years ago

My version of CouchDB is 1.6.2~20151123-0kali2. Everything is up to date. I actually just wiped my VM and started over since I had a problem with my drive, so this is from a fresh install (plus apt-get update && apt-get upgrade)

Also, not sure if this is related, but Kali didn't come with a ~/.faraday directory, so I had to clone the repo and grab the data directory from there.

joaquinlpereyra commented 8 years ago

@Sir-Fancy OK, we'll look into this problem with the databases.

As for the ~/.faraday directory. Did you install Faraday with the repos? Did you get to start Faraday at least once? The folder is created on startup. We are aware of a bug where icons weren't correctly copied to ~/.faraday/images/icons and it will be fixed in the in the next version. Was this related to this?

Sir-Fancy commented 8 years ago

I'm using the already installed version bundled with Kali, and after starting it once, the ~/.faraday directory did not show up. Is there anything I can do as a temporary fix for the couchdb problem?

joaquinlpereyra commented 8 years ago

Hey @Sir-Fancy! Good news. Our previous hypothesis was wrong, and apparently this is really easy to fix. Did you check the owner user and group when moving the bugbounty DB to /var/lib?

To fix this, just change the owner user and owner group to couchdb:daemon, for example with sudo chown couchdb:daemon /var/lib/couchdb/facebook.couch, if you were using the facebook database. If your CouchDB user or group differs, adapt the command accordingly.

We'll add this step to our documentation ASAP, as we've now realized it is missing. Thank you very much! And we'll look into the ~/.faraday folder thing too!

Cheers!

Sir-Fancy commented 8 years ago

What do ya know, it works! Great idea, would not have thought of that. Keep up the great work guys!