Enable APOC Trigger in Neo4j Community Edition Azure

Hello All,

I want to enable APOC trigger in my neo4j community edition instance in azure,

How do i install APOC plugin and enable triggers for remote connections

please help

@fcidkampl
there is no detail in the initial post to describe what version of Neo4j is in play here but

Installation - APOC Documentation is the v5.x install instructions for APOC.

Further
apoc.trigger - APOC Documentation describes all things apoc.trigger*

has any of this been tried?

Thank you for response @dana_canzano

I opened my neo4j community azure instance on neo4j desktop application

My neo4j community (remote connection) version on azure is 5.19.0

I have downloaded APOC jar 4.4.0.27 all into neo4jDesktop/Plugins folder

when i am trying to call below query

call apoc.triggger.list()

it produce below error

Failed to invoke procedure apoc.trigger.list: Caused by: java.lang.RuntimeException: Triggers have not been enabled. Set 'apoc.trigger.enabled=true' in your apoc.conf file located in the $NEO4J_HOME/conf/ directory.

the document says default value of trigger is false.

for enabling trigger in local DB the approach is different

but how to enable trigger for remote connection ????

@fcidkampl

a bit confused. the apoc-.jar that is in plugins/ should be of the same version as Neo4j.
If you are running Neo4j 4.4.x then apoc-4.4.
.jar would be appropriate. However if running Neo4j v5, then use a apoc-5
.jar.

Also, as the error message states, the apoc.conf needs to have apoc.trigger.enabled=true. This apoc.conf is on the instance where Neo4j is running and in conf/

@dana_canzano

I explain what i have done & what i want to achieve

Step 1:
I created neo4j community edition resource on my azure portal (Version 5.19.0)

Step 2:
Then I opened neo4j desktop app and initiated remote connection
so i entered username as IP address with port and password which was asked at the time of creating resource.

Step 3:
Connection established now i can run query on my remote connection,
so i created nodes and relationships. its working perfectly

Step 4:
Now i want to enable APOC,
So i have installed APOC jar file (Version 5.19.0 - core) and placed into
.Neo4jDesktop/plugins folder

Now my concern is where i can see neo4j.conf file or apoc.conf file
so i can enable apoc.trigger.enable=true
on which folder do i create apoc.conf file.

for local dbms the file is located in .Neo4jDesktop/relate-data/dbmss/neo4jinstance-name/conf/file_name

for remote connection i cant see neo4j-instance-name at anywhere...
or neo4j.conf file.

is there any different approach to enable apoc trigger in this scenario

please guide us properly

& sorry for my poor english

Thank You

@fcidkampl

if you are connecting to a remote instance and you need APOC and triggers on the remote instance than you need APOC and triggers enabled on the remote instance.

Somehow Neo was installed on this remote instance?
if you run at the linux prompt

ps -eaf | grep java

this may return output similar to

 ps -eaf | grep java
neo4j       4686       1 11 15:13 pts/1    00:06:07 /usr/lib/jvm/zulu17-ca-amd64/bin/java -cp /home/neo4j/single/instance1/neo4j-enterprise-5.18.0/plugins/*:/home/neo4j/single/instance1/neo4j-enterprise-5.18.0/conf/*:/home/neo4j/single/instance1/neo4j-enterprise-5.18.0/lib/* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -XX:-RestrictContended -Djdk.nio.maxCachedBufferSize=1024 -Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -XX:FlightRecorderOptions=stackdepth=256 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dlog4j2.disable.jmx=true -Dfile.encoding=UTF-8 com.neo4j.server.enterprise.EnterpriseEntryPoint --home-dir=/home/neo4j/single/instance1/neo4j-enterprise-5.18.0 --config-dir=/home/neo4j/single/instance1/neo4j-enterprise-5.18.0/conf

note the paths above are unique to my environment. Presumably you will have different paths.
For the entry above named

 --config-dir=/home/neo4j/single/instance1/neo4j-enterprise-5.18.0/conf

you need to define a apoc.conf in this path with

apoc.trigger.enabled=true

and you also need to move the apoc* .jar into the plugins/ directory

1 Like

@dana_canzano

ps -eaf | grep java

how to do this on windows 11 ?

@fcidkampl

????
Neo4j runs under Azure and running Windows?
Did you ? a coworker ? do they not know the path where it was installed?

Thank You Very Much @dana_canzano ..

It's worked