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

[solved] Can not get working, I've tried ALL methods | I think I'm losing my mind #60

Closed
Dividedby0KSJ opened this issue Feb 27, 2022 · 5 comments

Comments

@Dividedby0KSJ
Copy link

I have followed the wiki Accessing-the-Hydrus-API-with-Caddy,-Duck-DNS,-and-Tailscale to a T multiple times and can not get it to work.
I am losing my mind trying to figure out why or what's wrong and can't understand it.

  • the Hydrus API is up and running with the settings needed
  • the API key setting has full rights
  • I have Tailscale Running and ready
  • I have Duck DNS working
  • I have downloaded and configured caddy EXACTLY how you asked
  • in the caddy file added my subdomain email duck DNS API token all of it

And for some reason when I try the subdomain in my browser (on the local PC) it says

This site can’t provide a secure connection
my domain.duckdns.org sent an invalid response.

Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

So it knows the site is there. but I'm STILL not getting a valid cert!
I've tried on hydrus.app and got a 504 error with my credentials and the duck DNS URL.

My suspicions are with caddy, however, I don't know anything about networking certs.
Hell, I went through caddy's documents to see if I could figure it out for myself and nope, tried a lot of arguments in the caddyfile and nothing worked.

I have also tried the method provided by Chad90b on RfE: add a root-certificate to the hydrus api https process w/ user input fields for IP and DNS names #675 and nothing changed.

this has been going on for days and every time I try again I start to cry.

pleas help...
-kieren

@Dividedby0KSJ
Copy link
Author

Tailscale has a beta feater for HTTPS certificates, that might work but I have no clue if it can be implemented in this scenario

@floogulinc
Copy link
Owner

Could you please provide your Caddy logs from when doing the wiki method?

Also if you are able to join the Hydrus Discord server I can provide much faster troubleshooting there: https://discord.gg/wPHPCUZ

@Dividedby0KSJ
Copy link
Author

caddy-service_2022-02-28.err.log
caddy-service.wrapper.log
caddy-service_2022-02-27.err.log

here are the log files, a quick skim over them confirms that it's either caddy or duck DNS that causing the problem.

it seems caddy cant get the cert from duckDNS for some reason.

for more context, I've tried using the caddyfile with & without my email and with different formatting as well with the original formatting specified in the wiki.

I have joined the discord server under the username Divided By 0#9550

@Dividedby0KSJ
Copy link
Author

caddy-service_2022-02-28.err.log

here is a smaller log file with me using just the wiki method.

@Dividedby0KSJ
Copy link
Author

Dividedby0KSJ commented Mar 8, 2022

The issue is now solved!

For anyone having a similar issue try using a different Internet connection.

The issues seemed to be with my network itself.
Most likely some default DNS settings on my router that I cannot change.

From the research that I've done it might be because my router is using some DNS cacheing that prevents caddy from reading the most up-to-date DNS Records

During testing I switched over to use cloudflair's DNS with my own private domain.
However I assume that you can receive the same results by using the original Duckie DNS

If you need help I will type out the steps to fix this issue

  1. Have Caddy service disabled.
  2. Make sure your caddy file has is correct.
  3. Connect to a mobile hotspot (I used my iPhone)
  4. Run the caddy service.
  5. Wait for a while for Caddy to confirm the DNS.
  • you can check the .err.log to see when it connects.
  • It will say at the bottom of the log "certificate obtained successfully"
  1. Now you can re-connect to your main network
  • DO NOT RESTART CADDY!
  • if you do you will have to connect your hotspot to your pc again to re-verify the DNS.
  • [Edit] after a pc crash caddy re-connected to the DNS with no fuss, so it might only be initial connection that needs the hotspot.
  1. Test on hydrus.app

This was stressful but at least it taught me a lot about backend networking.

I still don't fully understand why my network does not agree with Caddy but my phones hotspot does (specially since they're both the same provider).
But at least I have a workaround the works!

@Dividedby0KSJ Dividedby0KSJ changed the title Can not get working, I've tried ALL methods | I think I'm losing my mind [solved] Can not get working, I've tried ALL methods | I think I'm losing my mind Mar 8, 2022
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