CounterpartyXCP / counterwallet

Counterparty web wallet
https://counterwallet.io
147 stars 162 forks source link

Initial installation error wiht counterwallet when doing a fednode install full master #811

Open CJClaude opened 7 years ago

CJClaude commented 7 years ago

fednode install full master appears to run fine:

Pulling bitcoin (counterparty/bitcoin:latest)... latest: Pulling from counterparty/bitcoin Digest: sha256:7f68f2a08d75acde8aebb9a1141bff74a60435c2e9a39e66bdd19263fd2ae666 Status: Image is up to date for counterparty/bitcoin:latest Pulling armory-utxsvr (counterparty/armory-utxsvr:latest)... latest: Pulling from counterparty/armory-utxsvr Digest: sha256:b03685d17bad2398ed69d2f1d3274bd3e151dc17c0ece1adf3b407346b4decaa Status: Image is up to date for counterparty/armory-utxsvr:latest Pulling mongodb (mongo:3.2)... 3.2: Pulling from library/mongo Digest: sha256:0306472d42dcbfb2810b2f71f49dca93c55c75d3021c88459ac622abadfab90d Status: Image is up to date for mongo:3.2 Pulling redis (redis:3.2)... 3.2: Pulling from library/redis Digest: sha256:eed4da4937cb562e9005f3c66eb8c3abc14bb95ad497c03dc89d66bcd172fc7f Status: Image is up to date for redis:3.2 Pulling counterparty (counterparty/counterparty-server:latest)... latest: Pulling from counterparty/counterparty-server Digest: sha256:0d52abbb8a966ee254daae8c6438af6df5f683d901d604bd34f1b333e4f5c7c3 Status: Image is up to date for counterparty/counterparty-server:latest Pulling counterblock (counterparty/counterblock:latest)... latest: Pulling from counterparty/counterblock Digest: sha256:b1d992e0e8ebac7e0f411856bc2bd0085c263ac03eff41041e4c9e578336098a Status: Image is up to date for counterparty/counterblock:latest Pulling bitcoin-testnet (counterparty/bitcoin:latest)... latest: Pulling from counterparty/bitcoin Digest: sha256:7f68f2a08d75acde8aebb9a1141bff74a60435c2e9a39e66bdd19263fd2ae666 Status: Image is up to date for counterparty/bitcoin:latest Pulling armory-utxsvr-testnet (counterparty/armory-utxsvr:latest)... latest: Pulling from counterparty/armory-utxsvr Digest: sha256:b03685d17bad2398ed69d2f1d3274bd3e151dc17c0ece1adf3b407346b4decaa Status: Image is up to date for counterparty/armory-utxsvr:latest Pulling counterparty-testnet (counterparty/counterparty-server:latest)... latest: Pulling from counterparty/counterparty-server Digest: sha256:0d52abbb8a966ee254daae8c6438af6df5f683d901d604bd34f1b333e4f5c7c3 Status: Image is up to date for counterparty/counterparty-server:latest Pulling counterblock-testnet (counterparty/counterblock:latest)... latest: Pulling from counterparty/counterblock Digest: sha256:b1d992e0e8ebac7e0f411856bc2bd0085c263ac03eff41041e4c9e578336098a Status: Image is up to date for counterparty/counterblock:latest Pulling counterwallet (counterparty/counterwallet:latest)... latest: Pulling from counterparty/counterwallet Digest: sha256:c2896907176693d9bd12645bd0af783b186671183a38462aafefa0369961b203 Status: Image is up to date for counterparty/counterwallet:latest Creating network "federatednode_default" with the default driver Creating federatednode_bitcoin-testnet_1 Creating federatednode_redis_1 Creating federatednode_bitcoin_1 Creating federatednode_mongodb_1 Creating federatednode_counterparty-testnet_1 Creating federatednode_armory-utxsvr-testnet_1 Creating federatednode_counterparty_1 Creating federatednode_armory-utxsvr_1 Creating federatednode_counterblock-testnet_1 Creating federatednode_counterblock_1 Creating federatednode_counterwallet_1

Previous runs synced bitcoin. fednode tail shows all well there.

fednode ps ` Name Command State Ports

federatednode_armory-utxsvr- start.sh Exit 0 testnet_1 federatednode_armory-utxsvr_1 start.sh Exit 0 federatednode_bitcoin- start.sh Up 0.0.0.0:18332->18332/tcp, testnet_1 18333/tcp, 8332/tcp, 8333/tcp federatednode_bitcoin_1 start.sh Up 18332/tcp, 18333/tcp, 0.0.0.0:8332->8332/tcp, 8333/tcp federatednode_counterblock- start.sh Exit 0 testnet_1 federatednode_counterblock_1 start.sh Exit 0 federatednode_counterparty- start.sh Exit 0 testnet_1 federatednode_counterparty_1 start.sh Exit 0 federatednode_counterwallet_1 start.sh Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp federatednode_mongodb_1 /entrypoint.sh mongod Up 127.0.0.1:27017->27017/tcp federatednode_redis_1 docker-entrypoint.sh redis Up 6379/tcp ... `

