Apple-Network / apple-blockchain

Apache License 2.0
17 stars 2 forks source link

1.2.62 dont start on ubuntu 20.04 #16

Open dipol0 opened 3 years ago

dipol0 commented 3 years ago

v 1.2.62 dont start on ubuntu 20.04

OS Ubnutu 20.04 (clear) CPU - Intel Core i7-7700K RAM 32GB

git clone https://github.com/Apple-Network/apple-blockchain.git cd apple-blockchain sh install.sh . ./activate apple init (or apple init --fix-ssl-permissions ) apple start farmer

and get this:

(venv) manager@land33:~/src/apple-blockchain$ apple init --fix-ssl-permissions @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED SSL FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0664 for '/home/manager/src/apple-blockchain/mozilla-ca/cacert.pem' are too open. Expected 0644 One or more SSL files were found with permission issues. Runapple init --fix-ssl-permissions` to fix issues. Apple directory /home/manager/.apple/mainnet Attempting to set permissions 0644 on /home/manager/src/apple-blockchain/mozilla-ca/cacert.pem Finished updating SSL file permissions Traceback (most recent call last): File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/file_base.py", line 116, in get_password password = self.decrypt(password_encrypted, assoc).decode('utf-8') File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt return cipher.decrypt_and_verify(data['data'], data['mac']) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify self.verify(received_mac_tag) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify raise ValueError("MAC check failed") ValueError: MAC check failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/manager/src/apple-blockchain/venv/bin/apple", line 33, in sys.exit(load_entry_point('apple-blockchain', 'console_scripts', 'apple')()) File "/home/manager/src/apple-blockchain/apple/cmds/apple.py", line 128, in main cli() # pylint: disable=no-value-for-parameter File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(args, kwargs) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, *kwargs) File "/home/manager/src/apple-blockchain/apple/cmds/init.py", line 41, in init_cmd init(Path(create_certs) if create_certs is not None else None, ctx.obj["root_path"], fix_ssl_permissions) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 269, in init return apple_init(root_path, fix_ssl_permissions=fix_ssl_permissions) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 354, in apple_init check_keys(root_path) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 66, in check_keys all_sks = keychain.get_all_private_keys() File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 333, in get_all_private_keys pkent = self._get_pk_and_entropy(self._get_private_key_user(index)) File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 109, in wrapper return func(args, kwargs) File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 231, in _get_pk_and_entropy read_str = self.keyring_wrapper.get_passphrase(self._get_service(), user) File "/home/manager/src/apple-blockchain/apple/util/keyring_wrapper.py", line 338, in get_passphrase return self.get_keyring().get_password(service, user) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/file_base.py", line 119, in get_password password = self.decrypt(password_encrypted).decode('utf-8') File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt return cipher.decrypt_and_verify(data['data'], data['mac']) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify self.verify(received_mac_tag) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify raise ValueError("MAC check failed") ValueError: MAC check failed ` and APPLE dont start (apple start all or apple start farmer):

`(venv) manager@land33:~/src/apple-blockchain$ apple start all Daemon not started yet Starting daemon Traceback (most recent call last): File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/file_base.py", line 116, in get_password password = self.decrypt(password_encrypted, assoc).decode('utf-8') File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt return cipher.decrypt_and_verify(data['data'], data['mac']) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify self.verify(received_mac_tag) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify raise ValueError("MAC check failed") ValueError: MAC check failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/manager/src/apple-blockchain/venv/bin/apple", line 33, in sys.exit(load_entry_point('apple-blockchain', 'console_scripts', 'apple')()) File "/home/manager/src/apple-blockchain/apple/cmds/apple.py", line 128, in main cli() # pylint: disable=no-value-for-parameter File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(args, kwargs) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, *kwargs) File "/home/manager/src/apple-blockchain/apple/cmds/apple.py", line 107, in run_daemon_cmd asyncio.get_event_loop().run_until_complete(async_run_daemon(ctx.obj["root_path"], wait_for_unlock=wait_for_unlock)) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/manager/src/apple-blockchain/apple/daemon/server.py", line 1130, in async_run_daemon apple_init(root_path, should_check_keys=(not wait_for_unlock)) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 354, in apple_init check_keys(root_path) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 66, in check_keys all_sks = keychain.get_all_private_keys() File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 333, in get_all_private_keys pkent = self._get_pk_and_entropy(self._get_private_key_user(index)) File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 109, in wrapper return func(args, kwargs) File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 231, in _get_pk_and_entropy read_str = self.keyring_wrapper.get_passphrase(self._get_service(), user) File "/home/manager/src/apple-blockchain/apple/util/keyring_wrapper.py", line 338, in get_passphrase return self.get_keyring().get_password(service, user) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/file_base.py", line 119, in get_password password = self.decrypt(password_encrypted).decode('utf-8') File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt return cipher.decrypt_and_verify(data['data'], data['mac']) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify self.verify(received_mac_tag) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify raise ValueError("MAC check failed") ValueError: MAC check failed Daemon not started yet Failed to create the apple daemon `

