cl-neo4j icon indicating copy to clipboard operation
cl-neo4j copied to clipboard

Running cl-neo4j.tests fails 100%

Open dcguim opened this issue 8 years ago • 6 comments

Please check the gist bellow which contain status information retrieved: https://gist.github.com/dcguim/acd7f7946e488e1ddc9191f691eaf4c6

I have set the configuration under src/globals.lisp so I don`t think is an authentication problem. I wonder if data type mapping should provided before start creating simple nodes.

If I simply:

(create-node :properties '((:name . "Dan") (:email . "[email protected]")))
Unknown status 401 returned for node
   [Condition of type UNKNOWN-RETURN-TYPE-ERROR]

Backtrace:
  0: ((:METHOD HANDLE-REQUEST (BASIC-HANDLER T T)) #<BASIC-HANDLER {1008834613}> #S(NEO4J-REQUEST :METHOD :POST :URI "node" :PAYLOAD "{\"name\":\"Dan\",\"email\":\"[email protected]\"}")  
  ((201 #<FUNCTION (LAMBDA # :IN CREATE-NODE) {1002EA594B}>) (400 #<FUNCTION (LAMBDA # :IN CREATE-NODE) {1002EA589B}>))
  1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CREATE-NODE :PROPERTIES (QUOTE (# #))) #<NULL-LEXENV>)
  2: (EVAL (CREATE-NODE :PROPERTIES (QUOTE (# #))))

dcguim avatar Aug 10 '17 18:08 dcguim

Hmm, it looks like all of your connections to neo4j are returning http 429 and / or 401 status codes. Are you sure that your graph database is online and healthy?

kraison avatar Aug 11 '17 14:08 kraison

I don`t quite understand why this won`t work, is there anything wrong with the syntax of the create-node key value params I used? If I isolate the problem, I have: https://gist.github.com/dcguim/d86686896f1a574de68f6bc7bfb63a4c I am curious on the use of defstruct:

(defstruct (neo4j-request (:constructor %make-neo4j-request)
                          (:conc-name request-))

unlike the uses of defclass in:

git grep "defclass" query.lisp:(defclass cypher-query () requests.lisp:(defclass basic-handler () wrapper.lisp:(defclass standard-node () wrapper.lisp:(defclass standard-relationship ()

If I:

cat globals.lisp (in-package #:cl-neo4j) (defvar neo4j-host "127.0.0.1") (defvar neo4j-port 7474) ...

So:

curl http://127.0.0.1:7474
{
  "management" : "http://127.0.0.1:7474/db/manage/",
  "data" : "http://127.0.0.1:7474/db/data/",
  "bolt" : "bolt://127.0.0.1:7687"
}

There are other means to check my db health, I should know about?

dcguim avatar Aug 11 '17 15:08 dcguim

Are you still having trouble? I have been travelling, so please accept my apologies for not responding sooner.

kraison avatar Sep 05 '17 18:09 kraison

I was able to reproduce this by setting an incorrect username / password combo. Have you verified that both *neo4j-user* and *neo4j-pass* are set correctly?

kraison avatar Sep 05 '17 18:09 kraison

$: grep dbms.security* ~/Applications/neo4j-community-3.3.0-alpha05/conf/neo4j.conf
dbms.security.auth_enabled=false
dbms.security.allow_csv_import_from_file_urls=true

dcguim avatar Sep 06 '17 10:09 dcguim

Ah, so you aren't using auth at all; I can't say I ever tried running without some sort of auth. Too much time in the security space, I guess. The library assumes that you will be using auth, so a number of changes would need to be made in order to connect without it. The easy solution is to enable it and make sure that your user/pass variables are set correctly. If it is important for you to run without it, I can update the request handler so that it doesn't always send credentials.

kraison avatar Sep 06 '17 14:09 kraison