neo4j / graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
https://neo4j.com/docs/graph-data-science/current/
Other
621 stars 160 forks source link

Cannot fetch versions.json file for GDS #227

Closed szarnyasg closed 1 year ago

szarnyasg commented 1 year ago

Describe the bug When starting up a Docker image with the Graph Data Science enabled, it hangs due to a missing versions.json file.

To Reproduce

docker run --rm \
    --user="$(id -u):$(id -g)" \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --env NEO4JLABS_PLUGINS='["graph-data-science"]' \
    neo4j:4.4.3

Output:

Fetching versions.json for Plugin 'graph-data-science' from https://s3-eu-west-1.amazonaws.com/com.neo4j.graphalgorithms.dist/graph-data-science/versions.json
Error: No jar URL found for version '4.4.3' in versions.json from 'https://s3-eu-west-1.amazonaws.com/com.neo4j.graphalgorithms.dist/graph-data-science/versions.json'

The file at https://s3-eu-west-1.amazonaws.com/com.neo4j.graphalgorithms.dist/graph-data-science/versions.json is indeed unavailable.

This issue is in the intersection of GDS and the Docker image but seems more like a GDS release issue – the 4.4.3 Docker image cannot be changed much at this point.

GDS version: n/a Neo4j version: 4.4.3 Operating system: MacOS, Ubuntu 22.04

Mats-SX commented 1 year ago

Hello @szarnyasg, welcome to GDS, and thank you for raising this issue!

We did indeed disable this (old) location for the versions.json, which now is hosted at https://graphdatascience.ninja/versions.json. We were apparently unaware of this dependency and will make sure to do the necessary updates.

One thing comes to mind when I see your report: you are running a rather old version of Neo4j with 4.4.3. I would generally recommend you to upgrade to Neo4j 4.4.12 which is the latest patch. 4.4.3 is mapped to GDS version 1.8, which is EOL. The best GDS version to use is 2.2.1. At this time I'm not 100% sure how the docker image is constructed to download the versions.json, but there is a chance that upgrading the Neo4j version is necessary -- I will check.

All the best Mats

Mats-SX commented 1 year ago

OK, after checking I can report that only Neo4j versions 4.4.6 and above use the new, correct address of the versions.json. Is upgrading possible for you? I realise that upgrading does imply that you migrate to GDS series 2, which could cause some migration effort on your part. To help with that, please see the GDS Migration Guide.

szarnyasg commented 1 year ago

Hi @Mats-SX, thanks for the quick response. Migrating to 4.4.4+ is a challenge due to a MacOS-related issue in the Docker image: https://github.com/neo4j/docker-neo4j/issues/351

eidens commented 1 year ago

I've had this same issue (with an admittedly very old neo4j version of 4.1). My workaround was to update the neo4jlabs-plugins.json file in the Docker image from which the plugin URLs are read:

FROM neo4j:4.1
# from https://raw.githubusercontent.com/neo4j/docker-neo4j/master/docker-image-src/common/neo4jlabs-plugins.json
COPY neo4jlabs-plugins.json /neo4jlabs-plugins.json

This is working so far with the GDS & apoc plugins.

vege-yummy commented 1 year ago

how to update the neo4jlabs-plugins.json file in the Docker image from which the plugin URLs are read?

Mats-SX commented 1 year ago

@szarnyasg @eidens @vege-yummy Does this news from @jennyowen help your issues?

https://github.com/neo4j/graph-data-science/issues/231#issuecomment-1305506206

szarnyasg commented 1 year ago

Hi @Mats-SX, thanks for linking this comment. Yes, it fixes my issue.

$ docker run --rm \
    --user="$(id -u):$(id -g)" \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --env NEO4JLABS_PLUGINS='["graph-data-science"]' \
    neo4j:4.4.3
Fetching versions.json for Plugin 'graph-data-science' from https://s3-eu-west-1.amazonaws.com/com.neo4j.graphalgorithms.dist/graph-data-science/versions.json
Installing Plugin 'graph-data-science' from https://graphdatascience.ninja/neo4j-graph-data-science-1.8.3.jar to /var/lib/neo4j/plugins/graph-data-science.jar
Applying default values for plugin graph-data-science to neo4j.conf
2022-11-08 13:02:13.486+0000 INFO  Starting...
2022-11-08 13:02:14.374+0000 INFO  This instance is ServerId{d8da1e3d} (d8da1e3d-15eb-44b8-8dc5-2e4a539412b8)
2022-11-08 13:02:16.640+0000 INFO  ======== Neo4j 4.4.3 ========
2022-11-08 13:02:30.032+0000 INFO  Initializing system graph model for component 'security-users' with version -1 and status UNINITIALIZED
2022-11-08 13:02:30.042+0000 INFO  Setting up initial user from defaults: neo4j
2022-11-08 13:02:30.043+0000 INFO  Creating new user 'neo4j' (passwordChangeRequired=true, suspended=false)
2022-11-08 13:02:30.060+0000 INFO  Setting version for 'security-users' to 3
2022-11-08 13:02:30.066+0000 INFO  After initialization of system graph model component 'security-users' have version 3 and status CURRENT
2022-11-08 13:02:30.079+0000 INFO  Performing postInitialization step for component 'security-users' with version 3 and status CURRENT
2022-11-08 13:02:30.540+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2022-11-08 13:02:31.998+0000 INFO  Remote interface available at http://localhost:7474/
2022-11-08 13:02:32.003+0000 INFO  id: 2D78524A751F66C96018A4CDF9A1A85F8A339C9101BEA88E740E565B24EED100
2022-11-08 13:02:32.004+0000 INFO  name: system
2022-11-08 13:02:32.004+0000 INFO  creationDate: 2022-11-08T13:02:17.649Z
2022-11-08 13:02:32.005+0000 INFO  Started.
Mats-SX commented 1 year ago

Excellent! And I hope that the fix for the other issue was also successful, so that you can update your Neo4j version and get the important security fixes.

I will close this issue as fixed.