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

Problem Connecting to Test #20

Open
howardkitto opened this issue Oct 26, 2016 · 15 comments
Open

Problem Connecting to Test #20

howardkitto opened this issue Oct 26, 2016 · 15 comments

Comments

@howardkitto
Copy link

Hi I got new error this morning:

sovrin> connect test
New keyring Default created
Active keyring set to "Default"
Client sovrin9IwKVH initialized with the following node registry:
Error while running coroutine shell: IndexError('tuple index out of range',)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/bin/sovrin", line 76, in
run_cli()
File "/Library/Frameworks/Python.framework/Versions/3.5/bin/sovrin", line 54, in run_cli
looper.run(cli.shell(*commands))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/common/looper.py", line 240, in run
return self.loop.run_until_complete(what)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/common/looper.py", line 231, in wrapper
raise ex
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/common/looper.py", line 219, in wrapper
results.append(await coro)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/cli/cli.py", line 977, in shell
self.parse(c)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/cli/cli.py", line 1291, in parse
r = action(matchedVars)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sovrin/cli/cli.py", line 1499, in _connectTo
self._buildClientIfNotExists(config)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/cli/cli.py", line 467, in _buildClientIfNotExists
self.newClient(clientName=name, config=config)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sovrin/cli/cli.py", line 353, in newClient
client = super().newClient(clientName, config=config)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/cli/cli.py", line 895, in newClient
config=config)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sovrin/client/client.py", line 49, in init
config)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/plenum/client/client.py", line 131, in init
*lengths)
IndexError: tuple index out of range

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 26, 2016

@howardkitto , I just wanted to let you know that we've seen the error and are scratching our heads. It's not something we've seen before. You seem to be having a lot of adventures; sorry about that. We'll get back to you after some analysis. (You happened to post this error right while I was in the middle of merging pull requests in some repos that sovrin depends on, and doing corresponding pypi publication. That should not have affected anything, but depending on how you installed your code, there's a tiny chance that something glitched. Anything interesting about your environment or about the steps that you took just before the error?)

@lovesh
Copy link
Contributor

lovesh commented Oct 26, 2016

@howardkitto This error comes if you do not have the file pool_transactions_sandbox in your ~/.sovrin. If that is the case , when you start the cli you should not see this printed Node registry loaded.. Can you confirm if you see this message and some other information about nodes, like this

Node registry loaded.
    BIG: 52.160.103.164:9727
    WSECU: 13.93.218.255:9725
    RespectNetwork: 54.173.9.185:9729
    EvernymV2: 52.38.24.189:9723
    BYU: 54.193.6.155:9744
    FCU: 69.144.146.171:9733
    EvernymV1: 52.33.22.91:9721

@howardkitto
Copy link
Author

@dhh1128 Thanks for the swift response.

@lovesh
Here is the output when I start the cli:

$ sudo sovrin
Loading module /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/config/config-crypto-example1.py
Module loaded.

Sovrin-CLI (c) 2016 Evernym, Inc.
Type 'help' for more information.
sovrin> 

Here is what's in ~/.sovrin

$ ls ~/.sovrin/
LNUjvo              sample
__pycache__         sovrin9IwKVH
_merkleLeaves.bin       sovrinLAemji
_merkleNodes.bin        sovrinR4lZwM
data                sovrinZEGW4L
plugins             sovrin_config.py
pool_transactions_local     transactions_local
pool_transactions_sandbox   transactions_sandbox

I did

$ sudo pip install -U --no-cache-dir sovrin

just in case, but that didn't fix it

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 26, 2016

@howardkitto I don't think you want to run sovrin via sudo. At least, I never have run it that way, and I'm guessing it might create some problems. Certainly it will change the meaning of ~/, which would explain this particular problem. If you have done this (sudo sovrin) once, it may create some state files that are confusing to the install; maybe @lovesh can tell you if you need to do anything special to clean up for experimenting without sudo.

@howardkitto
Copy link
Author

howardkitto commented Oct 26, 2016

Ok, laziness on my part ;)

I changed the permissions to this:

drwxr-xr-x 20 howardkitto staff 680 26 Oct 06:42 /Users/howardkitto/.sovrin
Maybe that's not correct because when I connect to test I still get

Error while running coroutine shell: IndexError('tuple index out of range',)

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 26, 2016

Those permissions look okay, but it's still going to be a problem to run sovrin with sudo, because sudo changes ~/ to mean "the home directory of the root user" instead of "the home directory of howardkitto". Did you try running sovrin without sudo now?

@lovesh
Copy link
Contributor

lovesh commented Oct 26, 2016

@howardkitto Installing a package in your system wide packages is not a good idea as it can lead to conflicts among different package versions. We recommend using a virtual environment. The instructions for using a virtual environment are mentioned here. Please try it in a virtual environment, it should be good then.

@howardkitto
Copy link
Author

@dhh1128 Yes it runs without sudo now but I still get the same error.

@lovesh I'll have a go at the virtual environment

@lovesh
Copy link
Contributor

lovesh commented Oct 26, 2016

@howardkitto

Yes it runs without sudo now but I still get the same error.

This is weird. Can you try copying your ~/.sovrin/ to the root user's home, it might be that its looking at the home of the owner of sovrin which i guess in your case is root

@dhh1128
Copy link
Contributor

dhh1128 commented Nov 9, 2016

@howardkitto did this get resolved?

@howardkitto
Copy link
Author

No I'm afraid not

@lovesh
Copy link
Contributor

lovesh commented Nov 10, 2016

@howardkitto The file pool_transactions_sandbox in your .sovrin is empty. I know you said you did sudo pip install -U --no-cache-dir sovrin but can you do pip install -U --no-cache-dir sovrin in your virtual environment. That should resolve the issue since the correct genesis files will be copied in your .sovrin

@howardkitto
Copy link
Author

@lovesh I'm now running on an Ubuntu VM

I ran:

pip install -U --no-cache-dir sovrin

I get this:

Alice@test> accept invitation from "Faber College"
Invitation not yet verified.
Link not yet synchronized.
Attempting to sync...

Synchronizing...
sovrinEK9meS looking for WSECUC at 13.93.218.255:9726
sovrinEK9meS looking for WSECUC at 13.93.218.255:9726
sovrinEK9meS looking for WSECUC at 13.93.218.255:9726

@dhh1128
Copy link
Contributor

dhh1128 commented Nov 11, 2016

@howardkitto Is your VM using bridged networking, or NAT? If NAT, I recommend that you try bridged. I'm not sure that this is necessary, but it eliminates one possible translation layer that might have gotchas.

@azheregelya
Copy link
Contributor

Hi @howardkitto
We updated test cluster. It should be OK now. I recommend you to do the following:
0. Remove current sovrin setup from system if it is not in python virtualenv.

  1. Setup python virtual environment
  2. Install sovrin to it
  3. Try Faber test from "Sovrin Getting Started" to check it.

BTW: I've instantly reproduced your problem with empty pool_transactions_sandbox file. But it was once in docker image. In virtual environment it works fine.
Now WSECUC has a correct IP address in that file, so sovrin is able to connect to it.

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

4 participants