Closed Shishkovskiy closed 1 year ago
I think you're going to have much better luck on StackOverflow, as my only guesses are that this is related to the docker configuration.
Can you access the DB at: http://neo4j:7474
?
@cskardon Nope, http can't be used here. I have to use bolt
or neo4j.
In this case, neo4j is running and I can join from the browser. But when I tried to call my endpoint I've got the error 👎 and I have no clue what is wrong here.
So that's what I'm asking - when you go to the browser what address are you using?
@cskardon I`m using bolt://localhost:7687, but in the scope of docker, I can't use localhost because the container has no idea what the local host is, and each of them is isolated and has its host as I understood)
So.
From outside of docker - can you connect to the browser? i.e. http://SOMETHING:7474
?
@cskardon Yes, when I run the docker images, I can go to the browser and connect)
So, the URI that you would use would be neo4j://localhost:7687
? If that is how you would connect to the browser, that's how the code would also connect
@cskardon I've already found the issues, to tell the truth there were several issues :) Now it works, maybe it'll be useful for someone who struggle with it as well.
version: '3.4'
services:
server:
image: "webapi-image"
ports:
- "8080:80"
build:
context: .
dockerfile: Dockerfile
environment:
- NEO4JCONFIGURATION__URI=bolt://neo4j:7687
- NEO4JCONFIGURATION__USERNAME=neo4j
- NEO4JCONFIGURATION__PASSWORD=6C2coi7kwnyYb7hNmfyvYNkyhxB!
depends_on:
neo4j:
condition: service_healthy
neo4j:
image: "neo4j:3.5"
ports:
- "7687:7687"
- "7474:7474"
volumes:
- ./neo4j/data:/data
- ./neo4j/logs:/logs
- ./neo4j/import:/var/lib/neo4j/import
- ./neo4j/plugins:/plugins
environment:
- NEO4J_AUTH=neo4j/6C2coi7kwnyYb7hNmfyvYNkyhxB!
healthcheck:
test: wget http://localhost:7474 || exit 1
interval: 1s
timeout: 10s
retries: 10
start_period: 3s
Hi there, I'm using .Net 6.0 Neo4jClient 5.1.3 Neo4j 5.3.0
I've been trying to run my app in Docker and I've got the error :
Neo4j.Driver.ServiceUnavailableException: Connection with the server breaks due to ExtendedSocketException: Name or service not known Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.
Please, take a look at these configuration files. If someone knows where the issue is, please lemme know because, to tell the truth, I have no idea what is wrong here. I appreciate any help you can provide.
appsettings.json
Creating client
docker-compose.yml