Compiling Akkoma with Elixir installed from asdf installed under the same user results in error #524

Closed
opened 2023-04-21 14:40:03 +00:00 by s0ulf3re · 1 comment

So I'm running an Akkoma instance under Ubuntu 22.04 setup under the normal Debian setup guide, and recently, I decided to update my instance to v3.8.0 . However, Elixir in the Ubuntu package manager only goes up to v1.12, so I had to install asdf under the akkoma user to install elixir 1.14 . While running Akkoma directly in the shell of the akkoma user with mix phx.server works fine. Trying to run it through systemd results in an error that keeps it from starting. It seems to be this:

Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: 14:21:27.468 [notice] Application mime exited: :stopped
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: 14:21:27.469 [notice] Application eex exited: :stopped
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: ** (MatchError) no match of right hand side value: {:error, {:telemetry, {{:shutdown, {:failed_to_start_chil>
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (phoenix 1.6.16) lib/mix/tasks/compile.phoenix.ex:19: Mix.Tasks.Compile.Phoenix.run/1
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/tasks/compile.all.ex:59: Mix.Tasks.Compile.All.with_logger_app/2
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/tasks/compile.all.ex:33: Mix.Tasks.Compile.All.run/1
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]:     (mix 1.14.3) lib/mix/tasks/compile.ex:135: Mix.Tasks.Compile.run/1

So far, in order to get this setup with asdf to actually work, I have edited akkoma.service so that it includes Environment="ASDF_DATA_DIR=/opt/asdf", which is where I installed asdf. And modified ExecStart to be ExecStart=/opt/asdf/shims/mix phx.server. Within my .bashrc for my akkoma user. I've appended the following:

. "/opt/asdf/asdf.sh"
. "/opt/asdf/completions/asdf.bash"
export MIX_ENV=prod
export ASDF_DATA_DIR=/opt/asdf/
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/bashrc"
export PATH=/opt/asdf/shims/:$PATH

Could there be any issues with my configuration that might be stopping Akkoma from working correctly?

So I'm running an Akkoma instance under Ubuntu 22.04 setup under the normal Debian setup guide, and recently, I decided to update my instance to v3.8.0 . However, Elixir in the Ubuntu package manager only goes up to v1.12, so I had to install asdf under the akkoma user to install elixir 1.14 . While running Akkoma directly in the shell of the akkoma user with `mix phx.server` works fine. Trying to run it through systemd results in an error that keeps it from starting. It seems to be this: ``` Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: 14:21:27.468 [notice] Application mime exited: :stopped Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: 14:21:27.469 [notice] Application eex exited: :stopped Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: ** (MatchError) no match of right hand side value: {:error, {:telemetry, {{:shutdown, {:failed_to_start_chil> Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (phoenix 1.6.16) lib/mix/tasks/compile.phoenix.ex:19: Mix.Tasks.Compile.Phoenix.run/1 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/tasks/compile.all.ex:59: Mix.Tasks.Compile.All.with_logger_app/2 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/tasks/compile.all.ex:33: Mix.Tasks.Compile.All.run/1 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4 Apr 21 14:21:27 social.thetooniverse.xyz mix[131379]: (mix 1.14.3) lib/mix/tasks/compile.ex:135: Mix.Tasks.Compile.run/1 ``` So far, in order to get this setup with asdf to actually work, I have edited akkoma.service so that it includes `Environment="ASDF_DATA_DIR=/opt/asdf"`, which is where I installed asdf. And modified ExecStart to be `ExecStart=/opt/asdf/shims/mix phx.server`. Within my .bashrc for my akkoma user. I've appended the following: ``` . "/opt/asdf/asdf.sh" . "/opt/asdf/completions/asdf.bash" export MIX_ENV=prod export ASDF_DATA_DIR=/opt/asdf/ source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/bashrc" export PATH=/opt/asdf/shims/:$PATH ``` Could there be any issues with my configuration that might be stopping Akkoma from working correctly?
Author

Going to repost this in the proper discourse instead. Sorry for accidentally forgetting.

Going to repost this in the proper discourse instead. Sorry for accidentally forgetting.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#524
No description provided.