I'm trying to create a development workflow where I can spin up a (slightly customised*) Neo4j Community Docker container on AWS EC2 Amazon Linux, then use an image of that instance to create other instances.
When I set up an EC2 instance with my install scripts that get Neo4j running in Docker, everything works fine (I can use cypher-shell to execute statements). However, when I create an image of the instance, then create a new instance from the image, Neo4j isn't working on the new instance.
I've seen three different errors during different attempts:
- "
The client is unauthorized due to authentication failure.
" when trying to log in with theneo4j
user (which I've assigned a new, permanent password in the container config) - The same error as above, but this time when trying to log in using a user that has just been successfully created by the
neo4j
user. Failed to obtain connection towards WRITE server. Known routing table is: Ttl 1588219230458, currentTime 1588218930464, routers AddressSet=[], writers AddressSet=[], readers AddressSet=[], database '<default database>'
As I said, everything works fine on the instance where the installation steps are initially performed. It's only on instances created from an image of that instance (while is was shutdown) that the errors happen.
I've grabbed the debug.logs from the good instances and a bad one and there's no difference between them.
Is there something about Neo4j (even inside Docker?) that prevents its data from being used after it's moved to another host?
Am I doing something wrong, or is there some condition that would obviously create the above symptoms?
(* The only customisation on top of the official Docker image is to inject my own neo4j.conf)