このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page
Help Center/ Blockchain Service/ User Guide (ME-Abu Dhabi Region)/ FAQs/ BCS FAQs/ Data Storage to the Blockchain/ What Can I Do When Transaction Connections Fail or Time Out?

What Can I Do When Transaction Connections Fail or Time Out?

Updated on 2023-10-11 GMT+08:00

Symptom

Transaction connections fail or time out.

Fault Locating

Check item 2: Check whether the instance status is abnormal.

Check item 3: Check whether the Fabric SDK version used by the client matches the BCS instance version.

Check item 4: Check whether the ledger of the peer is updated.

Check item 5: Check whether the DB file exists.

Check item 6: If a BCS instance uses CouchDB of an earlier version for ledger storage, check whether BCS becomes unavailable after CouchDB restarts.

Check item 7: Check whether data can be stored to blockchain even though the request initiated from a blockchain client has timed out.

Solution

  • Check item 3: Check whether the Fabric SDK version used by the client matches the BCS instance version.

    Log in to the BCS console, go to the Instance Management page, and click the abnormal instance to view its version.

    Record the value of Version. Check whether the Fabric SDK version used by the client is the same as the BCS version. If the versions are inconsistent, transactions may fail or time out.

    Solution

    Download the Fabric SDK of the version that corresponds to the Hyperledger Fabric version of BCS.

    Download link: https://github.com/hyperledger/fabric

  • Check item 4: Check whether the ledger of the peer is updated.
    1. Log in to the BCS console. In the navigation pane, click Instance Management. On the card containing the abnormal instance, click Manage Blockchain. On the Block Browser page, select the abnormal channel, and view the block quantity on the Block List tab page.
      Figure 1 Block List page
    2. Log in to the ECS where the blockchain is deployed, run the docker ps|grep k8s_peer command to check the peer containers, and record the ID of the container where transactions time out.
      Figure 2 Checking the peer containers
    3. Run the docker exec -it Container ID /bin/bash command to access the container.
      Figure 3 Accessing the container
    4. Run the peer channel list command to query the channel to which the peer is added.
      Figure 4 Querying the channel to which the peer is added
    5. Run the peer channel getinfo -c {Channel name} command to check whether the ledger of the peer is updated.
      Figure 5 Checking whether the ledger of the peer is updated

      If the block quantity in the ledger of the peer is different from that displayed on the Block Browser page, query the block quantity again after 10 minutes. If the block quantity keeps unchanged, the ledger of the peer is not updated due to insufficient resources or high concurrency. As a result, transactions become abnormal.

  • Check item 5: Check whether the DB file exists.
    1. Log in to the ECS where the blockchain is deployed, run the docker ps|grep k8s_peer command to check the peer containers, and record the ID of the container where transactions are abnormal.
      Figure 6 Checking the peer containers
    2. Run the docker exec -it Container ID /bin/bash command to access the container.
      Figure 7 Accessing the container
    3. Run the cd /var/log/baas-service/peer/ command to go to the directory where the logs of the peer are stored, and run the ll command to view all files.
      Figure 8 Viewing all files
    4. Obtain the hash value and sequence number of the peer.

      On the Block Browser page of the Blockchain Management console, view the domain name and sequence number of the peer in the Domain of Peer column in the Peer Status list.

      Figure 9 Peer Status list
    5. The peer log file is named in the following format: peer-{Hash value}-{Serial number}.trace. Run cat {File name}|grep -C 5 "Fail to recover DB: file does not exist" to search for exception information.

      If you see Fail to recover DB: file does not exist, the DB file of the peer does not exist. As a result, transactions are abnormal.

  • Check item 6: If a BCS instance uses CouchDB of an earlier version for ledger storage, check whether BCS becomes unavailable after CouchDB restarts.

    If CloudDB is used for ledger storage for an instance of an earlier version, the status data is not stored in the SFS file system. If BCS is restarted, CouchDB will reload the block data to generate the status data, and BCS will be unavailable for a certain period of time.

    It takes about 2 hours to synchronize data of 150,000 blocks. During data synchronization, port 7051 of the peer cannot be accessed.

    Solution:

    1. Upgrade the BCS instance to the latest version to avoid this problem when you perform upgrade or restart.
      NOTE:

      When a BCS instance is upgraded to the latest version for the first time, the CouchDB container mounts the web disk and synchronizes status data. As a result, the BCS instance is unavailable for a certain period of time. This duration increases linearly as the block quantity increases. It takes about 2 hours to synchronize data for every 150,000 blocks. The block quantity can be viewed on the Block Browser page of the Blockchain Management console.

    2. Log in to the BCS console. Choose More > Upgrade on the instance card.
    3. In the dialog box that is displayed, view the current instance version or upgrade the BCS instance to the latest version.
      NOTE:
      • Instances are unavailable during version upgrade. In a consortium, if your blockchain upgrades, all consortium blockchains must also upgrade. Reach an agreement with consortium members before you perform upgrade to eliminate effects on their blockchains.
      • Do not initiate version upgrade when the chaincode is being installed or instantiated.
      • BCS v4.x.x corresponds to Hyperledger Fabric v2.2.
      • You can only upgrade BCS from an earlier version to a later version. Rollback is supported only if the upgrade fails.
  • Check item 7: Check whether data can be stored to blockchain even though the request initiated from a blockchain client has timed out.

    If the error message request timed out or been cancelled is displayed on the client and UTC is more than 15mos apart from current server time is displayed in the organization node logs, ensure that the time and time zone of the client are the same as those of the organization node.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback