hetio / hetionet

Hetionet: an integrative network of disease
https://neo4j.het.io
264 stars 69 forks source link

Upgrade neo4j to 3.5.12 community #26

Closed dhimmel closed 5 years ago

dhimmel commented 5 years ago

Switch from enterprise to community because enterprise is no longer open source.

dhimmel commented 5 years ago

Here's the message I got from running dhimmel/hetionet:hetionet-v1.0_neo4j-3.5.12 locally:

❯❯❯ docker run \
  --name=hetionet-container \
  --rm \
  --publish=7474:7474 \
  --publish=7687:7687 \
  --volume=$HOME/neo4j/hetionet-data:/data \
  --volume=$HOME/neo4j/hetionet-logs:/logs \
  dhimmel/hetionet

Warning: Folder mounted to "/data" is not writable from inside container. Changing folder owner to neo4j.
Downloading and extracting database
Downloading and extracting guides
Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /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.
2019-10-28 18:01:52.690+0000 WARN  WARNING! Deprecated configuration options used. See manual for details
2019-10-28 18:01:52.700+0000 WARN  dbms.allow_format_migration has been replaced with dbms.allow_upgrade.
2019-10-28 18:01:52.700+0000 WARN  dbms.active_database is deprecated.
2019-10-28 18:01:52.722+0000 INFO  ======== Neo4j 3.5.12 ========
2019-10-28 18:01:52.739+0000 INFO  Starting...
2019-10-28 18:01:53.890+0000 INFO  Starting upgrade of database
2019-10-28 18:01:53.928+0000 INFO  Migrating Indexes (1/5):
2019-10-28 18:01:53.931+0000 INFO    10% completed
2019-10-28 18:01:53.931+0000 INFO    20% completed
2019-10-28 18:01:53.931+0000 INFO    30% completed
2019-10-28 18:01:53.931+0000 INFO    40% completed
2019-10-28 18:01:53.931+0000 INFO    50% completed
2019-10-28 18:01:53.931+0000 INFO    60% completed
2019-10-28 18:01:53.931+0000 INFO    70% completed
2019-10-28 18:01:53.932+0000 INFO    80% completed
2019-10-28 18:01:53.932+0000 INFO    90% completed
2019-10-28 18:01:53.932+0000 INFO    100% completed
2019-10-28 18:01:53.932+0000 INFO  Migrating Explicit indexes (2/5):
2019-10-28 18:01:53.932+0000 INFO    10% completed
2019-10-28 18:01:53.933+0000 INFO    20% completed
2019-10-28 18:01:53.933+0000 INFO    30% completed
2019-10-28 18:01:53.933+0000 INFO    40% completed
2019-10-28 18:01:53.933+0000 INFO    50% completed
2019-10-28 18:01:53.933+0000 INFO    60% completed
2019-10-28 18:01:53.933+0000 INFO    70% completed
2019-10-28 18:01:53.933+0000 INFO    80% completed
2019-10-28 18:01:53.934+0000 INFO    90% completed
2019-10-28 18:01:53.934+0000 INFO    100% completed
2019-10-28 18:01:53.934+0000 INFO  Migrating Store files (3/5):
2019-10-28 18:01:54.077+0000 INFO    10% completed
2019-10-28 18:01:54.077+0000 INFO    20% completed
2019-10-28 18:01:54.077+0000 INFO    30% completed
2019-10-28 18:01:54.077+0000 INFO    40% completed
2019-10-28 18:01:54.077+0000 INFO    50% completed
2019-10-28 18:01:54.077+0000 INFO    60% completed
2019-10-28 18:01:54.077+0000 INFO    70% completed
2019-10-28 18:01:54.077+0000 INFO    80% completed
2019-10-28 18:01:54.078+0000 INFO    90% completed
2019-10-28 18:01:54.078+0000 INFO    100% completed
2019-10-28 18:01:54.078+0000 INFO  Migrating Native label scan index (4/5):
2019-10-28 18:01:54.951+0000 INFO    10% completed
2019-10-28 18:01:54.964+0000 INFO    20% completed
2019-10-28 18:01:54.972+0000 INFO    30% completed
2019-10-28 18:01:54.977+0000 INFO    40% completed
2019-10-28 18:01:54.982+0000 INFO    50% completed
2019-10-28 18:01:54.986+0000 INFO    60% completed
2019-10-28 18:01:54.990+0000 INFO    70% completed
2019-10-28 18:01:54.995+0000 INFO    80% completed
2019-10-28 18:01:54.999+0000 INFO    90% completed
2019-10-28 18:01:55.003+0000 INFO    100% completed
2019-10-28 18:01:55.079+0000 INFO  Migrating Counts store (5/5):
2019-10-28 18:01:55.305+0000 INFO    10% completed
2019-10-28 18:01:55.407+0000 INFO    20% completed
2019-10-28 18:01:55.467+0000 INFO    30% completed
2019-10-28 18:01:55.543+0000 INFO    40% completed
2019-10-28 18:01:55.622+0000 INFO    50% completed
2019-10-28 18:01:55.701+0000 INFO    60% completed
2019-10-28 18:01:55.751+0000 INFO    70% completed
2019-10-28 18:01:55.810+0000 INFO    80% completed
2019-10-28 18:01:55.873+0000 INFO    90% completed
2019-10-28 18:01:55.937+0000 INFO    100% completed
2019-10-28 18:01:56.067+0000 INFO  Successfully finished upgrade of database, took 2s 174ms
2019-10-28 18:01:57.496+0000 INFO  Deprecated index providers in use: lucene-1.0 (22 indexes). Use procedure 'db.indexes()' to see what indexes use which index provider.
2019-10-28 18:01:58.537+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2019-10-28 18:01:59.907+0000 INFO  Started.
2019-10-28 18:02:00.086+0000 INFO  Mounted unmanaged extension [extension.web] at [/guides]
2019-10-28 18:02:00.666+0000 WARN  The following warnings have been detected with resource and/or provider classes:
  WARNING: A sub-resource method, public javax.ws.rs.core.Response extension.web.StaticWebResource.index() throws java.io.IOException, with URI template, "/", is treated as a resource method
