This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-10
Channels
- # aws (39)
- # babashka (4)
- # beginners (5)
- # biff (25)
- # cider (14)
- # clj-on-windows (40)
- # clojure-europe (36)
- # clojure-gamedev (1)
- # clojure-losangeles (4)
- # clojure-norway (51)
- # clojure-spec (5)
- # clojure-uk (2)
- # clojurescript (2)
- # clr (176)
- # data-science (10)
- # datalevin (17)
- # datomic (7)
- # deps-new (4)
- # docs (3)
- # emacs (12)
- # figwheel (3)
- # figwheel-main (5)
- # hyperfiddle (20)
- # instaparse (3)
- # introduce-yourself (8)
- # lsp (66)
- # malli (43)
- # off-topic (4)
- # rdf (11)
- # reagent (5)
- # releases (2)
- # sci (11)
- # shadow-cljs (24)
- # slack-help (2)
- # specter (7)
- # tools-deps (3)
- # xtdb (48)
I'm finally getting around to trying to deploy over on Digital Ocean and I can't quite get that certbot to pass. How vital is that?
it's pretty important--I'm happy to help debug. As a first step, if you run dig
in the terminal (replacing
with your domain), does the IP address it gives match the IP address for your droplet?
Thanks! They do match.
This is the error message I'm getting when I run certbot:
Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain:
Type: dns
Detail: DNS problem: SERVFAIL looking up CAA for - the domain's nameservers may be malfunctioning
If that helps at all.
hmm, well that's something I haven't seen before
According to https://status.digitalocean.com/, DO was having some issues with DNS resolution today. Maybe just try re-running the certbot command and see if it works now? (`certbot --nginx`, the last command in server-setup.sh)
That issue was resolved around 24 hours ago, but maybe there was/is some lingering problems...
Tried it again this morning and same issue. Then I did a little experimenting. Checking the DNS records on the DO site, my site has a Type A and three Type NS, but no Type CAA. I'm way out of my depth here, but I tried creating a CAA with an issuewild
tag for my site without the "www" at the beginning and that seems to have pulled it off!
Ha, okay, onto the next step. I set up the remote on git and run bb deploy
. The rebuilding appears to have worked, but the website isn't up yet and bb logs
look like this:
May 10 11:43:00 dig-a-thousand-holes systemd[1]: Started app.
May 10 11:43:01 dig-a-thousand-holes sh[709]: ----- Error --------------------------------------------------------------------
May 10 11:43:01 dig-a-thousand-holes sh[709]: Type: java.lang.Exception
May 10 11:43:01 dig-a-thousand-holes sh[709]: Message: File does not exist: run-cmd
May 10 11:43:01 dig-a-thousand-holes systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
May 10 11:43:01 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:07 dig-a-thousand-holes systemd[1]: app.service: Scheduled restart job, restart counter is at 1.
May 10 11:43:07 dig-a-thousand-holes systemd[1]: Stopped app.
May 10 11:43:07 dig-a-thousand-holes systemd[1]: Started app.
May 10 11:43:07 dig-a-thousand-holes sh[902]: ----- Error --------------------------------------------------------------------
May 10 11:43:07 dig-a-thousand-holes sh[902]: Type: java.lang.Exception
May 10 11:43:07 dig-a-thousand-holes sh[902]: Message: File does not exist: run-cmd
May 10 11:43:07 dig-a-thousand-holes systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
May 10 11:43:07 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:12 dig-a-thousand-holes systemd[1]: app.service: Scheduled restart job, restart counter is at 2.
May 10 11:43:12 dig-a-thousand-holes systemd[1]: Stopped app.
May 10 11:43:12 dig-a-thousand-holes systemd[1]: Started app.
May 10 11:43:12 dig-a-thousand-holes sh[908]: ----- Error --------------------------------------------------------------------
May 10 11:43:12 dig-a-thousand-holes sh[908]: Type: java.lang.Exception
May 10 11:43:12 dig-a-thousand-holes sh[908]: Message: File does not exist: run-cmd
May 10 11:43:12 dig-a-thousand-holes systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
May 10 11:43:12 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:17 dig-a-thousand-holes systemd[1]: app.service: Scheduled restart job, restart counter is at 3.
May 10 11:43:17 dig-a-thousand-holes systemd[1]: Stopped app.
May 10 11:43:17 dig-a-thousand-holes systemd[1]: Started app.
May 10 11:43:17 dig-a-thousand-holes sh[914]: ----- Error --------------------------------------------------------------------
May 10 11:43:17 dig-a-thousand-holes sh[914]: Type: java.lang.Exception
May 10 11:43:17 dig-a-thousand-holes sh[914]: Message: File does not exist: run-cmd
May 10 11:43:17 dig-a-thousand-holes systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
May 10 11:43:17 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:22 dig-a-thousand-holes systemd[1]: app.service: Scheduled restart job, restart counter is at 4.
May 10 11:43:22 dig-a-thousand-holes systemd[1]: Stopped app.
May 10 11:43:22 dig-a-thousand-holes systemd[1]: Started app.
May 10 11:43:22 dig-a-thousand-holes sh[920]: ----- Error --------------------------------------------------------------------
May 10 11:43:22 dig-a-thousand-holes sh[920]: Type: java.lang.Exception
May 10 11:43:22 dig-a-thousand-holes sh[920]: Message: File does not exist: run-cmd
May 10 11:43:22 dig-a-thousand-holes systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
May 10 11:43:22 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:28 dig-a-thousand-holes systemd[1]: app.service: Scheduled restart job, restart counter is at 5.
May 10 11:43:28 dig-a-thousand-holes systemd[1]: Stopped app.
May 10 11:43:28 dig-a-thousand-holes systemd[1]: Started app.
May 10 11:43:28 dig-a-thousand-holes sh[1019]: ----- Error --------------------------------------------------------------------
May 10 11:43:28 dig-a-thousand-holes sh[1019]: Type: java.lang.Exception
May 10 11:43:28 dig-a-thousand-holes sh[1019]: Message: File does not exist: run-cmd
May 10 11:43:28 dig-a-thousand-holes systemd[1]: app.service: Main process exited, code=exited, status=1/FAILURE
May 10 11:43:28 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:33 dig-a-thousand-holes systemd[1]: app.service: Scheduled restart job, restart counter is at 6.
May 10 11:43:33 dig-a-thousand-holes systemd[1]: Stopped app.
May 10 11:43:33 dig-a-thousand-holes systemd[1]: app.service: Start request repeated too quickly.
May 10 11:43:33 dig-a-thousand-holes systemd[1]: app.service: Failed with result 'exit-code'.
May 10 11:43:33 dig-a-thousand-holes systemd[1]: Failed to start app.
heh glad it worked! I'll keep that in mind in case I ever run into this...
what does ls /home/app
on the server print?
Looks like that's config.edn repo.git secrets.env target
👍 looks like the bb deploy
command ran partially, since config.edn and secrets.env are there (i.e. the non-git-tracked files got copied to the server), but none of the git-tracked files are there, which is why bb run-cmd
(from https://github.com/jacobobryant/biff/blob/master/example/server-setup.sh#L61) fails.
What's the console output if you make another commit locally and then run bb deploy
again?
Oh, it says I'm on a branch "yet to be born" which sounds prophetic!
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly:
Rebuilding...
Done in 2082ms.
Enumerating objects: 17, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.45 KiB | 1.45 MiB/s, done.
Total 9 (delta 5), reused 0 (delta 0), pack-reused 0
remote: fatal: You are on a branch yet to be born
remote: ----- Error --------------------------------------------------------------------
remote: Type: java.lang.Exception
remote: Message: File does not exist: post-receive
remote:
To
5f63539..92bb78b main -> main
"Elapsed time: 868.047426 msecs"
ha, very interesting!
This must be the culprit: 5f63539..92bb78b main -> main
.The primary branch on the server is still set to master
by default, but it looks like your local primary branch is main
-- so you need to instruct git to push from main
to master
. You can do that by editing config.edn
and changing the :biff.tasks/deploy-cmd
option's value to ["git" "push" "prod" "main:master"]
Someone else ran into this recently as well. It really should be automated--just made an issue: https://github.com/jacobobryant/biff/issues/155
(anyway, once you set that option, bb deploy
should work)
I was looking into the whole main vs. master thing. That did the trick! On to the next puzzle! (Postmark doesn't like my gmail address: https://postmarkapp.com/blog/why-cant-i-use-gmail-address So I'm going to see if I can't sort another one out.)
oh wow I had no idea they didn't allow gmail addresses! If you don't feel like setting up a custom domain for your personal email (it's pretty easy with fastmail, don't know about gmail), you could sign up for https://www.mailgun.com/ instead and then replace the send-postmark
fn in email.clj
with a send-mailgun
fn (see https://github.com/jacobobryant/platypub/blob/master/src/com/platypub/mailgun.clj#L65 and https://github.com/jacobobryant/platypub/blob/master/src/com/platypub/items.clj#L235 and https://github.com/jacobobryant/platypub/blob/master/src/com/platypub/items.clj#L30 for inspiration). Maybe Mailgun should be the default...
(on the upside, postmark is a high-quality service. Very fast delivery which is especially nice for signin emails, and their UI etc. is a bit nicer to use than Mailgun's)
I'm setting up an email through GoDaddy (where my domain name has been for roughly 10,000 years) and Microsoft365. We'll see how that process goes. If it works, I'll give Postmark a shot, otherwise I'll try Mailgun.
Got it up and running and I immediately see all the things I still need to fix, but that's what bb prod-dev
is for.
This is exhilarating!
congrats!
Thank you for both Biff and your tireless help! I'm looking forward to having something fun to share.