Export a (sub)graph to Cypher script and import it again

Oftentimes you want to export a full (or partial) database to a file and import it again without copying the actual database files. If you want to do the latter, use neo4j-admin dump/load. Here are two ways on how to… Read more →

Number of open files

GNU/Linux and Mac OS operating systems impose an upper limit on the number of concurrent files a user may have open. This article covers how to configure the number of open files on GNU/Linux that use systemd or sysvinitd. For… Read more →

How do I enable remote HTTPS access with Neo4j 3.0.x

With 3.0.x to enabled remote clients to connect to a HTTPS enabled browser the following parameters in the $NEO4J_HOME/conf/neo4j.conf need to be changed from the default of #dbms.connector.https.address=localhost:7473 to dbms.connector.https.address=0.0.0.0:7473 The change from localhost:7473 to 0.0.0.0:7473 will allow for remote… Read more →

Embed neo4j-enterprise within your java application

The Neo4j Java Reference Documentation generally describes how to embed Neo4j Community Edition within your Java application. If you are licensed for Neo4j Enterprise, this article will guide you through setting up the project to use Neo4j Enterprise embedded within… Read more →

Using Amazon CloudWatch to monitor Neo4j logs

This article describes how to set up Amazon CloudWatch. Amazon CloudWatch Logs allows you to monitor, store, and access your Neo4j log files from Amazon EC2 instances, AWS CloudTrail, or other sources. You can then retrieve the associated log data… Read more →

Why did I get the “Kernel API returned non-existent relationship type: -1” exception?

In rare situations, the Neo4j Bolt driver throws an IllegalStateException. The top part of the stack appears as: java.lang.IllegalStateException: Kernel API returned non-existent relationship type: -1 at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.getRelationshipTypeById(GraphDatabaseFacade.java:991) Under the covers, this is what happens. The getRelationshipTypeById(int type) method is… Read more →

How do I override browser configuration settings

Commencing with Neo4j 3.2.2 one can override default configuration settings of the browser whereby a number of these settings are defined under the left frame and through the ‘gears’ icon. To implement said functionality you would first need to know… Read more →

Solve dependency issues

There are multiple ways to include neo4j artifacts. In this article, we will focus on maven based on different scenarios or errors. The most common issue is setting up the dependencies properly in pom.xml. Verify that you have the right… Read more →

Diagnose storage performance issues

Slow storage can affect Neo4j performance, therefore we recommend using Solid State Drives in the product documentation. Benchmark your underlying system On Ubuntu or RedHat, you can use fio tool to benchmark your underlying storage. The command below will create… Read more →

Cluster: org.neo4j.kernel.impl.transaction.log.NoSuchTransactionException: Unable to find transaction 1 in any of my logical logs: Couldn’t find any log containing 1

When operating a causal cluster, if “the store” (data/databases/graph.db) is removed from a server that was previously a member of the cluster we will get the following exception when that server is started: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /path/to/neo4j/data/databases/graph.db at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:209)… Read more →

How do I convert Neo4j logs from base UTC to local timezone

With the introduction of Neo4j 3.3.1 it is possible to represent date timestamps in your $NEO4J_HOME/logs/* in either UTC or SYSTEM timezone through the implementation of dbms.logs.timezone However for prior releases all Neo4j logs will preface each line with a… Read more →

Recommendations for recovery upon Out Of Memory error

It is possible to configure the JVM (Java Virtual Machine) such that upon encountering an OOM (Out-Of-Memory) error it will force an exception and crash or simply shut down the application. Taking action upon first OOM occurrence can help in… Read more →

Setup Neo4j Service to run with different service ID

By default when neo4j is installed as an RPM via yum or apt-get, it creates a user neo4j and group neo4j and runs as neo4j user. However it might be required to run Neo4j service as another service id other… Read more →

How do I log parameter values into the query.log file

Neo4j 3.0 introduces the ability to log the value of query parameters in the log/query.log file. The settings to control this feature are located in the conf/neo4j.conf file. To enable query logging with parameters, one must first enable query logging… Read more →

Fulltext search in Neo4j

Note Please note that in Neo4j 3.5 fulltext search is available in Neo4j as part of Cypher stored procedures. More documentation is found here: https://neo4j.com/docs/cypher-manual/3.5/schema/index/#schema-index-fulltext-search. Fulltext search in Neo4j is supported by means of fulltext schema indexes. Fulltext schema indexes… Read more →

Configure Neo4j to authenticate users from different OUs using the Active Directory attribute samAccountName

Beginning with Neo4j version 3.2.2, it is possible to authenticate using the Active Directory attribute samAccountName as opposed to the LDAP Display Name attribute. This is described in detail in the following KB article: How do I allow for authentication… Read more →

Bulk Import / Backups into running 4.0 instances

Neo4j 4.0 allows for multiple running databases. You can use neo4j-admin import or neo4j-admin restore to import or restore a database into a new database on a running 4.0 instance. Neo4j-Admin Import Standalone Server Run the Neo4j-Admin import to create… Read more →

Why does my CREATE CONSTRAINT take so long to complete

When creating a constraint, for example CREATE CONSTRAINT ON (n:ZipCode) ASSERT n.name IS UNIQUE; this will require a lock on all nodes with the label the constraint is being created for, in this case ZipCode If you have another transaction… Read more →

Why do my deleted property keys appear?

When using the Neo4j Browser and selecting the left frame and top icon entitled Database Information or using the built in stored procedure db.propertyKeys() you may see property keys which are no longer associated with any nodes. This is expected.… Read more →

Resolve TLS certificate errors

TLS encryption is required everywhere. This is a compilation of few errors you can expect while configuring your server. openssl command is required to diagnose or manipulate the certificates. Check the permission on the folder neo4j might run as a… Read more →

Installing Neo4j Database on Debian or Ubuntu fails with “The following packages have unmet dependencies”

Installing Neo4j Database on Debian or Ubuntu fails with the error: The following packages have unmet dependencies: neo4j-enterprise : Depends: cypher-shell (< 1.2.0) but it is not going to be installed E: Unable to correct problems, you have held broken… Read more →

Executing Neo4j ETL from an RDBMS database running on Docker

Following provides some examples of importing a test csv data into Neo4j, using the Neo4j ETL tool’s command line interface with the source RDBMS database running on docker. Examples herein are specific to tests conducted on a MAC OSX host… Read more →

List of restricted ports in browsers

This document provides a list of ports which generate an error when browsing via Chrome. It is a super-set of ports most of which are also restricted in Mozilla Firefox as they’re reserved for the services listed below and are… Read more →

How to properly shutdown a Neo4j database after receiving the message took more than 120 seconds to stop

The neo4j script under the bin/ directory of any standard Neo4j install is the primary means of shutting down a running Neo4j instance. That script accepts a stop argument that will try to shutdown the running instance by sending a… Read more →

Debian: apt-get failing to update Neo4j

The common cause is an out of date gpg key. To update then run the following command: wget -O – https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add – See also the information on: https://debian.neo4j.com You can get more information about running Neo4j… Read more →