0

我在运行 hyperledger-explorer docker 映像时遇到分段错误,并且 docker 以代码 139 退出。

用于创建 explorer-db 的 docker-compose 文件

version: "2.1"

volumes:
  data:
  walletstore:
  pgadmin_4:
    external: true

networks:
  mynetwork.com:
    external:
      name: bikeblockchain_network

services:
  explorerdb.mynetwork.com:
    image: hyperledger/explorer-db:V1.0.0
    container_name: explorerdb.mynetwork.com
    hostname: explorerdb.mynetwork.com
    restart: always
    ports:
      - 54320:5432
    environment:
      - DATABASE_DATABASE=fabricexplorer
      - DATABASE_USERNAME=hppoc
      - DATABASE_PASSWORD=password
    healthcheck:
      test: "pg_isready -h localhost -p 5432 -q -U postgres"
      interval: 30s
      timeout: 10s
      retries: 5
    volumes:
      - data:/var/lib/postgresql/data
    networks:
      mynetwork.com:
        aliases:
          - postgresdb

  pgadmin:
      image: dpage/pgadmin4
      restart: always
      environment: 
        PGADMIN_DEFAULT_EMAIL: user@domain.com
        PGADMIN_DEFAULT_PASSWORD: SuperSecret
        PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION: "True"
        # PGADMIN_CONFIG_LOGIN_BANNER: "Authorized Users Only!"
        PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: 10
      volumes:
        - "pgadmin_4:/var/lib/pgadmin"
      ports:
        - 8080:80
      networks:
        - mynetwork.com 

docker-compose-explorer 文件

version: "2.1"

volumes:
  data:
  walletstore:
    external: true
  pgadmin_4:
    external: true

networks:
  mynetwork.com:
    external:
      name: bikeblockchain_network

services:
  explorer.mynetwork.com:
    image: hyperledger/explorer:V1.0.0
    container_name: explorer.mynetwork.com
    hostname: explorer.mynetwork.com
    # restart: always
    environment:
      - DATABASE_HOST=xx.xxx.xxx.xxx
      #Host is VM IP address with ports exposed for postgres. No issues here
      - DATABASE_PORT=54320
      - DATABASE_DATABASE=fabricexplorer
      - DATABASE_USERNAME=hppoc
      - DATABASE_PASSWD=password
      - LOG_LEVEL_APP=debug
      - LOG_LEVEL_DB=debug
      - LOG_LEVEL_CONSOLE=info
      # - LOG_CONSOLE_STDOUT=true
      - DISCOVERY_AS_LOCALHOST=false
    volumes:
      - ./config.json:/opt/explorer/app/platform/fabric/config.json
      - ./connection-profile:/opt/explorer/app/platform/fabric/connection-profile
      - ./examples/net1/crypto:/tmp/crypto
      - walletstore:/opt/wallet
      - ./crypto-config/:/etc/data
    command: sh -c "node /opt/explorer/main.js && tail -f /dev/null"
    ports:
      - 6060:6060
    networks:
      - mynetwork.com

错误

Attaching to explorer.mynetwork.com
explorer.mynetwork.com    | Segmentation fault
explorer.mynetwork.com exited with code 139

Postgres 工作正常。Docker 已更新到最新版本。正在使用的 Fabric 网络是在 IBM Blockchain VS Code 扩展中生成的。

4

2 回答 2

0

好的!!所以我做了一些测试,发现如果将Docker设置为在Windows登录时运行,资源管理器会抛出分段错误的错误,但是如果我在windows登录后手动启动Docker,它就可以正常工作。奇怪的 !!

于 2020-06-01T14:42:03.283 回答
0

我也面临与 docker 图像相同的问题,但我在手动上取得了成功,start.sh但在 docker 图像上却没有成功。经过一番探索,我知道这是由于某些架构构建相关,并且最新的v1.0.0容器映像中似乎存在分段错误问题。

这已在最新的 master 分支上修复它,但尚未在 Docker Hub 上发布。

build_docker_image.sh暂时请在本地使用自行构建 Explorer 容器镜像。

来自 hlf 论坛

于 2020-05-25T18:00:38.300 回答