infobyte / faraday

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

the server can be run successfully,but the client not #109

Closed kerlingcode closed 8 years ago

kerlingcode commented 8 years ago

i have install all the lib about server . it run successfully and the same as couchdb, i do it as the wiki says ,include change the port and so on i found that port 5985 and 5984 are the same service for the couchdb ,is it all right? but the faraday-server.py can run suceessfully when i run the client ,it says that

make sure you got couchdb up and running. if couchdb is up,point your browser to: http://127.0.0.1:5984/reports/_design/reports/index.html and when i visited it then it says no_db_file seems it dosen't connect to the couchdb what should i do? the wiki did not say the file of config the client. thx for your reading my issue ,my english is so bad XD.

joaquinlpereyra commented 8 years ago

Hello @kerlingcode!

Try to access http://127.0.0.1:5985. Do you see the CouchDB database? If you don't, there's a problem there. Double check this part of the setup:

Edit CouchDB configuration file. To do that, run couchdb -c to identify it and then edit it to change CouchDB port and bind_address in section [httpd]. Set bind_address to the IP you want for CouchBD and port to 5985.

If you do see the CouchDB databases there, then we just need to tell the server which port to use. That is this part of the setup:

Next edit ~/.faraday/config/server.ini and change Faraday Server port to 5984 in section [faraday_server] and set a new port for CouchDB in section [couch-db] (by default the server will expect CouchDB to use 5985).

Good luck!

kerlingcode commented 8 years ago

@joaquinlpereyra

I have already change the config file while I ![Uploading a.png…]() writting the issues.I comfirm that the database's port is 5984 and the faraday-server.py's port is 5985. And i visit the 127.0.0.1:5984 it turns out the success info.(including the pssword and the username i sure it can login) And i run the faraday-server.py is says it's ready but the faraday client can not run.

2016-08-22 20:09:54,777 - faraday.launcher - ERROR - (<urllib3.connectionpool.VerifiedHTTPSConnection instance at 0x7fddc40e8638>, 'Connection to www.faradaysec.com timed out. (connect timeout=1)')
2016-08-22 20:09:54,777 - faraday.launcher - INFO - No updates available, enjoy Faraday.
2016-08-22 20:09:55,122 - faraday.launcher - INFO - All done. Opening environment.
2016-08-22 20:09:55,127 - faraday.CouchDbManager - WARNING - Reports database couldn't be uploaded. You need to be an admin to do it
2016-08-22 20:09:55,130 - faraday.CouchDbManager - WARNING - No route to couchdb server on: http://127.0.0.1:5984
2016-08-22 20:09:55,756 - faraday.launcher - INFO - Main application ExceptHook enabled.
2016-08-22 20:09:55,757 - faraday.launcher - INFO - Starting main application.

