hyperledger / indy-node

The server portion of a distributed ledger purpose-built for decentralized identity.
https://wiki.hyperledger.org/display/indy
Apache License 2.0
685 stars 657 forks source link

Run init_indy_node failed #1808

Closed LuksL closed 1 year ago

LuksL commented 1 year ago

Hi, I'm following this guide documents running this command init_indy_node mugNet 0.0.0.0 9701 0.0.0.0 9702 trying to get the "random seed, the verification key, the BLS public key, and the BLS key proof-of-possession (POP)"https://github.com/lynnbendixsen/indy-node/blob/master/docs/source/installation-and-configuration.md#323-create-the-key-for-the-validator-node but got error _root@f202d0e9f76c:/# init_indy_node mugNet 0.0.0.0 9701 0.0.0.0 9702 Traceback (most recent call last): File "/usr/local/bin/init_indy_keys", line 6, in from plenum.common.keygen_utils import initNodeKeysForBothStacks File "/usr/local/lib/python3.5/dist-packages/plenum/init.py", line 87, in setup_plugins() File "/usr/local/lib/python3.5/dist-packages/plenum/init.py", line 50, in setup_plugins config = getConfigOnce() File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 106, in getConfigOnce return _getConfig(general_config_dir) File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 87, in _getConfig config.GENERAL_CONFIG_FILE)) File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 32, in extend_with_external_config config = getInstalledConfig(*extender) File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 26, in getInstalledConfig spec.loader.exec_module(config) File "/etc/indy/indy_config.py", line 2, in NETWORKNAME = mugNet NameError: name 'mugNet' is not defined root@f202d0e9f76c:/#

because I'm trying to build my own indy-node network, trying to use they output of this command to generate genesis file can you please give me some advice ?

WadeBarnes commented 1 year ago

Did you create the /var/lib/indy/mugNet folder? The init_indy_node command will look at the network name defined in /etc/indy/indy_config.py and try to generate the keys in a directory in /var/lib/indy/ of the same name.

LuksL commented 1 year ago

Thanks, yes, I have created the folder, and run the command in the directory /var/lib/indy/

root@f202d0e9f76c:/var/lib/indy# ls -alh
total 16K
drwxrwxr-x 1 indy indy 4.0K Mar 31 06:09 .
drwxr-xr-x 1 root root 4.0K Mar 31 05:28 ..
drwxr-xr-x 2 root root 4.0K Mar 31 08:48 mugNet
root@f202d0e9f76c:/var/lib/indy# init_indy_node mugNet 0.0.0.0 9701 0.0.0.0 9702
Traceback (most recent call last):
  File "/usr/local/bin/init_indy_keys", line 6, in <module>
    from plenum.common.keygen_utils import initNodeKeysForBothStacks
  File "/usr/local/lib/python3.5/dist-packages/plenum/__init__.py", line 87, in <module>
    setup_plugins()
  File "/usr/local/lib/python3.5/dist-packages/plenum/__init__.py", line 50, in setup_plugins
    config = getConfigOnce()
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 106, in getConfigOnce
    return _getConfig(general_config_dir)
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 87, in _getConfig
    config.GENERAL_CONFIG_FILE))
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 32, in extend_with_external_config
    config = getInstalledConfig(*extender)
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/config_util.py", line 26, in getInstalledConfig
    spec.loader.exec_module(config)
  File "/etc/indy/indy_config.py", line 2, in <module>
    NETWORK_NAME = mugNet
NameError: name 'mugNet' is not defined
root@f202d0e9f76c:/var/lib/indy#
LuksL commented 1 year ago

Thanks, I have tried to reinstall a new ubuntu16.04, it works now :)