Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-12641

Allow plugins to vendor fabric packages

    XMLWordPrintable

Details

    • Story
    • Status: Closed
    • High
    • Resolution: Won't Do
    • v1.2.0
    • WON'T FIX
    • fabric-peer
    • None
    • Unset
    • Unset
    • Unset

    Description

      I added the configuration of the system chaincode plugins in the core.yaml file.

       

      //代码占位符
      # system chaincodes whitelist. To add system chaincode "myscc" to the    
      # whitelist, add "myscc: enable" to the list below, and register in    
      # chaincode/importsysccs.go
      system:        
          cscc: enable        
          lscc: enable        
          escc: enable        
          vscc: enable        
          qscc: enable        
          ccscc: enable
      
      # System chaincode plugins: in addition to being imported and compiled    
      # into fabric through core/chaincode/importsysccs.go, system chaincodes    
      # can also be loaded as shared objects compiled as Go plugins.    
      # See examples/plugins/scc for an example.    
      # Like regular system chaincodes, plugins must also be white listed in the    
      # chaincode.system section above.
      systemPlugins:
          - enabled: true
            name: ccscc
            path: /opt/lib/ccscc.so
            invokableExternal: true
            invokableCC2CC: true

      When I start the peer node, fabric reported the following error to me:

      //代码占位符
      2018-10-29 09:06:29.677 UTC [nodeCmd] serve -> INFO 001 Starting peer:
       Version: 1.2.1
       Commit SHA: 937b2bc47
       Go version: go1.10
       OS/Arch: linux/amd64
       Experimental features: false
       Chaincode:
        Base Image Version: 0.4.10
        Base Docker Namespace: hyperledger
        Base Docker Label: org.hyperledger.fabric
        Docker Namespace: hyperledger
      
      2018-10-29 09:06:29.678 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
      2018-10-29 09:06:29.678 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
      2018-10-29 09:06:29.813 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
      2018-10-29 09:06:29.814 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
      2018-10-29 09:06:29.815 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.17.0.2:7051
      2018-10-29 09:06:29.815 UTC [peer] func1 -> INFO 007 Host is 0.0.0.0 , falling back to auto-detected address: 172.17.0.2:7051
      2018-10-29 09:06:29.816 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.17.0.2:7051
      2018-10-29 09:06:29.817 UTC [peer] func1 -> INFO 009 Host is 0.0.0.0 , falling back to auto-detected address: 172.17.0.2:7051
      2018-10-29 09:06:29.819 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00a Entering computeChaincodeEndpoint with peerHostname: 172.17.0.2
      2018-10-29 09:06:29.820 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: 172.17.0.2:7052
      2018-10-29 09:06:29.820 UTC [nodeCmd] createChaincodeServer -> WARN 00d peer.chaincodeListenAddress is not set, using 172.17.0.2:7052
      2018-10-29 09:06:29.819 UTC [eventhub_producer] start -> INFO 00b Event processor started
      panic: /debug/requests is already registered. You may have two independent copies of golang.org/x/net/trace in your binary, trying to maintain separate state. This may involve a vendored copy of golang.org/x/net/trace.
      
      goroutine 1 [running]:goroutine 1 [running]:git.querycap.com/cloudchain/chaincode/vendor/golang.org/x/net/trace.init.0() /home/xql/gopath/src/git.querycap.com/cloudchain/chaincode/vendor/golang.org/x/net/trace/trace.go:116 +0x151plugin.open(0xc4204e6840, 0xe, 0xc420099380, 0x0, 0x0) /opt/go/src/plugin/plugin_dlopen.go:113 +0xb21plugin.Open(0xc4204e6840, 0x11, 0x157c5c0, 0xc420099380, 0x0) /opt/go/src/plugin/plugin.go:32 +0x35github.com/hyperledger/fabric/core/scc.loadPlugin(0xc4204e6840, 0x11, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:70 +0x175github.com/hyperledger/fabric/core/scc.loadSysCCsWithConfig(0xc42000e518, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:51 +0xa6github.com/hyperledger/fabric/core/scc.loadSysCCs.func1() /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:44 +0x97sync.(*Once).Do(0x1d9b850, 0x14dec68) /opt/go/src/sync/once.go:44 +0xbegithub.com/hyperledger/fabric/core/scc.loadSysCCs(0xc42049bc20, 0xc42000e4e0, 0xc42049bc20, 0x1560ec0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/loadsysccs.go:38 +0x39github.com/hyperledger/fabric/core/scc.CreateSysCCs(0x1579800, 0xc42000e4e0, 0xc42049bc20, 0x1560ec0, 0xc4203429f0, 0x25f, 0x3c0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/scc/register_pluginsenabled.go:20 +0x98github.com/hyperledger/fabric/peer/node.registerChaincodeSupport(0xc4201c35e0, 0xc4205326d0, 0xf, 0x1572580, 0xc42000e3f0, 0x1560ec0, 0xc4203429f0, 0x0, 0x0, 0x12de6e0, ...) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:633 +0x5dfgithub.com/hyperledger/fabric/peer/node.serve(0x1d9b768, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:231 +0xaf8github.com/hyperledger/fabric/peer/node.glob..func1(0x1c94ce0, 0x1d9b768, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:111 +0x9cgithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x1c94ce0, 0x1d9b768, 0x0, 0x0, 0x1c94ce0, 0x1d9b768) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46dgithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1c95340, 0x1d7dc70, 0xf, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1c95340, 0x1, 0xffffffffffffffff) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2bmain.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:97 +0x5bf

       

       

      Attachments

        Issue Links

          Activity

            People

              mastersingh24 Gari Singh
              gotoxu 乔伦 徐
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: