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

When I deploy with the latest image, explorer fails to start #481

Open
lgy1027 opened this issue Jan 2, 2024 · 0 comments
Open

When I deploy with the latest image, explorer fails to start #481

lgy1027 opened this issue Jan 2, 2024 · 0 comments

Comments

@lgy1027
Copy link

lgy1027 commented Jan 2, 2024

What happened?

When I deploy with the latest image, explorer fails to start

What did you expect to happen?

Normal start

How can we reproduce it (as minimally and precisely as possible)?

explorer-config.yaml
`
apiVersion: v1
kind: ConfigMap
metadata:
name: explorer-config
namespace: hyperledger
labels:
app: explorer
data:
org1ProdNetworkConnection.json: |
{
"name": "prod-network",
"version": "1.0.0",
"client": {
"tlsEnable": true,
"adminCredential": {
"id": "admin",
"password": "admin"
},
"enableAuthentication": true,
"organization": "Org1MSP",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"heroschannel": {
"peers": {
"peer0.hyperledger.svc.cluster.local": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"peers": [
"peer0.hyperledger.svc.cluster.local"
],
"adminPrivateKey": {
"path": "/var/hyperledger/crypto-config/peerOrganizations/hyperledger.svc.cluster.local/users/[email protected]/msp/keystore/priv_sk"
},
"signedCert": {
"path": "/var/hyperledger/crypto-config/peerOrganizations/hyperledger.svc.cluster.local/users/[email protected]/msp/signcerts/[email protected]"
}
}
},
"peers": {
"peer0.hyperledger.svc.cluster.local": {
"url": "grpcs://peer0.hyperledger.svc.cluster.local:7051",
"grpcOptions": {
"ssl-target-name-override": "peer0.hyperledger.svc.cluster.local",
"hostnameOverride": "peer0.hyperledger.svc.cluster.local",
"request-timeout": 120001
},
"tlsCACerts": {
"path": "/var/hyperledger/crypto-config/peerOrganizations/hyperledger.svc.cluster.local/peers/peer0.hyperledger.svc.cluster.local/tls/ca.crt"
}
}
}
}

config.json: |
{
"network-configs": {
"prod-network": {
"name": "Prod Network",
"profile": "./connection-profile/org1ProdNetworkConnection.json"
}
},
"license": "Apache-2.0"
}
`
explorer-db.yaml

`
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: hyperledger
name: explorer-db
spec:
selector:
matchLabels:
app: explorer-db
template:
metadata:
labels:
app: explorer-db
spec:
containers:
- name: explorer-db
image: ghcr.io/hyperledger-labs/explorer-db:latest@sha256:385688d3e05e77ba44f016905f5023339edf451d23396f7bd5c6126544801562
imagePullPolicy: IfNotPresent
env:
- name: DATABASE_DATABASE
value: "fabricexplorer"
- name: DATABASE_USERNAME
value: "hppoc"
- name: DATABASE_PASSWORD
value: "password"
livenessProbe:
exec:
command:
- pg_isready
- -h
- localhost
- -p
- "5432"
- -U
- postgres
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 5
readinessProbe:
exec:
command:
- pg_isready
- -h
- localhost
- -p
- "5432"
- -U
- postgres
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 5
ports:
- containerPort: 5432
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: fabric-volume
subPath: explorer-db
volumes:
- name: fabric-volume
persistentVolumeClaim:
claimName: fabric

apiVersion: v1
kind: Service
metadata:
namespace: hyperledger
name: explorer-db
spec:
selector:
app: explorer-db
ports:
- name: conn
port: 5432
protocol: TCP
`

explorer.yaml

`
apiVersion: apps/v1
kind: Deployment
metadata:
name: explorer
spec:
selector:
matchLabels:
app: explorer
template:
metadata:
labels:
app: explorer
spec:
containers:
- name: explorer
image: ghcr.io/hyperledger-labs/explorer:latest@sha256:8b8a7a8c70266dd7ce79b128b8f79ac0c0f961c1f3fe87fe744ecda2feac7eb3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
env:
- name: DATABASE_HOST
value: explorer-db.hyperledger.svc.cluster.local
- name: DATABASE_DATABASE
value: "fabricexplorer"
- name: DATABASE_USERNAME
value: "hppoc"
- name: DATABASE_PASSWD
value: "password"
- name: LOG_LEVEL_APP
value: "debug"
- name: LOG_LEVEL_DB
value: "debug"
- name: LOG_LEVEL_CONSOLE
value: "debug"
- name: LOG_CONSOLE_STDOUT
value: "true"
- name: DISCOVERY_AS_LOCALHOST
value: "false"
resources:
limits:
cpu: "4"
memory: 4Gi
requests:
cpu: "2"
memory: 2Gi
volumeMounts:
- mountPath: /var/hyperledger/crypto-config
name: explorer
subPath: crypto-config
- mountPath: /opt/explorer/app/platform/fabric/config.json
name: explorer-config
subPath: config.json
- mountPath: /opt/explorer/app/platform/fabric/connection-profile/org1ProdNetworkConnection.json
name: explorer-config
subPath: org1ProdNetworkConnection.json
- mountPath: /opt/explorer/wallet
name: explorer
subPath: explorer-wallet
volumes:
- name: explorer-config
configMap:
name: explorer-config
- name: explorer
persistentVolumeClaim:
claimName: fabric

apiVersion: v1
kind: Service
metadata:
name: explorer-service
spec:
selector:
app: explorer
ports:
- protocol: TCP
port: 9090
targetPort: 8080
`

Anything else we need to know?

image

OS version

Linux: Linux ecs-zhisuan-0001 4.14.0-115.el7a.0.1.aarch64 #1 SMP Sun Nov 25 20:54:21 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

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

1 participant