-
Notifications
You must be signed in to change notification settings - Fork 346
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
Installing https support via Let's Encrypt appears broken (instructions problematic) #115
Comments
Failure is due to lack of a proper DNS entry for our server (no "A" entry specifically). Working on it, but I am closing this problem for now. |
Actually, this fixed Problem 2, Problem 1 (the confusing issue of running the commands within an http connected terminal) still exists. |
I tried the same from ssh all the way with the same result. New Ubuntu 18.04 install $ sudo tljh-config reload proxy but https still doesnt work |
I am facing the same issue. There is an invalid HTTPS certificate that the hub is served with. No negotiation with letsencrypt whatsoever. For now, I'm setting up letsenrypt with certbot (https://certbot.eff.org/lets-encrypt/ubuntubionic-other) and getting the certificate and key separately and using the manual HTTPS setup for TLJH |
Same issue here, I'll try fixing it as @parthjoshi2007 did. |
Heya! I just merged #328, seen in http://tljh.jupyter.org/en/latest/howto/admin/https.html. There's a short 'troubleshooting' section too. Would love to see the logs from traefik here, so we can help figure out what's going on. |
Hi, I am getting the same issue. I follow the instructions but then get an invalid hub certificate. @yuvipanda Here are my traefik logs: |
This might be part of the problem: |
But this bit is odd too |
Facing the same issue. |
It looks like I have the same error: even if it's a 503, it seems Let's encrypt needs the "domain.bar/.well-known/acme-challenge/" folder to be reachable, and it can't reach it. This article seems to be hinting to this : https://nixcp.com/lets-encrypt-the-client-lacks-sufficient-authorization-invalid-response/ (see towards the end) Here's my "anonymised" error (can provide more if needed): So I'll do like @parthjoshi2007 and set it up with certbot for now. |
Ok, so to me the error is "clear" : From: https://certbot.eff.org/docs/using.html#webroot
And tljh doesn't allow to reach these files, thus, visibly, the challenge fails. Thinking of it, I hadn't set up the DNS redirection properly: I had set up a permanent web forwarding, not an A DNS (for foo.bar to ip) and CNAME DNS records (for www.foo.bar to foo.bar) Now if I had done this properly from the start, it may have worked with the tljh's default letsencrypt; When I find time, I'll test ;) EDIT: This was indeed the problem, see my next post Meanwhile, I finally got cerbot to work ( https://certbot.eff.org/lets-encrypt/ubuntubionic-other ) after quite a bit of trial-error, so I'm going to post what I'd been happy bumping on myself. However, it's just what I did on my server, there may be shorter and simpler, but to be sure that would require a bit of testing that I don't have time to do. I was in root, all this will need extra sudo's otherwise. First, I undid all I had set up during my previous trials to setup https (we never know):
Then I tried the standalone certbot: So I started with: Actually, the reason why it wasn't working is that tljh still had it's frontend running on my address. So to see if I could stop it, I tried (note: my jupyter instances/servers where all already shutdown, no idea if it's important): And yay! Finally So
I finally could load my key and certificat following the instructions in the second part of the tutorial: http://tljh.jupyter.org/en/latest/howto/admin/https.html Now the problem I guess, is that for certificat renewal, I'll have to shut down the server again; so I'll definitely try the proper way anew later. |
Ok, so still fulfilling my noob role in this story, I ended up totally messing up my install. By the way, having a look at |
I have literally done the install dozens of times and it never worked.
Which instructions did you follow?
…On Sun, Jun 30, 2019 at 12:04 PM gantheaume ***@***.***> wrote:
Ok, so still fulfilling my noob role in this story, I ended up totally
messing up my install.
So I restarted from zero, and this time tested the proper tljh way of
setting up a certificate.
And guess what, it worked!
So the issue was me not setting up the DNS records properly, confirmed.
By the way, having a look at sudo systemctl status traefik.service can
help identify things a bit, if there is some network problem (I found it
useful).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#115?email_source=notifications&email_token=AABTUQBEHFNXW647NSMKNUTP5DKSRA5CNFSM4FOKGB7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY4O74Y#issuecomment-507047923>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABTUQHMOSIDKFVLDIWPCPTP5DKSRANCNFSM4FOKGB7A>
.
--
Not sent from my iPhone
|
Sorry for my late answer, I'm quite busy at the moment; Here is precisely all I did, from a clean Ubuntu server 18.04 install: If your user hasn't the sudo rights:
From now on, everything is run from the normal user "yourusername":
Now all is ready, we can do:
Then, get things going; I don't know if it's all needed:
At last, the normal SSL procedure from this page: http://tljh.jupyter.org/en/latest/howto/admin/https.html
When all is good: Now if you configured the DNS records properly (see my previous long post), all should go fine, and going to "mydomain.me" should bring you directly on the login secured with https ;) Good luck testing ;) Note that i already had a working https setup on the same domain using the universal letsencrypt procedure {my long post above) but I then wiped everything at started with a new ubuntu install, so it should not affect anything. (By the way, it seems that the only reliable way of installing extra python modules is to use the command |
Thanks so much... |
Not sure if it'll help anyone else but basically, had to port forward the HTTPS port 443 on my router. Had only done it for 80. ( ¬_¬) |
@gantheaume's tip to use |
Port 80 must be open for HTTP traffic over IPv4. I had mine restricted to IPv6 (by mistake) and allowing IPv4 traffic on 80 resolved it. |
Piggybacking a bit on @gantheaume solution... I ended up here after installing TLJH on an Azure virtual machine. For me let's encrypt did not work either at first. My fix: Make sure your configuration is correct and then restart your virtual machine. Afterwards everything worked smoothly So here's the proper way to do it for future reference:
|
This issue covered a lot of debugging related to failure to setup HTTPS. I think what was missing from the documentation was perhaps notes on:
Since this issue is long and hard to follow at this point, and that I consider it to be resolved by better documentation. I'm closing this an opening a new one referencing these documentation improvements as the action point for that new issue, and pointing back to this as its origin. |
On a freshly installed jupyterhub that is visible to the outside world, I followed the Let's Encrypt instructions on the Enabling HTTPS document page. I confirmed
sudo -E tljh-config show
returns the expected content compared to what is in the documentation.Problem 1) When I do
sudo -E tljh-config reload proxy
, nothing happens. In fact, I realized that the connection hangs if you are doing this through the terminal on the jupyterhub. This is not surprising since it is shutting down http and turning on https. However, there is no warning in the documentation that this will happen.Problem 2) When I try to go to the https connection, it is active, but the certificate is NOT being recognized as "verified by a third party." (in Chrome, this is NET::ERR_CERT_AUTHORITY_INVALID) It does appear to be created since its name is "TRAEFIK DEFAULT CERT".
The documentation should be updated to fix Problem 1, and I would appreciate any hints as to how to 'redo' the proxy connection properly. I did try re-running
sudo -E tljh-config reload proxy
from ssh, and it returnedProxy reload with new configuration complete
but didn't fix the issue.We did revert to a snapshot of the VM from before activation of HTTPS and try the instructions from an SSH terminal. The result was the same except that
sudo -E tljh-config reload proxy
from ssh, returnedProxy reload with new configuration complete
(since the http session terminal was not used), but the certificate is still not recognized as a third party verified certificate. Is there something more we need to do?The text was updated successfully, but these errors were encountered: