Closed CohibAA closed 1 year ago
So: (1) you have a directory node running and (2) you had to edit certain tor config settings, presumably something different from what's written here?
Just checking I follow exactly where you are with this. On the second point, let us know if there's something we should add to that section of the documentation.
Thanks for everyone's contributions to JoinMarket! BTW, is this the best place to discuss and ask questions about contributions, or do you all still have an IRC or Discord channel or something now days for this type of thing?
Afaik the most active place is the Telegram group: https://t.me/joinmarketorg
So: (1) you have a directory node running and (2) you had to edit certain tor config settings, presumably something different from what's written here?
Just checking I follow exactly where you are with this. On the second point, let us know if there's something we should add to that section of the documentation.
(1) Yes, the new directory node is running now and stable for the last two weeks. The only downtime has been for server maintenance. (2) Honestly, I am still not sure why I was geting some errors. At some point I'll do the setup process again and document my steps better in case documentation should be updated. If I remember correctly, the only difference was adding the default ubuntu user to tor config, in addition to adding them to the linux user group for tor, but that might not be complete/accurate. I have not yet experience any failure of the directory node, nor any failure of connection to the node from maker bots.
Unhandled Error
Traceback (most recent call last):
Failure: twisted.internet.error.ConnectError: An error occurred while connecting: 2: No such file or directory.
The "No such file or directory" error still haunts startup of my directory node. It seems that turning off tor service, then restarting tor service allows the script to start successfully, as I can reproduce the error consistently by rebooting the server and trying to launch the node without stopping/starting tor. If the script is started immediately after restarting tor, it works correctly for me.
When I run start-dn.py to generate the onion for my node, this is the output:
(jmvenv) dirnode:~/joinmarket-clientserver/scripts$ python start-dn.py Greetings User data location: /home/dirnode/.joinmarket/ 2023-03-02 05:07:14,185 [INFO] starting directory node 2023-03-02 05:07:14,186 [INFO] Joinmarket daemon listening on port 27183 2023-03-02 05:07:14,191 [DEBUG] connection was made, starting client. 2023-03-02 05:07:14,192 [INFO] Attempting to start onion service on port: 5222 ...
I encountered the very same issue. It turned out it was (at my end) related to hidden service directory permission which must be set to 700
``
When I run start-dn.py to generate the onion for my node, this is the output:
(jmvenv) dirnode:~/joinmarket-clientserver/scripts$ python start-dn.py Greetings User data location: /home/dirnode/.joinmarket/ 2023-03-02 05:07:14,185 [INFO] starting directory node 2023-03-02 05:07:14,186 [INFO] Joinmarket daemon listening on port 27183 2023-03-02 05:07:14,191 [DEBUG] connection was made, starting client. 2023-03-02 05:07:14,192 [INFO] Attempting to start onion service on port: 5222 ...
I encountered the very same issue. It turned out it was (at my end) related to hidden service directory permission which must be set to
700
Hi! As you can see here: https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1687 Ive the same error. How have you solved this? What hidden service directory are you talking about? Tnx!
What hidden service directory are you talking about?
Having difficulty setting up directory node joinmarket.cfg [DAEMON] no_daemon = 1 daemon_port = 27183 daemon_host = localhost use_ssl = false
[BLOCKCHAIN] blockchain_source = no-blockchain network = mainnet
[MESSAGING:onion] type = onion socks5_host = localhost socks5_port = 9050 tor_control_host = localhost tor_control_port = 9051 onion_serving_host = 127.0.0.1 onion_serving_port = 8080 hidden_service_dir = /home/johndoe/dirnode directory_nodes =
regtest_count = 0,0
[LOGGING] console_log_level = INFO color = true
[TIMEOUT] maker_timeout_sec = 60 unconfirm_timeout_sec = 180 confirm_timeout_hours = 6
accept_commitment_broadcasts = 1 commit_file_location = cmtdata/commitments.json commitment_list_location = cmtdata/commitmentlist ################ torrc SocksPort 9050 # Default: Bind to localhost:9050 for local connections. ControlPort 9051 CookieAuthentication 1 HiddenServiceDir /home/johndoe/dirnode HiddenServicePort 443 127.0.0.1:27183
permissions on "dirnode" 700
when I start start-dn.py in the jmvenv environment, this is the resulting output ser data location: /home/johndoe/dirnode 2024-09-16 11:09:49,601 [INFO] starting directory node 2024-09-16 11:09:49,602 [INFO] Joinmarket daemon listening on port 27183 2024-09-16 11:09:49,638 [ERROR] Failed to load directory nodes: InvalidLocationStringError('')
port 443 is open on firewall and directed back to the host for this process
so the issue appear to be that tor can not create the hidden service directory in the users directory tree. Yes, the user belongs to group debian-tor creating the directory manually with permission 700 does not fix the permission issue. If I use /var/lib/tor/hidden_service, then the directory is created and filled with the appropriate sutff, however the user daemon gets a permission denied when attempting to access that directory even though it belongs to the debian-tor group. I don't know how to resolve this and there is no documentation or chats that address this particular issue. I know tor is fussy, Still working on it
I am trying to get a directory node up, but have run into a couple issues. Please consider this low priority, as I may just need more clarity on syntax or something simple. It's been quite a while since I've dove into the inner workings of JoinMarket, so forgive my ignorance! Eventually, I'd like to help resolve this issue and contribute to the stopgap list / default nodes if I can get past this. Maybe try to smash some bugs here and there.
I have reviewed and understand the start-dn.py script for the most part, and have setup joinmarket.cfg after a fresh install on a new virtual server running ubuntu 22, command line only, with tor, for backround. The server is dedicated to this project only, with only minimal services installed.
My joinmarket.cfg has these relevant lines:
directory_nodes is default currently, as this is where I am stuck.
When I run start-dn.py to generate the onion for my node, this is the output:
This will go on for at least 10 minutes, probably more, but I didn't let it keep running for longer. I then Ctrl-C out and get this:
I don't see anything in tor logs or joinmarket logs that is helping me narrow down the issue. I looked through the txtorcon scripts, but couldn't resolve much about this error/code. Any insight is appreciated!
Thanks for everyone's contributions to JoinMarket! BTW, is this the best place to discuss and ask questions about contributions, or do you all still have an IRC or Discord channel or something now days for this type of thing? I hope to contribute more often over the next year if possible.
update: I'm more confused now. I fiddled with some tor settings and directory locations and I managed to generate the genesis node.
I changed nothing afterwards, just closed the script, and put the genesis onion into joinmarket.cfg as directory_nodes. When I run the script I now get this error:
I'll keep playing around and update accordingly. Any suggestions are appreciated.
FINAL UPDATE:
tor is very particular, as it should be. The solution boiled down to conflicting settings in /etc/tor/torrc vs /usr/share/tor/tor-service-defaults-torrc and the directory node. I won't post all my settings here, but I'm happy to help others having similar issues. The directory node is now running, tested to communicate properly with an outside maker bot. I will unhide and publish the onion to the issues referenced in the first paragraph, once I'm confident the server is stable.