fednode tail counterparty: Attaching to federatednode_counterparty_1 counterparty_1 | python3: can't open file 'setup.py': [Errno 2] No such file or directory counterparty_1 | python3: can't open file 'setup.py': [Errno 2] No such file or directory counterparty_1 | Traceback (most recent call last): counterparty_1 | File "/usr/local/bin/counterparty-server", line 5, in <module> counterparty_1 | from pkg_resources import load_entry_point counterparty_1 | File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module> counterparty_1 | @_call_aside counterparty_1 | File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside counterparty_1 | f(*args, **kwargs) counterparty_1 | File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set counterparty_1 | working_set = WorkingSet._build_master() counterparty_1 | File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 635, in _build_master counterparty_1 | ws.require(__requires__) counterparty_1 | File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 943, in require counterparty_1 | needed = self.resolve(parse_requirements(requirements)) counterparty_1 | File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 829, in resolve counterparty_1 | raise DistributionNotFound(req, requirers) counterparty_1 | pkg_resources.DistributionNotFound: The 'counterparty-cli' distribution was not found and is required by the application federatednode_counterparty_1 exited with code 0

Running on gentoo linux, with python 3.5.2.

Likely I'm doing something stupid (like doing the install from the wrong directory???), but nothing is jumping out at me when reading http://counterparty.io/docs/federated_node/

Thanks in advance for any suggestions.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41066401-initial-installation-error-wiht-counterwallet-when-doing-a-fednode-install-full-master?utm_campaign=plugin&utm_content=tracker%2F542579&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F542579&utm_medium=issues&utm_source=github).
unsystemizer commented 7 years ago

1) We test with Ubuntu 16.04 only as we don't have the resources to try other versions (or distros). I know this is in Docker so it probably doesn't matter, but you never know (Docker has its own bugs that vary from distro to distro and version to version) 2) Having said that I can see installation went through fine, so maybe you can enter the shell (using the fednode command) of the counterparty container and run the find or pip3 list or some other command to see whether counterparty-lib is installed or not. 3) I wonder (don't have enough free disk space to try, will have to wait for a few days to evacuate some data) if you can run pip3 install counterparty-cli inside of counterparty container (if the package isn't installed now). Note that it will disappear after you restart Docker, but at least you'd know whether it can be installed.

I may give it a try on Ubuntu 16 host later this week.

By the way you should have created this issue in the fednode repo (unless you can duplicate it by installing counterparty-lib or counterparty-cli outside of fednode), not in Counterwallet, but if we solve it, we can leave it in here, if not, we'll have to open another in the fednode repo so that we can track it better.

If you're installing directly from shell (not X-terminal), try https://github.com/CounterpartyXCP/federatednode/pull/294

CJClaude commented 7 years ago

fednode shell counterparty Container is not running -- creating a transient container with a 'bash' shell entrypoint... root@rackserv-cp:/# ls bin core counterparty-lib etc lib media opt root sbin sys usr boot counterparty-cli dev home lib64 mnt proc run srv tmp var root@rackserv-cp:/# ls counterparty-lib root@rackserv-cp:/#

Two things jump out: the core dump, and the empty counterparty-lib directory...

OK, this is likely useful:

