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

Connection refused (os error 111) #234

Open
bruteForce93 opened this issue Apr 14, 2024 · 2 comments
Open

Connection refused (os error 111) #234

bruteForce93 opened this issue Apr 14, 2024 · 2 comments

Comments

@bruteForce93
Copy link

bruteForce93 commented Apr 14, 2024

OK so setting your own controller isn't so difficult after all. But setting your own ZT1 DNS Service is a hell of a task!

Following the documentation (strictly) you should ping over the domain names straight away, but for some reason in my case (Ubuntu 22) the zeronsd-<NET_ID>.service does not want to connect to the controller or tries to connect to a ZT Central one. (That's what the journalsctl says by the way).

I have exhausted everything for almost a week now, but before giving up completelly and building my own DNS, I am giving it a shot over here, just in case we could resolve it somehow.

So, long story short everything (I mean the timer, the zeronsd-<NET_ID>.service, the resolver, systemctl, etc.) is setup, online and works accordingly (or maybe I am wrong after all). The domain I am trying to use is home.arpa for my network fb1ad6192d8be97b.

But, there is always this annoying Temporary failure in name resolution error and I tried journalctl just to see why zeronsd refuses to connect my controller. Notice that the self-hosted controller token has been stashed correctly and given the appropriate permissions. I have also installed the proper amd64.deb packages and followed the tutorial per se.
This is what it shows:

INFO zeronsd::init: Welcome to ZeroNS!
Error: Error: Communication Error error sending request for url (http://127.0.0.1:9993/network/fb1ad6192d8be97b): error trying to connect: tcp connect error: Connection refused (os error 111). Are you joined to fb1ad6192d8be97b?
zeronsd-fb1ad6192d8be97b.service: Main process exited, code=exited, status=1/FAILURE
zeronsd-fb1ad6192d8be97b.service: Failed with result 'exit-code'.

This error loops everytime the zeronsd service is scheduled to start, as per the journalctl output. Occasionally I encounter this error:

INFO zeronsd::init: Welcome to ZeroNS!
Error: Communication Error error sending request for url (https://my.zerotier.com/api/v1/network/fb1ad6192d8be97b): error trying to connect: tcp connect error: Network is unreachable (os error 101)
Caused by:
0: error sending request for url (https://my.zerotier.com/api/v1/network/fb1ad6192d8be97b): error trying to connect: tcp connect error: Network is unreachable (os error 101)
1: error trying to connect: tcp connect error: Network is unreachable (os error 101)
2: tcp connect error: Network is unreachable (os error 101)
3: Network is unreachable (os error 101)
zeronsd-fb1ad6192d8be97b.service: Main process exited, code=exited, status=1/FAILURE
zeronsd-fb1ad6192d8be97b.service: Failed with result 'exit-code'.

And this:

INFO zeronsd::init: Welcome to ZeroNS!
Error: Communication Error error sending request for url (https://my.zerotier.com/api/v1/network/fb1ad6192d8be97b): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
Caused by:
0: error sending request for url (https://my.zerotier.com/api/v1/network/fb1ad6192d8be97b): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
1: error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
2: dns error: failed to lookup address information: Temporary failure in name resolution
3: failed to lookup address information: Temporary failure in name resolution
zeronsd-fb1ad6192d8be97b.service: Main process exited, code=exited, status=1/FAILURE
zeronsd-fb1ad6192d8be97b.service: Failed with result 'exit-code'.

Having tried the curl -H "X-ZT1-Auth: commands the CLI gives the correct outputs. I mean the hosts list, the controller status, etc. This means that the 9333 port communicates as intended through CLI, but not through the zeronsd-<NET_ID>.service.

Also, having read the solved thread with the same problem, it's hard to undestand how to implement at least a temporary fix. If any exists.

Can you tell my stupid friend over here what is he missing or doing wrong?

@laduke
Copy link
Contributor

laduke commented Apr 15, 2024

Sorry for the lost time. zeronsd doesn't work with self hosted controllers. Maybe it will in the future.
It gets the dns names from the Central API. Self hosted network members don't have names.
Which solved thread are you referring to?

@bruteForce93
Copy link
Author

Sorry for the lost time. zeronsd doesn't work with self hosted controllers. Maybe it will in the future. It gets the dns names from the Central API. Self hosted network members don't have names. Which solved thread are you referring to?

Thank you for the input! I was referring to this: #196 (comment)

I even tried compiling the fixed up version from here: https://github.com/laduke/zeronsd/tree/tl-zerotier-url

But there are two errors in utils.rs and it won't let me at least test it and maybe help somehow.

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

2 participants