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

'Database 'neo4j' is unavailable' -- in Docker build #1

Open
imranur-rahman opened this issue Sep 12, 2024 · 3 comments
Open

'Database 'neo4j' is unavailable' -- in Docker build #1

imranur-rahman opened this issue Sep 12, 2024 · 3 comments
Assignees

Comments

@imranur-rahman
Copy link

imranur-rahman commented Sep 12, 2024

Hello, I am trying to use the neo4j dataset created for Maven. But when trying to build the Docker image, I am facing this error:

docker compose up --build
[+] Building 1667.1s (19/19) FINISHED                      docker:desktop-linux
 => [neo4j internal] load build definition from Dockerfile.neo4j           0.0s
 => => transferring dockerfile: 408B                                       0.0s
 => [neo4j internal] load metadata for docker.io/library/neo4j:4.4.36-com  0.7s
 => [neo4j internal] load .dockerignore                                    0.0s
 => => transferring context: 2B                                            0.0s
 => [neo4j 1/4] FROM docker.io/library/neo4j:4.4.36-community@sha256:35  146.9s
 => => resolve docker.io/library/neo4j:4.4.36-community@sha256:357deaca05  0.0s
 => => sha256:5c14ea5bd28a65eb584dbc13e080a28deed5b 142.35MB / 142.35MB  145.3s
 => => sha256:c933ecc6363136348e7d158fb1f0ed6260097b755c5 2.13kB / 2.13kB  0.0s
 => => sha256:45ddf694f96f6f28504a4ef1a14f25960dbc9a116ee 5.46kB / 5.46kB  0.0s
 => => sha256:172514850d5c3a8b3bc66fd0f1f345729d1b0b24 30.07MB / 30.07MB  50.4s
 => => sha256:cc4ca2a75833ad01c705ce1efa5c2169401da14a6fc 3.87kB / 3.87kB  2.2s
 => => sha256:357deaca05e213b5574b9462def0625b2607ed342a2 2.67kB / 2.67kB  0.0s
 => => sha256:2a775bc2de2bc740e2ffbf4d54dc5dab407b24189e7 9.52kB / 9.52kB  3.2s
 => => sha256:ee13b861a5bca2f15aa1993a9c50899596b80 126.05MB / 126.05MB  140.7s
 => => extracting sha256:172514850d5c3a8b3bc66fd0f1f345729d1b0b249cc3f053  0.8s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6 32B / 32B  53.5s
 => => extracting sha256:5c14ea5bd28a65eb584dbc13e080a28deed5b2dfc84ae265  0.9s
 => => extracting sha256:cc4ca2a75833ad01c705ce1efa5c2169401da14a6fc4cfa4  0.0s
 => => extracting sha256:2a775bc2de2bc740e2ffbf4d54dc5dab407b24189e748fad  0.0s
 => => extracting sha256:ee13b861a5bca2f15aa1993a9c50899596b8034ff827ae19  0.6s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6  0.0s
 => [neo4j 2/4] RUN apt-get update && apt-get install -y curl && apt-get   5.9s
 => [neo4j 3/4] RUN curl -C - -L -o /data/Goblin_Maven_Central_Graph.d  1364.0s
 => [neo4j 4/4] RUN neo4j-admin load --from=/data/Goblin_Maven_Central_G  33.8s
 => [neo4j] exporting to image                                            30.5s
 => => exporting layers                                                   30.5s
 => => writing image sha256:a6a89f591e5e25964f0dae668a052e809e98df369dfda  0.0s
 => => naming to docker.io/library/neo4jweaverdocker-neo4j                 0.0s
 => [neo4j] resolving provenance for metadata file                         0.0s
 => [weaver internal] load build definition from Dockerfile.weaver         0.0s
 => => transferring dockerfile: 496B                                       0.0s
 => [weaver internal] load metadata for docker.io/library/openjdk:17-jdk-  0.8s
 => [weaver internal] load .dockerignore                                   0.0s
 => => transferring context: 2B                                            0.0s
 => [weaver 1/5] FROM docker.io/library/openjdk:17-jdk-slim@sha256:aaa3b  69.3s
 => => resolve docker.io/library/openjdk:17-jdk-slim@sha256:aaa3b3cb27e3e  0.0s
 => => sha256:aaa3b3cb27e3e520b8f116863d0580c438ed55ecfa0bc12 547B / 547B  0.0s
 => => sha256:d732b25fa8a6944d312476805d086aeaaa6c9e2fbc3aefd 953B / 953B  0.0s
 => => sha256:8a3a2ffec52aef5b3f650bb129502816675eac3d351 4.81kB / 4.81kB  0.0s
 => => sha256:6d4a449ac69c579312443ded09f57c4894e7adb4 30.07MB / 30.07MB  30.4s
 => => sha256:a59f13dc084e185af417a4c6d1be2534adaff0c4f35 1.36MB / 1.36MB  0.4s
 => => sha256:1d5035d2d5c6c24e610a9317c6907a7c58efd5 186.53MB / 186.53MB  68.2s
 => => extracting sha256:6d4a449ac69c579312443ded09f57c4894e7adb42f7406ab  0.8s
 => => extracting sha256:a59f13dc084e185af417a4c6d1be2534adaff0c4f35ac216  0.0s
 => => extracting sha256:1d5035d2d5c6c24e610a9317c6907a7c58efd512757d5598  1.1s
 => [weaver 2/5] RUN apt-get update && apt-get install -y curl && apt-get  5.8s
 => [weaver 3/5] WORKDIR /app                                              0.0s
 => [weaver 4/5] RUN curl -C - -L -o /app/goblinWeaver-2.1.0.jar https://  9.0s
 => [weaver 5/5] RUN chmod -R 777 /app                                     0.1s
 => [weaver] exporting to image                                            0.1s
 => => exporting layers                                                    0.0s
 => => writing image sha256:4d88f1494a5a11534babf3808d064e46be86aa92b0de7  0.0s
 => => naming to docker.io/library/neo4jweaverdocker-weaver                0.0s
 => [weaver] resolving provenance for metadata file                        0.0s
