Recently updated my Akkoma instance to the latest build earlier today but after the upgrade was done, I keep getting Internal Server Error. Troubleshooting the issue, it appears that the updated version of Akkoma no longer listens on port 4000.
I checked using netstat and port 4000 is no longer bound.
At first I thought there was an issue with my Erlang & Elixir install so I updated it to this version:
That didn’t seem to fix the issue and I tried recompiling from the source but that didn’t seem to fix the issue.
I checked my /var/log/akkoma/akkoma.log & there doesn’t seem to be any indication of what’s wrong. Checking journalctl -xe didn’t seem to answer what’s going on either.
Instance specs:
2x Ampere Altra ARM64 cores
8 GB RAM
Ubuntu 22.04 LTS
Installed from source, upgraded via source using standard instructions
Web frontend via Varnish cache & Caddy is the webserver
I don’t think Varnish & Caddy are the issue as the issue seems to stem from Akkoma not listening to port 4000 as that port isn’t being bound anywhere.
Any pointers would be greatly appreciated, thanks!
Thanks for the prompt response, much appreciated. When trying to start Akkoma manually, it seems to just completely crashed out whereas starting it from systemctl seems to run the software but without listening on port 4000.
Not sure why it’s crashing out when running it manually…
I am also running into this same stacktrace as Deltatux after upgrading, and the new instance fails to start.
** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom.
....
(pleroma 3.10.2-0-gba1ed37) lib/pleroma/config/transfer_task.ex:113: Pleroma.Config.TransferTask.configure/1
(elixir 1.15.4) lib/enum.ex:984: Enum."-each/2-lists^foreach/1-0-"/2
(pleroma 3.10.2-0-gba1ed37) lib/pleroma/config/transfer_task.ex:51: Pleroma.Config.TransferTask.load_and_update_env/2
(pleroma 3.10.2-0-gba1ed37) lib/pleroma/config/transfer_task.ex:34: Pleroma.Config.TransferTask.start_link/1
I have tried dumping the saved configuration to search for nils, but if I dump just the logger group I don’t see any. (nor does anything look off in the Admin-FE).
I find it strange to have a different problem between running manually and running with systemctl. Could it be that some actions (git or mix most probably) were done with another user than the akkoma user? If so, maybe some files have wrong ownership, and now maybe we’re seeing weird bugs due to that. (I think chown -R akkoma:akkoma /opt/akkoma/ should fix that then?)
Another very wild guess is that maybe the build got corrupted by switching between elixir/otp/erlang versions or smthng. If so, maybe recompiling can help. The way I do that is: stop Akkoma, then in the akkoma folder rm -rf ./_build && systemctl restart akkoma and wait for it to recompile. It’s just a wild guess, but I remember years ago I had to do that once because I also had all kind of unexplainable weirdness.
Apologies, I have failed at including informative troubleshooting details. I have to step away from the computer for a bit, but I am happy to try and track this down.
I am using otp releases on debian and systemd.
The process I followed (which I’ve used for past Akkoma upgrades, sans the Debian version bump):
Build new server from base image
Upgrade bullseye → bookworm (including reboot)
Copy instance specific config and static directories
Run pleroma_ctl update tasks
Try to start the server with systemd
Initially it failed with the config.exs permissions issue, which I resolved (thanks for the helpful error!!).
I’ll try resetting permissions for everything, or maybe even starting from a new Bookworm base container instead of going down the upgrade path.
whilst i am genuinely unsure as to why that call would ever return nil, i guess it’s possible, and hence i’ve a default value in the case that no backends are configured
I went reading through the code a bit, and the default returned for Config.Holder.default_config(group, key) is :nil, but I would expect for can_be_merged/2 to return false in that case because nil fails the is_list guard clause, thus returning the value.
Is it possible this is getting executed before the Application env for logger is actually set?
ooooo, I think you may be right. It looks like the new logger is doing some “”“”“” shenanigans “”“”“”“” to be backwards compatible with :console :D.
Your patch did resolve the issue for me and I was able to finish upgrading / roll the new image. Thanks again!
Thanks for looking into this, much appreciated. Can you please let me know how I can apply these patches to my existing install?
I also tried doing the cleaning the deps but that didn’t seem to fix it, during the mix.compile, it seems to suggest that there were some warn messages when compiling the pleroma app: https://pastes.io/t0mka2q0xw
However, if I try starting it from systemctl, it doesn’t & I have no clue why. Is there something wrong with the akkoma.service file? Here’s a copy of my akkoma.service file: https://pastes.io/kxrrkwj3oi