2019-10-28 18:02:01.268+0000 INFO  Remote interface available at http://localhost:7474/

The output looks good. I also tested that localhost guides were operational and that the database was read only.

dhimmel commented 5 years ago

Pushed the 3.5.2 image to docker hub.

dhimmel commented 5 years ago

Updating the cloud instance:

ubuntu@neo4j-hetionet:~$ bash docker-scripts/update-docker.sh 
Deleting hetionet-container
Using default tag: latest
latest: Pulling from dhimmel/hetionet
8d691f585fa8: Pull complete 
3da6fe7ff2ef: Pull complete 
02c32ad92c0d: Pull complete 
c5b17f485691: Pull complete 
758b54487ae2: Pull complete 
56a2385e36ce: Pull complete 
15b1798ae779: Pull complete 
c199d93c0806: Pull complete 
538ae35112e8: Pull complete 
e16c680b21be: Pull complete 
2a5539b268a5: Pull complete 
80594c377465: Pull complete 
1b60d17c4c60: Pull complete 
8d8eb89aba1c: Pull complete 
cd071616a788: Pull complete 
65c63ab2a22b: Pull complete 
Digest: sha256:8d757a46c5583116390977557871303bca3cfecae809d90698782917b0bce948
Status: Downloaded newer image for dhimmel/hetionet:latest
docker.io/dhimmel/hetionet:latest
e247762bd9ae31b431922ee29f2517202a008097dda21a5fa2757c27d646ae7f

But there was an issue running the new container (via docker logs hetionet-container):

2019-10-28 18:43:21.037+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@443effcb' was successfully initialized, but failed to start. Please see the attached cause exception "/ssl/neo4j.key (Permission denied)". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@443effcb' was successfully initialized, but failed to start. Please see the attached cause exception "/ssl/neo4j.key (Permission denied)".

From inside the container:

ubuntu@neo4j-hetionet:~$ docker run -t -i dhimmel/hetionet bash
neo4j@b43fddafeaa6:~$ id
uid=101(neo4j) gid=101(neo4j) groups=101(neo4j)

We changed the permissions of ssl/neo4j.key from 600 to 644:

ubuntu@neo4j-hetionet:~$ ls -l ssl/
total 8
-rw-r--r-- 1 root root 3550 Sep  3 18:13 neo4j.cert
-rw-r--r-- 1 root root 1704 Sep  3 18:13 neo4j.key