[+] Running 3/2
 ✔ Network neo4jweaverdocker_default  Created                              0.0s 
 ✔ Container neo4jMaven               Created                              0.1s 
 ✔ Container goblinWeaver             Created                              0.0s 
Attaching to goblinWeaver, neo4jMaven
neo4jMaven    | Warning: Some files inside "/data" are not writable from inside container. Changing folder owner to neo4j.
neo4jMaven    | Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time.
neo4jMaven    | 2024-09-12 21:27:21.729+0000 INFO  Starting...
neo4jMaven    | 2024-09-12 21:27:21.944+0000 INFO  This instance is ServerId{c566b93b} (c566b93b-faeb-4b7b-a635-b506abb2911a)
neo4jMaven    | 2024-09-12 21:27:22.485+0000 INFO  ======== Neo4j 4.4.36 ========
neo4jMaven    | 2024-09-12 21:27:23.244+0000 INFO  Initializing system graph model for component 'security-users' with version -1 and status UNINITIALIZED
neo4jMaven    | 2024-09-12 21:27:23.250+0000 INFO  Setting up initial user from `auth.ini` file: neo4j
neo4jMaven    | 2024-09-12 21:27:23.250+0000 INFO  Creating new user 'neo4j' (passwordChangeRequired=false, suspended=false)
neo4jMaven    | 2024-09-12 21:27:23.255+0000 INFO  Setting version for 'security-users' to 3
neo4jMaven    | 2024-09-12 21:27:23.256+0000 INFO  After initialization of system graph model component 'security-users' have version 3 and status CURRENT
neo4jMaven    | 2024-09-12 21:27:23.259+0000 INFO  Performing postInitialization step for component 'security-users' with version 3 and status CURRENT
neo4jMaven    | 2024-09-12 21:27:23.310+0000 INFO  Bolt enabled on [0:0:0:0:0:0:0:0%0]:7687.
neo4jMaven    | 2024-09-12 21:27:23.781+0000 INFO  Remote interface available at http://localhost:7474/
neo4jMaven    | 2024-09-12 21:27:23.783+0000 INFO  id: 63A9A47D4DF4DD9E12051CB5C48FB62E9CACD06055CA6CC00521570919B89C0C
neo4jMaven    | 2024-09-12 21:27:23.783+0000 INFO  name: system
neo4jMaven    | 2024-09-12 21:27:23.783+0000 INFO  creationDate: 2024-09-12T21:27:22.739Z
neo4jMaven    | 2024-09-12 21:27:23.783+0000 INFO  Started.
goblinWeaver  | Exception in thread "main" java.lang.reflect.InvocationTargetException
goblinWeaver  | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
goblinWeaver  | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
goblinWeaver  | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
goblinWeaver  | 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
goblinWeaver  | 	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
goblinWeaver  | 	at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
goblinWeaver  | 	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
goblinWeaver  | 	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
goblinWeaver  | Caused by: org.neo4j.driver.exceptions.TransientException: Database 'neo4j' is unavailable.
goblinWeaver  | 	at org.neo4j.driver.internal.util.Futures.blockingGet(Futures.java:111)
goblinWeaver  | 	at org.neo4j.driver.internal.InternalSession.run(InternalSession.java:64)
goblinWeaver  | 	at org.neo4j.driver.internal.InternalSession.run(InternalSession.java:49)
goblinWeaver  | 	at org.neo4j.driver.internal.AbstractQueryRunner.run(AbstractQueryRunner.java:34)
goblinWeaver  | 	at org.neo4j.driver.internal.AbstractQueryRunner.run(AbstractQueryRunner.java:49)
goblinWeaver  | 	at com.cifre.sap.su.goblinWeaver.graphDatabase.neo4j.Neo4jGraphDatabase.<init>(Neo4jGraphDatabase.java:38)
goblinWeaver  | 	at com.cifre.sap.su.goblinWeaver.graphDatabase.GraphDatabaseSingleton.getInstance(GraphDatabaseSingleton.java:21)
goblinWeaver  | 	at com.cifre.sap.su.goblinWeaver.Neo4jEcosystemWeaverApplication.main(Neo4jEcosystemWeaverApplication.java:13)
goblinWeaver  | 	... 8 more
goblinWeaver  | 	Suppressed: org.neo4j.driver.internal.util.ErrorUtil$InternalExceptionCause
goblinWeaver  | 		at org.neo4j.driver.internal.util.ErrorUtil.newNeo4jError(ErrorUtil.java:87)
goblinWeaver  | 		at org.neo4j.driver.internal.async.inbound.InboundMessageDispatcher.handleFailureMessage(InboundMessageDispatcher.java:107)
goblinWeaver  | 		at org.neo4j.driver.internal.messaging.common.CommonMessageReader.unpackFailureMessage(CommonMessageReader.java:75)
goblinWeaver  | 		at org.neo4j.driver.internal.messaging.common.CommonMessageReader.read(CommonMessageReader.java:53)
goblinWeaver  | 		at org.neo4j.driver.internal.async.inbound.InboundMessageHandler.channelRead0(InboundMessageHandler.java:81)
goblinWeaver  | 		at org.neo4j.driver.internal.async.inbound.InboundMessageHandler.channelRead0(InboundMessageHandler.java:37)
goblinWeaver  | 		at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
goblinWeaver  | 		at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
goblinWeaver  | 		at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
goblinWeaver  | 		at org.neo4j.driver.internal.async.inbound.MessageDecoder.channelRead(MessageDecoder.java:42)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
goblinWeaver  | 		at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
goblinWeaver  | 		at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
goblinWeaver  | 		at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454)
goblinWeaver  | 		at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
goblinWeaver  | 		at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
goblinWeaver  | 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
goblinWeaver  | 		at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
goblinWeaver  | 		at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
goblinWeaver  | 		at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
goblinWeaver  | 		at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
goblinWeaver  | 		at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
goblinWeaver  | 		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
goblinWeaver  | 		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
goblinWeaver  | 		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
goblinWeaver  | 		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
goblinWeaver  | 		at java.base/java.lang.Thread.run(Thread.java:833)
goblinWeaver exited with code 1

Seems like the error is coming from the unavailability of neo4j database. Do you have any idea how to resolve this issue?

@pascalpoizat
Copy link

@DaJaime Hello Damien, any insights ?
@imranur-rahman Sorry, I did not get the notification for your issue. We will look at it quick.

@danielogen
Copy link

I am having a similar issue: goblinWeaver | Caused by: org.neo4j.driver.exceptions.TransientException: Database 'neo4j' is unavailable.

@pascalpoizat
Copy link

We are trying to reproduce the error. I got another one with the same initial warning (see #3) and increasing virtual disk limit was the solution. But we did not get your exact error. Still working on it. Do you have information on your configuration (OS, Docker desktop or docker engine, versions, etc) ?

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

4 participants