Apple-Network commented 3 years ago

See: https://github.com/Chia-Network/chia-blockchain/issues/5518

dipol0 commented 3 years ago

I reboot PC. Remove all ~/.apple Retry build APPLE and run ti but not yet. Get same error.

(venv) manager@land33:~$ npm -v 6.14.4 (venv) manager@land33:~$ node -v v10.19.0 (venv) manager@land33:~$ python3 -V Python 3.8.10

`(venv) manager@land33:~/src/apple-blockchain$ apple init Apple directory /home/manager/.apple/mainnet Can't find private CA, creating a new one in /home/manager/.apple/mainnet to generate TLS certificates Traceback (most recent call last): File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/file_base.py", line 116, in get_password password = self.decrypt(password_encrypted, assoc).decode('utf-8') File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt return cipher.decrypt_and_verify(data['data'], data['mac']) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify self.verify(received_mac_tag) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify raise ValueError("MAC check failed") ValueError: MAC check failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/manager/src/apple-blockchain/venv/bin/apple", line 33, in sys.exit(load_entry_point('apple-blockchain', 'console_scripts', 'apple')()) File "/home/manager/src/apple-blockchain/apple/cmds/apple.py", line 128, in main cli() # pylint: disable=no-value-for-parameter File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(args, kwargs) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, *kwargs) File "/home/manager/src/apple-blockchain/apple/cmds/init.py", line 41, in init_cmd init(Path(create_certs) if create_certs is not None else None, ctx.obj["root_path"], fix_ssl_permissions) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 269, in init return apple_init(root_path, fix_ssl_permissions=fix_ssl_permissions) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 363, in apple_init check_keys(root_path) File "/home/manager/src/apple-blockchain/apple/cmds/init_funcs.py", line 66, in check_keys all_sks = keychain.get_all_private_keys() File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 333, in get_all_private_keys pkent = self._get_pk_and_entropy(self._get_private_key_user(index)) File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 109, in wrapper return func(args, kwargs) File "/home/manager/src/apple-blockchain/apple/util/keychain.py", line 231, in _get_pk_and_entropy read_str = self.keyring_wrapper.get_passphrase(self._get_service(), user) File "/home/manager/src/apple-blockchain/apple/util/keyring_wrapper.py", line 338, in get_passphrase return self.get_keyring().get_password(service, user) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/file_base.py", line 119, in get_password password = self.decrypt(password_encrypted).decode('utf-8') File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/cryptfile.py", line 130, in decrypt return cipher.decrypt_and_verify(data['data'], data['mac']) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 567, in decrypt_and_verify self.verify(received_mac_tag) File "/home/manager/src/apple-blockchain/venv/lib/python3.8/site-packages/Crypto/Cipher/_mode_gcm.py", line 508, in verify raise ValueError("MAC check failed") ValueError: MAC check failed `

stanchiam commented 3 years ago

same error after upgrade to 1.2.62/63 git checkout 1.2.33 and install is ok, no such error no choice, revert back to 1.2.33 as 1.2.6x has "MAC check failed"

stanchiam commented 3 years ago

image i suspect could be due to path issue, i just updated flax and no MAC check failed upon comparing, i notice flax path points to .flax/mainet/config/....... whereas apple just point to .apple/mainet when running apple init --fix-ssl-permissions

dipol0 commented 3 years ago

same. upgrade to 62/63 - MAC check failed

back to 1.2.31.dev0

Qwinn1 commented 3 years ago

Very odd... I updated my 3 harvesters to 1.2.63, no issues at all. But when I try to update my farmer (sudo rm -r apple-blockchain and full reinstall) I get this error.

Apple-Network commented 3 years ago

Installing python 3.9.x from debian sid repo, manually setting INSTALL_PYTHON_VERSION=3.9 in install.sh seems to have fixed the problem for now.

jfikar commented 3 years ago

Installing python 3.9.x from debian sid repo, manually setting INSTALL_PYTHON_VERSION=3.9 in install.sh seems to have fixed the problem for now.

that unfortunately does not solve the problem on Ubuntu 21.04 arm64 python3.9.5

laz954 commented 3 years ago

I have the same issue when I did an update to the latest version.

Qwinn1 commented 3 years ago

Is there any hope that this will ever get properly fixed?

jfikar commented 3 years ago

Issue #18 and Apple 1.2.90 solve the problem