Closed rddill-IBM closed 6 years ago
@davidkel can we get your help here please.
I am guessing that you get that error message when you invoke the issueIdentity api ? That error comes back from the fabric-ca server when you try to use an identity that isn't recognised by the ca or isn't allowed to issue new identities. The logs in the ca server would provide more detail as to the exact problem I would hope. Also run your application with sdk debug turned on export DEBUG=composer:*
it will generate a log file in the composer-logs directory which may also provide some useful info.
David, When I run my app in the Kubernetes environment, it fails when any user other than admin attempts to connect to the Business Network. All of the participants in the network fail with the
Error trying login and get user Context.
Error: Error trying to enroll user or load channel configuration.
Error: Enrollment failed with errors [[{"code":400,"message":"Authorization failure"}]]
error sequence. I attempted to resolve this error by adding code to invoke bindIdentity after a successful issueIdentity request. That sequence, shown in the preceding code block, fails with the 'object already exists' error message. The problem I'm really trying to solve is the first error message.
bindIdentity is not what you need. That error comes from the fabric-ca-server. The logs of the fabric-ca-server might indicate why it is giving an authorisation failure. The error is not too helpful, it could be the result of trying to issue an identity using an identity which is not authorised or it could be that you are trying to enroll a user that has already been enrolled for example (that problem could occur only if the fabric-ca-server has got a certain fix applied and I don't know what level of fabric that fix is in). I would also suggest getting the logs from your application as well as described in my previous append as it would show the flow of requests made to the ca server.
david, thanks. It turns out that the CA name and Channel Name in the Kubernetes configuration are different from what was used in the docker version. I've updated my install process to automatically extract the correct profile information from the admin card and use that data (specifically the content from connection.json) as my template when creating new users.
I have nodejs app supporting a dispute resolution network. The code runs successfully in the local, docker-based dev version, but fails consistently with authentication errors for users. I am running v0.16.2. The process I'm following (IBM Cloud, Free Kube Cluster) is:
Transition to nodejs app. one function in the app preloads the (demo) environment with Assets and Members. The code used to implement member creation follows.
Later in the application, I then use the id's for the members to connect to the business network and perform relevant functions. That code works 100% of the time in the Docker developer instance. In the Kubernetes environment, my app is failing 100% on the Business Network Connect function using the id's which were created in this process. the error is:
I thought that perhaps I was now required to invoke a bindIdentity after the issueIdentity, but that fails with
in hlf_connection/client.js
I'm stumped. been working on this for 2 days trying to tease out where the problem lies. I'm using the following for a connection profile (based on Docker dev enviroment, updated with correct ip address for Kube cluster). I am unsureif in your Kube cluster you're still using composerchannel in the Kube cluster. the ca element used to have a name element, but ca.org1.example.com always came up with a 404, so I removed that from the profile.