I am trying to connect Gephi (https://gephi.org/) and Neo4j (via docker) using Gephi's graph Streaming plugin and Neo4j's apoc procedures, as explained here: https://tbgraph.wordpress.com/2017/04/01/neo4j-to-gephi/ . I have already installed the required plugin in Gephi and the apoc procedures in neo4j, adding the required security configuration in order to allow apoc procedures to work. Therefore, neo4j.conf
includes this line dbms.security.procedures.unrestricted=apoc.\*
.
However, when I input the following query in the console:
MATCH path = (:Person)-[:KNOWS]->(:Person)
CALL apoc.gephi.add(null,'workspace1',path,'weight') yield nodes
return *
I get
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure `apoc.gephi.add`: Caused by: java.net.ConnectException: Connection refused (Connection refused)
I have also tried to substitute the first null (which is the server url) with https://localhost:8443
and http://localhost:8080
, but I get the same exception. Gephi Graph Streaming plugin server is listening on both 8080 and 8443.
I don't know how to further troubleshoot the problem.
EDIT:
About docker, I am using a custom image with adds apoc to the base neo4j image:
# Adding APOC
FROM neo4j:3.3
ENV APOC_URI https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.3.0.1/apoc-3.3.0.1-all.jar
RUN apk add --no-cache --quiet curl
RUN mv plugins /plugins \
&& ln -s plugins /plugins
RUN curl --fail --silent --show-error --location --output apoc-3.3.0.1-all.jar $APOC_URI \
&& mv apoc-3.3.0.1-all.jar /plugins
RUN apk del curl
EXPOSE 7474 7473 7687
CMD ["neo4j"]
I run the container as:
docker run \
--publish=7474:7474 --publish=7687:7687 \
--volume=$HOME/neo4j/data:/data \
-e NEO4J_dbms_security_procedures_unrestricted=apoc.\\\* \
neo4j_apoc:3.3