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

messy entrypoint script #256

Open
fssrepository opened this issue May 29, 2020 · 0 comments
Open

messy entrypoint script #256

fssrepository opened this issue May 29, 2020 · 0 comments
Assignees

Comments

@fssrepository
Copy link

fssrepository commented May 29, 2020

My experience with neo4j was tragic, but it can be easily improved with little care and less negligence. (it's definitely not tested enough)

neo4j - 4.0.4 - (community/enterprise)

It cost me two days to figure out how to import a db in docker..., however in other types of db like mysql/mongodb it can automatically import.

  1. I have changed the docker-entrypoint.sh and rebuilt at last:
# Use su-exec to drop privileges to neo4j user
# Note that su-exec, despite its name, does not replicate the
# functionality of exec, so we need to use both
if [ "${cmd}" == "neo4j" ]; then
  # multi db variant (/var/lib/neo4j/import/*.json) for enterprise version -
  # pls. check that the json has been initialized touch .initialized
  /scripts/wait-for-it.sh -t 0 neo4j:7474 -- ls -1 /var/lib/neo4j/import/*.cql |
    while read jsonfile; do
      gosu neo4j:neo4j cypher-shell -u neo4j -p test -d neo4j -f $jsonfile
    done &
  ${exec_cmd} neo4j console
else
  ${exec_cmd} "$@"
fi

wait-for-it.sh: https://github.com/vishnubob/wait-for-it

There are many use cases, however, I feel that auto-import could have been implemented.
I also was not able to make the change on docker-compose level.

  1. Another issue is that "Failed to obtain a connection towards 'WRITE' server. routing table..."
    There are many scenarios, however, if you want to define external docker volumes. (like import/certificates/run etc.), then it happens.

The default scenarios are, that you want to save the import/conf... folder, and push to git, but when you run the docker-compose up, it's hiding the folder. So what guys are doing is, making a sudo 777 -R for the whole folder to make it visible in a different command prompt (outside of docker), and if you don't close the terminal, where the docker-compose up was running, the issue stays permanent, until you are not starting a new terminal. (the error message is very common, it can be anything if you just browse the net) You can't connect cypher-shell to the db.

Even there is some sort of security concern, it's definitely a crazy bug. (the most time-wasting activity)

Other thing is, as most of the guy is using docker, the neo4j-admin import command is useless, pls. do something with it!!!

Most of the guys are expecting the same behaviour as MongoDB/MySQL docker image.

  1. The desktop is also buggy, for example bloom does not show any node for the first time, just if you filter, and you are checking for hours, what the hell is going on.

the neo4j setup also not easy, needs so many tweaks, but I expect that community server works out of the box. One main feature is to be able to import. (there are so many type of import methods, that a newbie can just waste his time and motivation)

  1. I also expect that at least without creating a node, I can define a schema. (because the db itself automatically creates something permanent, what you can't clean later on)

  2. Also, expect that I can delete property keys even if I don't remove the whole db.

  3. Also, expect that the apoc.json.import won't throw null pointer exception without any debug log if the JSON format is not right. There is a difference between apoc.json.export vs. apoc.json.export.all...I would also deprecate some of the import mechanism, as it's too much and confusing. (at least merge it to one command, which just works, does not matter whether it's an existing or new db. - Who cares really, it's your internal functionality.)

  4. apoc.json.import won't work without colon at the end, pls. log a little bit more to figure out problems easier.

  5. I also expect that I can handle multiple db through neo4j desktop (i have two server one is enterprise other one is community-based). It's fine that bloom is restricted for the enterprise.
    Even if the community can handle only one db per instance, you can have multiple instances on the desktop.

If you would like to make some marketing, I would thoroughly test the whole product.
If my time is wasted that much, you can't expect that I will become an enterprise customer any time soon.

I would evaluate the product and compare with other type of db configs, as many guys are expecting something that would work in a logical or similar way at least.

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

3 participants