Inderjeet Singh
Inderjeet Singh

Reputation: 1

Getting Segmentation Fault on running hyperledger/explorer in docker container

I am getting segmentation fault and docker exited with code 139 on running hyperledger-explorer docker image.

docker-compose file for creating explorer-db

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: [email protected]
        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 file

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

error

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

Postgres is working fine. Docker is updated to the latest version. Fabric network being used is generated inside IBM Blockchain VS Code extension.

Upvotes: 0

Views: 421

Answers (2)

Inderjeet Singh
Inderjeet Singh

Reputation: 1

Okay!! So I did some testings and found that if, the Docker is set to Run on Windows Login, Explorer will throw error of segmentation fault, but if, I manually start Docker after windows login, it works well. Strange !!

Upvotes: 0

ravi
ravi

Reputation: 11

I too face the same problem with docker images but I was success on manual start.sh but not on the docker image. After some exploration, i came to know this is due to some architecture build related and there seem to be a segmentation fault issue in the latest v1.0.0 container image.

This get fixed it on the latest master branch, but not yet released it on Docker Hub.

Please build Explorer container image by yourself by using build_docker_image.sh on your local for the time being.

from hlf forum

Upvotes: 0

Related Questions