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

Error enrolling client invalid character 'p' after top-level value #2

Open
yogeshmu opened this issue Aug 5, 2017 · 1 comment
Open

Comments

@yogeshmu
Copy link

yogeshmu commented Aug 5, 2017

Hi,

I am getting below error while enrolling client. Below is code in main. go
I checked config/port/container being up. All looks ok. Any pointers?

package main

import (
"github.com/CognitionFoundry/gohfc"
"fmt"
"os"
)

func main() {
kvsore, err := gohfc.NewFileKeyValue("./kvstore")
if err != nil {
fmt.Printf("Error creating kvstore %s\n", err)
os.Exit(1)
}
client, err := gohfc.NewClientFromJSONConfig("./config.json", kvsore)
fmt.Printf("Check1")
if err != nil {
fmt.Printf("Error creating client %s\n", err)
os.Exit(1)
}

    identity, err := client.Enroll("admin", "adminpw")
    if err != nil {
            fmt.Printf("Error enrolling client %s\n", err)
            os.Exit(1)
    }

fmt.Printf("Check2")

client.JoinChannel(identity.Certificate,"payments", "DEFAULT",client.Peers, client.Orderers[0])

            if err != nil {
            gohfc.Logger.Debugf("Erro creating chain %s", err)
            return
    }

}

@gatakka
Copy link
Contributor

gatakka commented Oct 31, 2017

This is for old version.

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

2 participants