Closed RussellTaylor83 closed 6 months ago
I just tried the deployment I configured but pointing at Debian 12 and it worked first time.
Thanks for the report! I'll look into this and get it fixed up by tomorrow!
Hello,
I thought I would stick with a RHEL distro as I use it for work. I have used a Digital Ocean Alma Linux 9 droplet, and I can ssh to it as root. There seem to be a few hurdles, and I then have postgres file permissions failures I can't overcome. I'm not sure if it's a problem with what I'm doing or something to try and resolve. I run the lemmy-almalinux.yml and get
RUNNING HANDLER [Reload nginx] **** fatal: [root@mydomain]: FAILED! => {"changed": false, "msg": "Unable to start service nginx: Job for nginx.service failed because the control process exited with error code.\nSee "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.\n"}
This is caused by certbot
running before nginx
is started. Since we're using the Certbot nginx plugin (--nginx
) when requesting the certificate, it starts nginx
itself, causing the port conflict later in the playbook when we try to start nginx
via systemd
.
I'll fix this up in another PR by ensuring nginx
is started & enabled before the certificate request (https://github.com/LemmyNet/lemmy-ansible/compare/main...codyro:lemmy-ansible:almalinux-9-fixes). That is why the playbook errors out until you manually kill the nginx
processes (EX, pkill -9 nginx
).
26d97800a297 PostgreSQL Database directory appears to contain a database; Skipping initialization 26d97800a297 26d97800a297 postgres: could not access the server configuration file "/etc/postgresql.conf": Permission denied
I have attempted chmod'ing the customPostgresql.conf file, moving it to /tmp and mounting from there, and can't seem to get past this permissions error.
That is likely caused by SELinux being enabled. It's beyond the scope of this playbook to manage that however you can temporarily disable it to see if it resolves your issue by running setenforce 0
. You can make the change persistent by editing /etc/sysconfig/selinux
.
While going over this, I found another issue affecting the RHEL playbook introduced in #209. The change in that pull request assumes that we're using Docker
, docker-compose
, and using their internal resolver (127.0.0.11:53
). podman
uses its network/resolver (generally 10.89.0.1:53
) (and ensures the container uses it by adjusting the /etc/resolv.conf
).
We'll need to consider how to work around this. @ticoombs, do you have any suggestions on how to handle this better?
In the interim, you can fix it by adjusting the templates/nginx_internal.conf
file and changing the line:
resolver 127.0.0.11 valid=5s;
to
resolver 10.89.0.1 valid=5s;
And re-run the playbook/restart the *_proxy_1
container.
Fresh install after the above changes: https://foss.ly/
That's probably the fastest, most concise response I've ever seen on Github!
If you get a branch up at some point and would like me to test I'd be happy to.
Thank you
@RussellTaylor83 If you'd like to give this a whirl, it'd be much appreciated! It runs cleanly on a fresh AlmaLinux 9 (or variants).
This was fixed and merged in https://github.com/LemmyNet/lemmy-ansible/pull/231. Thanks for the report & testing it out.
It'll be in the next tagged release (or in HEAD
) :).
Hello,
I thought I would stick with a RHEL distro as I use it for work. I have used a Digital Ocean Alma Linux 9 droplet, and I can ssh to it as root. There seem to be a few hurdles, and I then have postgres file permissions failures I can't overcome. I'm not sure if it's a problem with what I'm doing or something to try and resolve. I run the lemmy-almalinux.yml and get
This is because the port is already in use by another nginx process, that must have been started as part of the ansible script.
I pkill -f nginx and run again... next time it runs straight through. I get a 502, so checking podman-compose logs it shows the postgres container lasting a few seconds with many logs saying
I have attempted chmod'ing the customPostgresql.conf file, moving it to /tmp and mounting from there, and can't seem to get past this permissions error.
If I docker compose down and then up, the postgres section of the logs look like this (I have replaced the domain I'm using with "mydomain")
I might have a go with a Debian or something and see how I get on, but I was hoping to stick with alma.
Many thanks