*              faraday ui is ready              
Make sure you got couchdb up and running.
If couchdb is up, point your browser to: 
[http://127.0.0.1:5984/reports/_design/reports/index.html]

2016-08-22 20:09:55,757 - faraday - INFO - XMLRPC API server configured on ('localhost', 9876)
2016-08-22 20:09:55,777 - faraday - INFO - REST API server configured on ('localhost', 9977)

That's the error ,why? Sorry to bother you again

kerlingcode commented 8 years ago

a And i pretty sure about that the user is the admin i have already check it on the dir '/_utils/' of couchdb

joaquinlpereyra commented 8 years ago

@kerlingcode No bother, don't worry. I think I know what's going wrong: Faraday is trying to connect to CouchDB directly, when it should connect to Faraday server. See how the error says it can't connect to 127.0.0.1:5984? That's true, it should be connecting to 127.0.0.1:5985. To be sure, please post the output of these two commands: curl 127.0.0.1:5984/_api/info and curl 127.0.0.1:5985/_api/info You should get a {"Faraday Server":"Running"} with one of those. The one who responded that is the one where the server is running, and Faraday should be connecting to that one.

Nevertheless, the Faraday client should be opening and telling you it can't connect to the server, like this:

2016-08-23-094015_1904x593_scrot

Does that happen? If it doesn't, please run ./faraday.py --debug to see what's going wrong. As a workaround, you can just change the server IP in ~/.faraday/config/user.xml, in the 'couch_uri' field. Even though it says couch_uri, that should be Faraday server's URL. The name is just to assure backwards compatibility.

kerlingcode commented 8 years ago

When i curl 127.0.0.1:5984/_api/info it says faraday server is running .And then i open the file named "user.xml"i found the same address as i use to curl.and the i change it to 5985 and restart it again, and then i stop it then change the port to 5984 again and start the faraday.py again, it just shown the same error.And i haven't seen theGUI like the screenshot you paste on the issues. may be it's thegir1.2-vte-2.91? i can't apt-get install it ,so i just installed the 2.90 edition

i run the faraday,py --debug as you said,that's the info it returns

2016-08-23 19:37:50,683 - faraday.launcher - INFO - Starting Faraday IDE. 2016-08-23 19:37:50,683 - faraday.launcher - INFO - Dependencies met. 2016-08-23 19:37:50,683 - faraday.launcher - INFO - Checking configuration. 2016-08-23 19:37:50,684 - faraday.launcher - INFO - Setting up plugins. 2016-08-23 19:37:50,684 - faraday.launcher - INFO - Removing old plugins folder. 2016-08-23 19:37:50,726 - faraday.launcher - INFO - Setting up ZSH integration. 2016-08-23 19:37:50,729 - faraday.launcher - INFO - Setting up user configuration. 2016-08-23 19:37:50,732 - faraday.launcher - INFO - Using custom user configuration. 2016-08-23 19:37:50,732 - faraday.launcher - INFO - Setting up icons for GTK interface. 2016-08-23 19:37:50,751 - faraday.launcher - INFO - Setting configuration. 2016-08-23 19:37:52,238 - faraday.launcher - INFO - No updates available, enjoy Faraday. 2016-08-23 19:37:52,357 - faraday.launcher - INFO - All done. Opening environment. 2016-08-23 19:37:52,358 - faraday.CouchDbManager - DEBUG - Initializing CouchDBManager for url [http://127.0.0.1:5984] 2016-08-23 19:37:52,359 - faraday.CouchDbManager - DEBUG - Setting user,pass None None 2016-08-23 19:37:52,377 - faraday.CouchDbManager - WARNING - Reports database couldn't be uploaded. You need to be an admin to do it 2016-08-23 19:37:52,626 - faraday.launcher - INFO - Main application ExceptHook enabled. 2016-08-23 19:37:52,626 - faraday.launcher - INFO - Starting main application.

2016-08-23 19:37:52,626 - faraday - DEBUG - Starting application... 2016-08-23 19:37:52,627 - faraday - DEBUG - Setting up remote API's... 2016-08-23 19:37:52,627 - faraday - DEBUG - starting XMLRPCServer with api_conn_info = ('localhost', 9876) 2016-08-23 19:37:52,627 - faraday - INFO - XMLRPC API server configured on ('localhost', 9876) 2016-08-23 19:37:52,627 - faraday - DEBUG - Starting model controller daemon... 2016-08-23 19:37:52,629 - faraday - DEBUG - starting xmlrpc api server... 2016-08-23 19:37:52,637 - faraday - INFO - REST API server configured on ('localhost', 9977) 2016-08-23 19:37:52,641 - faraday - DEBUG - Faraday ready... 2016-08-23 19:37:52,705 - faraday.ModelController - DEBUG - Couldn't get host count: assuming it is zero. 2016-08-23 19:37:52,713 - faraday.ModelController - DEBUG - Couldn't get services count: assuming it is zero. 2016-08-23 19:37:52,713 - faraday.ModelController - DEBUG - Couldn't get vulnerabilities count: assuming it is zero. Error in sys.excepthook: Traceback (most recent call last): File "/home/server001/Desktop/faraday-dev/utils/error_report.py", line 83, in exception_handler model.guiapi.postCustomEvent(event) File "/home/server001/Desktop/faraday-dev/model/guiapi.py", line 38, in postCustomEvent receiver = getMainWindow() File "/home/server001/Desktop/faraday-dev/model/guiapi.py", line 34, in getMainWindow return __the_mainapp.getMainWindow() AttributeError: 'NoneType' object has no attribute 'getMainWindow'

Original exception was: Traceback (most recent call last): File "/home/server001/Desktop/faraday-dev/gui/gtk/application.py", line 586, in do_startup self.terminal = Terminal(CONF) File "/home/server001/Desktop/faraday-dev/gui/gtk/mainwidgets.py", line 45, in init self.start_faraday() File "/home/server001/Desktop/faraday-dev/gui/gtk/mainwidgets.py", line 63, in start_faraday None) File "/home/server001/Desktop/faraday-dev/gui/gtk/compatibility.py", line 49, in spawn_sync child_setup_data, cancellable) gi._glib.GError: Failed to execute child process "/home/server001/Desktop/faraday-dev/faraday-terminal.zsh" (No such file or directory) Error in sys.excepthook: Traceback (most recent call last): File "/home/server001/Desktop/faraday-dev/utils/error_report.py", line 83, in exception_handler model.guiapi.postCustomEvent(event) File "/home/server001/Desktop/faraday-dev/model/guiapi.py", line 38, in postCustomEvent receiver = getMainWindow() File "/home/server001/Desktop/faraday-dev/model/guiapi.py", line 34, in getMainWindow return __the_mainapp.getMainWindow() AttributeError: 'NoneType' object has no attribute 'getMainWindow'

Original exception was: Traceback (most recent call last): File "/home/server001/Desktop/faraday-dev/gui/gtk/application.py", line 630, in do_activate self.terminal, AttributeError: 'GuiApp' object has no attribute 'terminal' 2016-08-23 19:37:52,861 - faraday - INFO - Closing Faraday... 2016-08-23 19:37:52,862 - faraday - DEBUG - stopping model controller thread... 2016-08-23 19:37:52,862 - faraday - DEBUG - server stopping... 2016-08-23 19:37:52,862 - faraday - DEBUG - called stop on xmlrpc server 2016-08-23 19:37:54,638 - faraday - DEBUG - server forever stopped by flag 2016-08-23 19:37:54,638 - faraday - DEBUG - serve_forever ended 2016-08-23 19:37:54,639 - faraday - DEBUG - xmlrpc thread joined 2016-08-23 19:37:56,633 - faraday - DEBUG - Waiting for controller threads to end...

sorry for bothering QAQ

kerlingcode commented 8 years ago

Oh,no. i found the reason. i haven't installed the zsh,so sorry

joaquinlpereyra commented 8 years ago

@kerlingcode We glad you've found the reason and that you've reported this. We'll be adding a better dependency checker for ZSH now that you mention this. Thank you for your time and we hope you enjoy Faraday!