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

print an error message if neo4j is already running #362

Open
wants to merge 581 commits into
base: master
Choose a base branch
from

Conversation

xavieryao
Copy link

Bug: neo4j container sometimes fails to start without outputting any message, after being forced to stop.

This happens if the --time / stop_grace_period of docker stop or docker compose stop is not long enough, for example the default value 10 seconds. The output of

gosu neo4j:neo4j neo4j console --dry-run "${extraArgs[@]}"

will become Neo4j is already running (pid:1), but the entry point script will not show any error message.

It will be really helpful for users to debug if the entry point script could point out why neo4j console --dry-run fails, or at least print an error message if the problem is that the pid file already exists and provide some solutions (what I did in this PR).

  • Steps to reproduce.
docker create --name neo4j neo4j:4.4-community
docker start neo4j
# wait after neo4j is started
docker stop neo4j -t 10 # default is 10 seconds, lower the value if not able to reproduce
docker start -ai neo4j
  • Expected behaviour: neo4j starts, or shows a message about why it fails to start
  • Actual behaviour: containers exits with code 1, without any output.
  • Neo4j image tag being used: neo4j:4.4-community. I assume this also applies to other tags.
  • The output of the docker version command
Server: Docker Engine - Community
 Engine:
  Version:          20.10.16
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.10
  Git commit:       f756502
  Built:            Thu May 12 09:15:28 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.4
  GitCommit:        212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
 runc:
  Version:          1.1.1
  GitCommit:        v1.1.1-0-g52de29d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

jennyowen and others added 30 commits December 4, 2019 10:05
Replaced curl with wget in the entrypoint
…ndencies that are not on maven central can be picked up (e.g. betas and release candidates)
Add neo4j m2 repo (community) & always run the plugins tests
…ng a pattern from make e.g. make test TESTS='*Plugin*'
… the user has not already set the configuration value in question)
…matically

apply default configurations for plugins when installing a plugin
add the ability to easily run a particular junit test
Improve handling of NEO4J_ config setting env variables
Add NEO4JLABS_PLUGINS  support for neosemantics (n10s)
jennyowen and others added 29 commits June 13, 2022 17:09
… by docker. Moved check to enterprise only defaults
In *5.0 Enterprise* edition all user databases are started asynchronously. Meaning when the start is
complete ("Started" is printed in the user log) and the http endpoint responds with 200 that does not
mean that the user databases and so the default database "neo4j" is available.
All tests which assume that, are likely to fail. This change modifies the readiness criteria (only
for enterprise && >=5.0) that instead of waiting for 200 on the generic http endpoint it waits for
200 for the database's availability endpoint: /db/<dbname>/cluster/available (for this the caller
needs to authenticate).
Refine startup criteria for 5.0-Enterprise containers
This reverts commit 0943c9c, reversing
changes made to ff8ab0f.
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

Successfully merging this pull request may close these issues.