Closed vkz closed 3 years ago
same happens if you chia start node
then chia start wallet-only
. Get the same exception and wallet doesn't appear to be running: only daemon and full node. Reproduced on two different machines
Here're exact steps to reproduce:
150 mkdir chia
151 cd chia
152 git clone https://github.com/Chia-Network/clvm_rs.git
153 export chiadir=`pwd`
154 echo $chiadir
155 (cd ${chiadir}/clvm_rs && git checkout tags/0.1.4)
156 git clone https://github.com/Chia-Network/chia-blockchain.git
157 cd chia-blockchain/
158 git checkout tags/1.0rc7
159 git submodule update --init mozilla-ca
160 vi setup.py
# change: "cryptography==2.9.2"
162 export MAKE=${MAKE:-gmake}
164 export BUILD_VDF_CLIENT=${BUILD_VDF_CLIENT:-N}
166 python3.7 -m venv venv
167 ln -s venv/bin/activate .
168 . activate
# hack to install `maturin` which doesn't play with LLD
170 sudo mv /usr/bin/ld /usr/bin/ld.bak
171 sudo ln -s /usr/local/bin/ld /usr/bin/ld
172 ld -v
173 pip install --upgrade pip
174 pip install wheel
175 pip install maturin
# put ld back
176 sudo mv /usr/bin/ld.bak /usr/bin/ld
177 ld -v
# install clvm_rs from local repo
178 pip install ./clvm_rs
# install miniupnpc
179 pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.1
# install chia
180 pip install -e ./chia-blockchain --extra-index-url https://pypi.chia.net/simple/
# init
183 chia init
# configure
187 chia configure -upnp f
188 chia configure -debug-level INFO
# start
191 chia start farmer
and observe the IO error crash as reported in a short while after
Install as shown above was performed with ~/.cache/pip completely purged and in a completely fresh virtual env.
Only common part: keyring created during the first install persisted with my keys installed. So every time it would require the same keyring passphrase. Otherwise, clean environments.
$ uname -v
FreeBSD 12.2-RELEASE-p3 GENERIC
Confirmed the same exception with 1.0rc8
on yet another server.
As before:
chia start farmer
debug.log
at the time reports this ERROR:
11:12:51.311 full_node src.full_node.full_node : INFO peer disconnected {'host': '34.199.129.128', 'port': 58444}
11:12:51.315 full_node full_node_server : ERROR Exception: <class 'concurrent.futures._base.CancelledError'>, closing connection {'host': '34.19
9.129.128', 'port': 58444}. Traceback (most recent call last):
File "/usr/home/fullmeta/rc8/chia-blockchain/src/server/server.py", line 514, in api_call
response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=600)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 435, in wait_for
await waiter
concurrent.futures._base.CancelledError
At this point node
and harvester
show up running and I can see harvester
attempting to connect to localhost:8447 and failing cause farmer
dropped dead.
@hoffmang9 I get that I'm probably the only one with FreeBSD and you have priorities. But as of now I'm sitting on just shy of 100TB worth of plots I can't farm. And as far as I'm concerned this is a genuine bug. FreeBSD wasn't a gesture nor am I religious - it was the only OS I managed to install on my servers. Both Ubuntu and Fedora failed to talk to my drives. I would've switched to Linux but all my plots are on UFS filesystem and its a whole new can of worms that I'm unlikely to sort before mainnet. I don't know the first thing about Python else I would've attached a debugger and tried to debug this thing myself. Not to mention you now have C, C++ and Rust in there. If anyone wants to point me at how to debug this, I'll give it a go.
Exact same issue happens with py-cryptography
upgraded to 3.3.2 from PORTs.
I also tried downgrading keyring
to 22.3.0 then 21.5.0 simply following git blame
on setup.py
I've not tried downgrading keyrings.cryptfile
which saw some back and forth 5 months ago.
Did farming ever work on FreeBSD at all? I somehow doubt it works on 11.3 either. Since we aren't running a build farm we can't really bisect. I mean I could try downgrading to <=beta26
just to see if farmer starts at all.
Same exception on 1.0beta26
.
Again, fresh everything: venv, removed ~/.chia, removed keyring config under ~/.local
.
At this point I doubt farming ever worked on FreeBSD. Full node works. Not sure what if anything I can do now.
One potentially relevant observation: on Ubuntu
when I go through chia init
then chia keys add
it never asks for my keyring password. Nor does it suggest to create one. Not so on FreeBSD! It does ask to create keyring password and it does ask it again when you start a farmer. And looking at that exception it doesn't appear like chia
or some python lib knows how to handle that back and forth with the user gracefully. Might help you guys debug the issue.
This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.
Keeping open to resolves ones our k8s cluster is online.
This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.
This issue was automatically closed because it has been flagged as stale and subsequently passed 7 days with no further activity.
Maybe this patch helps, but please note the input
maybe not work properly as well, you may just replace the string your keyring password
with your actual password and rebuild:
--- chia/util/keyring_wrapper.py 2021-08-28 00:13:09.000000000 +0000
+++ chia/util/keyring_wrapper.py 2021-09-08 16:45:22.201306000 +0000
@@ -69,12 +69,12 @@
# keyring = FileKeyring(keys_root_path=self.keys_root_path) # type: ignore
# else:
# keyring.set_keyring(keyring.backends.macOS.Keyring())
- elif platform == "linux":
+ elif platform == "linux" or platform.startswith("freebsd"):
if supports_keyring_passphrase():
keyring = FileKeyring(keys_root_path=self.keys_root_path) # type: ignore
else:
keyring = CryptFileKeyring()
- keyring.keyring_key = "your keyring password" # type: ignore
+ keyring.keyring_key = input("Enter your keyring password: ") # type: ignore
else:
keyring = keyring_main
See: https://github.com/Chia-Network/chia-blockchain/wiki/FreeBSD-Install https://github.com/risner/chia-freebsd/blob/main/files/patch-keychain.py
@sutra Thanks for the patch. We should be moving toward enabling FileKeyring support soon, and my hope is that this will simplify support for the BSDs.
This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.
This issue was automatically closed because it has been flagged as stale and subsequently passed 7 days with no further activity.
Facing two issues on truenas jail,
steps to reproduce:
error trace
(venv) [root@chia-plugin ~/chia-blockchain]# chia start farmer Daemon not started yet Starting daemon Please enter password for encrypted keyring: chia_harvester: started chia_farmer: started chia_full_node: started chia_wallet: started (venv) [root@chia-plugin ~/chia-blockchain]# /usr/local/lib/python3.8/getpass.py :91: GetPassWarning: Can not control echo on the terminal. passwd = fallback_getpass(prompt, stream) Warning: Password input may be echoed. Please enter password for encrypted keyring: Traceback (most recent call last): File "/usr/local/lib/python3.8/getpass.py", line 76, in unix_getpass termios.tcsetattr(fd, tcsetattr_flags, new) termios.error: (5, 'Input/output error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.8/getpass.py", line 79, in unix_getpass termios.tcsetattr(fd, tcsetattr_flags, old) termios.error: (5, 'Input/output error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/chia-blockchain/venv/bin/chia_farmer", line 33, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.8/getpass.py", line 79, in unix_getpass termios.tcsetattr(fd, tcsetattr_flags, old) termios.error: (5, 'Input/output error')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/chia-blockchain/venv/bin/chia_wallet", line 33, in
BrokenPipeError: [Errno 32] Broken pipe
After changing the chia/util/keyring_wrapper.py like https://github.com/Chia-Network/chia-blockchain/issues/1300#issuecomment-915408770
TRACE:
(venv) [root@chia-plugin ~/chia-blockchain]# chia start farmer
chia_harvester: started
chia_farmer: started
chia_full_node: started
chia_wallet: started
(venv) [root@chia-plugin ~/chia-blockchain]# Traceback (most recent call last):
File "/root/chia-blockchain/venv/bin/chia_farmer", line 33, in
@srd00 I was able to get chia running on a newly installed FreeBSD 13 VM (though it wasn't trivial). I'm not running into the KeychainProxyConnectionFailure issue you're seeing, but I'm not using a jail environment either. By any chance did make some other changes? Currently, the keychain proxying code should be using a local keychain (i.e. not connecting to the daemon).
@srd00 I was able to get chia running on a newly installed FreeBSD 13 VM (though it wasn't trivial). I'm not running into the KeychainProxyConnectionFailure issue you're seeing, but I'm not using a jail environment either. By any chance did make some other changes? Currently, the keychain proxying code should be using a local keychain (i.e. not connecting to the daemon).
@paninaro May you refer me to the changes you made to get it running?
Thanks for replying with your changes, @sutra !
@srd00 The changes that sutra linked should work. I'll note that FileKeyring support will be turned on very soon, so it won't be necessary to use CryptFileKeyring (with a hardcoded passphrase) for much longer. When I was setting up my FreeBSD environment, the issues I was running into were related to setup.py building/installing various packages and compatibility issues therein. If sutra's changes fix that, then that's great.
Describe the bug Freshly built from source. 1.0rc7 on FreeBSD 12.2
To Reproduce
chia start node farmer wallet
requests password for keyring, reads it, reports that node started etc, then spits out the above exceptionschia start -r farmer-only
first reports that farmer has been restarted successfully but soon after crashes as per aboveIn both cases
ps -ax | grep -i chia
won't show farmer. Nothing relevant in thedebug.log
Expected behavior Be able to start and run a farmer
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 GENERIC amd64
Additional context for more FreeBSD struggles see #1289
I've struggled to install chia on any of my BSD machines for days now