Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using Bloom in docker #42

Open
fanavarro opened this issue May 11, 2022 · 3 comments
Open

Problem using Bloom in docker #42

fanavarro opened this issue May 11, 2022 · 3 comments

Comments

@fanavarro
Copy link

Hi, I am trying to use docker (concretely docker-compose) to deploy a neo4j database including the bloom plugin. I'm using the concerning environment variable to do this as follows:
NEO4JLABS_PLUGINS: '["apoc", "graph-data-science", "bloom"]'
In theory, the graph database will contain the three plugins listed above. I am also using the enterprise docker image 'neo4j:4.4.4-enterprise', and it seems to be working. However, when I try to access the bloom interface at http://localhost:7474/browser/bloom/, I get the following error after I write the user and password:
imagen

I have found this post commenting this issue, but no solution is provided there.

Are you aware of this problem? Is there any workaround for this?

Thanks in advance,
Francisco Abad.

@GlacialBoy
Copy link
Collaborator

GlacialBoy commented Jun 3, 2022

Hello Francisco,
probably there is some misconfiguration in the docker compose file, it seems that the Bloom plugin is not installed properly.

I tried to run it with this docker compose file and it is working fine

version: '3.3'
services:
  neo4j:
    image: neo4j:4.4.4-enterprise
    container_name: neo4j
    ports:
        - '7474:7474'
        - '7687:7687'
    volumes:
        - '$HOME/bloom.license:/licenses/bloom.license'
    environment:
        - NEO4J_AUTH=neo4j/password
        - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
        - NEO4JLABS_PLUGINS=["apoc", "graph-data-science", "bloom"]
        - NEO4J_dbms_allow__upgrade=${NEO4J_ALLOW_UPGRADE:-false}

Notice that you need to provide a license file for this feature, hope this example helps to solve your problem!

@fanavarro
Copy link
Author

Hi @GlacialBoy, thanks for your answer! I am trying to pass the bloom license as an argument so that it is written to the /license.txt and appended to the neo4j config file in the docker container with this dockerfile:

FROM neo4j:4.4.4-enterprise

ARG NEO4J_LICENSE_KEY
ARG NEO4J_LICENSE_KEY_FILE=/license.txt

RUN if [ ! -z "$NEO4J_LICENSE_KEY" ] ; then echo $NEO4J_LICENSE_KEY > $NEO4J_LICENSE_KEY_FILE && echo gds.enterprise.license_file=$NEO4J_LICENSE_KEY_FILE >> /var/lib/neo4j/conf/neo4j.conf && echo neo4j.bloom.license_file=$NEO4J_LICENSE_KEY_FILE >> /var/lib/neo4j/conf/neo4j.conf; else echo 'Not neo4j commercial license used'; fi

EXPOSE 7474 7687 9010

Then I used this dockerfile in the compose file as follows (with the variables stored in the .env file):

version: '3'
services:
  p4q-graph:
    container_name: p4q-graph
    build:
      context: ./p4q-graph
      args:
        - NEO4J_LICENSE_KEY=${NEO4J_LICENSE_KEY}
    ports:
      - ${NEO4J_HTTP_PORT}:7474
      - ${NEO4J_BOLT_PORT}:7687
    environment:
      NEO4JLABS_PLUGINS: '["apoc", "graph-data-science", "bloom"]'
      NEO4J_AUTH: '${NEO4J_USER}/${NEO4J_PASS}'
      NEO4J_ACCEPT_LICENSE_AGREEMENT: 'yes'

With this config I am getting the java error; I will try with your docker compose file after cleaning everything.
Thankis again!

@fanavarro
Copy link
Author

I tried by using a volume to store the license key instead of managing env variables, but I am still having the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants