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

Login failed: #28

Open
pranavpawar3 opened this issue Oct 4, 2020 · 6 comments
Open

Login failed: #28

pranavpawar3 opened this issue Oct 4, 2020 · 6 comments

Comments

@pranavpawar3
Copy link

Hi,

I have been able to successfully start the web API service; though when I try to log in it denies the login.

some logs for reference are as follows --

$ node server.js
>>>connectGatewayFromConfig:  
Platform = LOCAL
walletpath = ../../gateway/local/gen_local_wallet
user: admin, pwd:  adminpw, usertype:  admin
MSP ID: Org1MSP
Connect to Fabric gateway.
Use network channel: mychannel
Use gensupplychainnet smart contract.
Connecting to event hub...peer0.org1.example.com:17051
Server listening on 3000

$ ng serve    
Your global Angular CLI version (10.1.4) is greater than your local
version (7.3.9). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
                                                                                                 
Date: 2020-10-04T18:22:17.932Z
Hash: 14a2775862de3103c796
Time: 17369ms
chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 285 kB [initial] [rendered]
chunk {main} main.js, main.js.map (main) 317 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 236 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 998 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 7.02 MB [initial] [rendered]
ℹ 「wdm」: Compiled successfully.

image

Can someone please help out with this? Would be very helpful to know if I am missing anything.

Thanks!

@winf3
Copy link

winf3 commented Nov 29, 2020

Same problem here. In the readme.md under Step 7 it says to use User admin and Password adminpw. I am connected via gateway: 2 org local platform - Org1 using ID ; admin. I also get a login failed.
I develop with VS Code IBM Blockchain Platform Extension.
What do I need to check for the right password ?

@winf3
Copy link

winf3 commented Nov 30, 2020

platform-setup

This is my current setup in VS Code IBM Blockchain Platform

@pranavpawar3
Copy link
Author

Hi @winf3 , have you hosted the VS code app on some other machine and doing port forwarding to your machine for using the WebApp?
In that case, you will need to forward two ports (port - 3000 and port 4200).
In my case, this was the issue, and I got it resolved by forwarding both these ports to my local machine from the host.

@winf3
Copy link

winf3 commented Nov 30, 2020

Hi pranavpawar3 , thanks for you help, but my Webapp runs on the same machine. I am afraid, that using the 2 org platform template might cause the problem . I am also not quite sure, whether I have the right content in gen_local_wallet as described in Step 5. What can I check there ?

@winf3
Copy link

winf3 commented Nov 30, 2020

Hi parnavpawar3 , how did you forward the two ports ? Which commands did you use ?

I just checked my output messages and found:
[30.11.2020 11:40:41] [INFO] 2Orglocalplatform_ca.org1.example.com|2020/11/30 10:40:41 [INFO] 172.24.0.1:50342 GET /api/v1/identities/admin?ca=ca 401 30 "Certificate not found with AKI '1767423daa9e823fc4c51d9f5bc399d1b59c4810' and serial '4d40c75eea0a504d87f25588ccf2d8726c766745'"

So I understand, that my login seems to get refused, because the admin Certificate is not found

@sjanakir2015
Copy link
Contributor

Once a fabric network is started in VSCode Extn, please ensure you have done following exports:

  1. connection profile - from Fabric Gateways;
    to be exported to: File ".../gateway/local/connection_profile.json"

  2. Org1 wallet - from Fabric Wallet
    to be exported to: Folder ".../gateway/local/gen_local_wallet"

The filenames and folders are specified in ".../gateway/local/config.json" for local networks.

  • With the connection profile of the fabric network and wallet to connect to the network configured, restart API Server using command: "node server.js" in "Application/server/" folder to start up the server code to connect to the fabric network.

  • Make sure you do the above 2 steps every time the network is shut down** and brought up again.

  • Please note that "admin" user only is enrolled at start of API server. All other users need to be registered and enrolled.

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

3 participants