I'm having this weird issue with Neo4j in Docker. This is my docker-compose file:
version: '3'
services: 
  neo4j:
    ports: 
      - "7473:7473"
      - "7474:7474"
      - "7687:7687"
    volumes:
      - neo4j_data:/data
    image: neo4j:3.3
volumes:
  neo4j_data: {}
I'm using Docker Toolbox on Windows 10. I have tested this on two different machines and it works perfectly. However, on one machine, the container always crashes a few seconds after creation. Here's the log for this container:
$ docker container logs database_neo4j_1
Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /var/lib/neo4j/logs
  plugins:      /var/lib/neo4j/plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2018-11-18 12:50:41.954+0000 WARN  Unknown config option: causal_clustering.discovery_listen_address
2018-11-18 12:50:41.965+0000 WARN  Unknown config option: causal_clustering.raft_advertised_address
2018-11-18 12:50:41.965+0000 WARN  Unknown config option: causal_clustering.raft_listen_address
2018-11-18 12:50:41.967+0000 WARN  Unknown config option: ha.host.coordination
2018-11-18 12:50:41.968+0000 WARN  Unknown config option: causal_clustering.transaction_advertised_address
2018-11-18 12:50:41.968+0000 WARN  Unknown config option: causal_clustering.discovery_advertised_address
2018-11-18 12:50:41.969+0000 WARN  Unknown config option: ha.host.data
2018-11-18 12:50:41.970+0000 WARN  Unknown config option: causal_clustering.transaction_listen_address
2018-11-18 12:50:42.045+0000 INFO  ======== Neo4j 3.3.9 ========
2018-11-18 12:50:42.275+0000 INFO  Starting...
2018-11-18 12:50:48.632+0000 INFO  Bolt enabled on 0.0.0.0:7687.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 262160 bytes for Chunk::new
# An error report file with more information is saved as:
# /var/lib/neo4j/hs_err_pid6.log
#
# Compiler replay data is saved as:
# /var/lib/neo4j/replay_pid6.log
 
                        
Looking add the additional log file
/var/lib/neo4j/hs_err_pid6.logrevealed the following information:As it turns out, my Docker machine was set to only 1GB of RAM, and the minimum requirement for Neo4j (according to their website) are 2GB. I was able to solve the problem by replacing my default Docker machine according to this guide and giving the new one 4GB of memory.
Essentially, I did the following:
you may also need to restart Docker:
I haven't found anything about this problem online so far, so maybe this helps someone someday =).