`root@rackserv-cp:/# pip3 install counterparty-cli Collecting counterparty-cli Downloading counterparty-cli-1.1.2.tar.gz Requirement already satisfied (use --upgrade to upgrade): appdirs==1.4.0 in /usr/lib/python3/dist-packages (from counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): prettytable==0.7.2 in /usr/local/lib/python3.5/dist-packages (from counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): colorlog==2.7.0 in /usr/local/lib/python3.5/dist-packages (from counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): python-dateutil==2.5.3 in /usr/local/lib/python3.5/dist-packages (from counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): requests==2.10.0 in /usr/local/lib/python3.5/dist-packages/requests-2.10.0-py3.5.egg (from counterparty-cli) Collecting counterparty-lib (from counterparty-cli) Downloading counterparty-lib-9.55.1.tar.gz (359kB) 100% |████████████████████████████████| 368kB 884kB/s Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python3.5/dist-packages (from python-dateutil==2.5.3->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): Flask-HTTPAuth==3.1.2 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): Flask==0.11 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): json-rpc==1.10.3 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): pycoin==0.62 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): pycrypto==2.6.1 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): pysha3==0.3 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): pytest==2.9.1 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): pytest-cov==2.2.1 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): python-bitcoinlib==0.5.1 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): tendo==0.2.8 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): xmltodict==0.10.1 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): cachetools==1.1.6 in /usr/local/lib/python3.5/dist-packages (from counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): click>=2.0 in /usr/local/lib/python3.5/dist-packages (from Flask==0.11->counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/local/lib/python3.5/dist-packages (from Flask==0.11->counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /usr/local/lib/python3.5/dist-packages (from Flask==0.11->counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in /usr/local/lib/python3.5/dist-packages (from Flask==0.11->counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python3.5/dist-packages (from pytest==2.9.1->counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): coverage>=3.7.1 in /usr/local/lib/python3.5/dist-packages (from pytest-cov==2.2.1->counterparty-lib->counterparty-cli) Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /usr/local/lib/python3.5/dist-packages (from Jinja2>=2.4->Flask==0.11->counterparty-lib->counterparty-cli) Building wheels for collected packages: counterparty-cli, counterparty-lib Running setup.py bdist_wheel for counterparty-cli ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-vsj23bbv/counterparty-cli/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmp1n_iykjfpip-wheel- --python-tag cp35: running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/counterpartycli copying counterpartycli/server.py -> build/lib/counterpartycli copying counterpartycli/client.py -> build/lib/counterpartycli copying counterpartycli/messages.py -> build/lib/counterpartycli copying counterpartycli/clientapi.py -> build/lib/counterpartycli copying counterpartycli/init.py -> build/lib/counterpartycli copying counterpartycli/util.py -> build/lib/counterpartycli copying counterpartycli/setup.py -> build/lib/counterpartycli copying counterpartycli/console.py -> build/lib/counterpartycli creating build/lib/counterpartycli/wallet copying counterpartycli/wallet/bitcoincore.py -> build/lib/counterpartycli/wallet copying counterpartycli/wallet/btcwallet.py -> build/lib/counterpartycli/wallet copying counterpartycli/wallet/init.py -> build/lib/counterpartycli/wallet installing to build/bdist.linux-x86_64/wheel running install Checking .pth file support in build/bdist.linux-x86_64/wheel/ /usr/bin/python3 -E -c pass TEST FAILED: build/bdist.linux-x86_64/wheel/ does NOT support .pth files error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

  build/bdist.linux-x86_64/wheel/

and your PYTHONPATH environment variable currently contains:

  ''

Here are some of your options for correcting the problem:

CJClaude commented 7 years ago

Also... if you care to e-mail me, I could grant you non-priv access to this Gentoo machine if that would help.

unsystemizer commented 7 years ago

Okay, thanks for posting the details. It seems related to https://github.com/ros/catkin/issues/632#issuecomment-254033865, maybe one of the workarounds from that page will do or try https://forums.gentoo.org/viewtopic-t-835466-start-0.html (as a poster said, export $PYTHONPATH would have to be added to shell profile for the PYTHONPATH shell setting to take effect). I'll run the setup this weekend on my Ubuntu 16 VM to see if it works normally and whether all services can start.

By the way, which services do you really need - e.g. counterparty-client or counterblock or counterwallet? You can install them easily without FedNode, either as "user" (non-root, to dedicated user account) or root (without Docker). For the latter, you can reference https://github.com/unsystemizer/counterparty-config-example. Counterblock and Counterwallet can also be installed manually, but it's a bit more involved. Or, if your bitcoin addrindex service is working inside of your current FedNode container, then you can install counterparty-lib and counterparty-client as user on your host (not in Docker) and be done.

CJClaude commented 7 years ago

Thanks, I'll take a look when I get a chance.

Two goals: 1) Need to be able to generate SJCX addresses and receive payments to those addresses 2) While I'm at it, help the effort by being an active node in whatever networks are appropriate. Figured a full node would cover both, but hadn't really looked into it.

unsystemizer commented 7 years ago

Hi. I think it is easy enough if you install BItcoin Core and counterpart-lib and counterparty-client as per the procedure at https://github.com/unsystemizer/counterparty-config-example That is enough for the both goals.

Specifically, for 1) you can create addresses with "bitcoin-cli" and counterparty-client configured to use that Bitcoin Core will be able to "see" them. An easier way and maybe even better (YMMV) is to use a deterministic pass phrase to generate many addresses from a single seed (pass phrase, like the ones Counterwallet uses). The advantage is you need just the 12 word pass phrase to recover all your addresses, in case your server crashes and you lose data. Whereas with the manual creation process you may need to understand bitcoin core's wallet and make sure you back it up. Another advantage is the same pass phrase can be used in most Counterparty-compatible wallets, so if you need to use a wallet, you can just use any that you like even when you're outside or mobile.

If you have any detailed questions you can ask on counterpartytalk.org (or search for FAQs/how-to's and examples, which explain the DIY Counterwallet pass phrase and address generation here)