Не могу подключиться к neo4j через контейнер Docker, запущенный с помощью Docker-compose - PullRequest
0 голосов
/ 29 октября 2019

Это docker-compose.yml file:

neo4j-service:
    image: neo4j:3.5.8
    container_name: neo4j-service
    ports:
      - "7474:7474"
      - "7687:7687"
    networks:
      - backend
    environment:
      - NEO4J_dbms_security_procedures_unrestricted=apoc.*
      - NEO4J_apoc_import_file_enabled=true
      - NEO4J_dbms_shell_enabled=true
      - NEO4J_AUTH=neo4j/pwd
    volumes:
      - .\lib\neo4j\plugins:/plugins
      - neo4j_data:/data
      - neo4j_import:/import

Я запускаю файл docker-compose в док-терминале (виртуальная среда)

docker-compose up -d

Когда я захожу в браузер http://{docker-machine-ip}:7474/browser/

& Я ввожу следующие учетные данные, для которых не удается войти в систему:

host: bolt://{docker-machine-ip}:7687

user: neo4j

password:pwd

Ошибка ответа:

 ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: 3

В браузере Chrome:

neo4j-driver.chunkhash.bundle.js:1 WebSocket connection to 'ws://{docker-machine-ip}:7687/' failed: Connection closed before receiving a handshake response

Я ссылался на эту ссылку, и у них была та же проблема:

  1. Не удается подключиться к веб-панели neo4j через докер-контейнер, запущенный с помощью docker-compose

Я много гуглил, но все еще не мог решить проблему.

...