Skip to content
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

Installation fails on Yunohost 11.0 #166

Closed
chbmeyer opened this issue Feb 26, 2022 · 20 comments
Closed

Installation fails on Yunohost 11.0 #166

chbmeyer opened this issue Feb 26, 2022 · 20 comments

Comments

@chbmeyer
Copy link

Hello there,

I installed Yunohost-buster-4.18 and updated my system according to
https://forum.yunohost.org/t/beta-stage-testing-for-yunohost-11-0-bullseye-and-buster-bullseye-migration/18531
then I installed Pixelfed. This is my first yunohost and pixelfed experience, but I'm quite familiar with Debian.

Describe the bug

Pixelfed installation script gives some errors during installation, but finishes "successfully"
and now all I see is: "502 Bad Gateway - nginx"

Context

  • Hardware: KVM amd64 VM, 2 CPUs and 2 GiB RAM.
  • YunoHost version: 11.0.4 (testing)
  • I have access to my server: SSH, webadmin, VM access via virt-manager (keyboard / screen)
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    Due to DynDNS and already existing (non-yunohost, Debian and Apache-based) Nextcloud (on a different machine) I use Apaches as reverse proxy (mod_proxy) to redirect my yunohost subdomains (even a .noho.st Subdomain) to the local yunohost IP.
    That said it seems to work properly since webadmin and userlogin are accessible via Internet and additionally the error-massage says it's nginx.
    Even when I add the local IP and xy.noho.st to /etc/hosts on my desktop computer the "bad gateway" message persists.
  • Using, or trying to install package version/branch: 0.11.2~ynh1
  • If upgrading, current package version: 0.11.2~ynh1

Logs

https://paste.yunohost.org/raw/onaxoyewen

Additional Info

I tried to fix the issue:
When I go to Applications - Pixelfed I found "redirect main-domain to this Application (xy.noho.st)" and thought this could fix my problems. So I pressed the green button "set as default".
But this also lead to an error, saying App 'pixelfed' could not set as default for domain 'xy.noho.st', because it's already used by 'pixelfed', so I'm still stuck with 'bad gateway':
Fehler: "400" Bad Request
Aktion: "PUT" /yunohost/api/apps/pixelfed/default

https://paste.yunohost.org/raw/cicunuqayu
https://paste.yunohost.org/raw/iciwihukib

@chbmeyer
Copy link
Author

chbmeyer commented Feb 27, 2022

I had a deeper look at the

Logs

/var/log/nginx/xy.noho.st-error.log

2022/02/27 15:26:32 [error] 27044#27044: *159 open() "/var/www/pixelfed/public/ynh_portal.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynh_portal.js HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/02/27 15:26:32 [error] 27044#27044: *159 open() "/var/www/pixelfed/public/ynh_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynh_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/02/27 15:26:32 [error] 27044#27044: *159 open() "/var/www/pixelfed/public/ynhtheme/custom_portal.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_portal.js HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/02/27 15:26:32 [error] 27044#27044: *159 open() "/var/www/pixelfed/public/ynhtheme/custom_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/02/27 15:26:32 [error] 27044#27044: *159 open() "/var/www/pixelfed/public/ynhtheme/custom_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"

So it seems that there is something missing:

ls -a1 /var/run/php/
.
..
php7.4-fpm.pid
php7.4-fpm.sock
php-fpm.sock

and even when /var/www/pixelfed/public/ exists, there are no ynh* files or folders in it.

BTW: php7.3-fpm is present, but not running.
php7.4-fpm is running and doesn't show any problems:
NOTICE: configuration file /etc/php/7.4/fpm/php-fpm.conf test is successful

So I will try to reinstall the pixelfed app now.

@chbmeyer
Copy link
Author

Update:
Same again after the de- and reinstallation of pixelfed.

During deinstallation there has been this message:
'/etc/php/7.4/fpm/pool.d/pixelfed.conf' wasn't deleted because it doesn't exist.

@lapineige
Copy link
Member

GET /ynhtheme/custom_overlay.css HTTP/2.0

This is probably related to #41 and is not something that would prevent Pixelfed from running normally.


I don't see any particular error, mainly warnings. But some are in a language that I don't know, and automated translation doesn't give me something usable 😅

Yet there is some issues:

ynh_print_warn '--message=Please find here an extract of the end of the log of the service pixelfed-horizon:'
2022-02-26 13:06:34,050: WARNING - The service pixelfed-horizon didn't fully executed the action update before the timeout.
2022-02-26 13:06:34,075: WARNING - Please find here an extract of the end of the log of the service pixelfed-horizon:

That sounds like a "classical" error with horizon service… can you try to restart pixelfed-horizon service ? (service pixelfed-horizon restart)

@chbmeyer
Copy link
Author

chbmeyer commented Feb 27, 2022

Yes, according to the logfiles I don't see any error too. When there is something specific I'll try to translate it.

I tried:

service pixelfed-horizon restart
Failed to restart pixelfed-horizon.service: Unit pixelfed-horizon.service not found.

systemctl restart pixelfed-horizon
Failed to restart pixelfed-horizon.service: Unit pixelfed-horizon.service not found.

Having a look in journalctl's output I found these related (pixelfed-horizon) messages:

Feb 27 16:46:08 monocerotis.chbmeyer.de useradd[14530]: new group: name=pixelfed, GID=997
Feb 27 16:46:08 monocerotis.chbmeyer.de useradd[14530]: new user: name=pixelfed, UID=997, GID=997, home=/var/www/pixelfed, shell=/usr/sbin/nologin, from=none
Feb 27 16:46:13 monocerotis.chbmeyer.de sudo[14902]:     root : PWD=/var/lib/postgresql ; USER=postgres ; ENV=PGUSER=postgres PGPASSWORD=uHughjHdAN1Ds0fkxOKVv0YV ; COMMAND=/bin/bash --login -c psql -tAc SELECT\ rolname\ FROM\ pg_roles\ WHERE\ rolname\=\'pixelfed\'\;
Feb 27 16:47:12 my.primary-domain.name supervisord[13634]: 2022-02-27 16:47:12,789 INFO spawned: 'pixelfed-horizon' with pid 21203
Feb 27 16:47:12 my.primary-domain.name slapd[830]: slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.666.5.16
Feb 27 16:47:14 my.primary-domain.name supervisord[13634]: 2022-02-27 16:47:14,275 INFO success: pixelfed-horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Feb 27 16:48:01 my.primary-domain.name cron[858]: Error: bad username; while reading /etc/cron.d/pixelfed
Feb 27 16:48:01 my.primary-domain.name cron[858]: (*system*pixelfed) ERROR (Syntax error, this crontab file will be ignored)
Feb 27 16:49:01 my.primary-domain.name cron[858]: (*system*pixelfed) RELOAD (/etc/cron.d/pixelfed)

After that I did:

supervisorctl restart pixelfed-horizon
pixelfed-horizon: stopped
pixelfed-horizon: started

supervisorctl status pixelfed-horizon
pixelfed-horizon RUNNING pid 25149, uptime 0:00:23

But still no difference with my xy.noho.st Domainname in the browser: 502 Bad Gateway


So I had a look at /etc/cron.d/pixelfed and since there IS a user called pixelfed I executed the following manually:
sudo -u pixelfed /usr/bin/php7.4 /var/www/pixelfed/artisan schedule:run
No scheduled commands are ready to run.

So here it seems to be okay, too.


Last try:
The warning you mentioned was a timeout during
supervisorctl update pixelfed-horizon
so I ran it manually as root. It finished within a second or so, and

supervisorctl status pixelfed-horizon
pixelfed-horizon RUNNING pid 25149, uptime 0:28:49

but still "502 Bad Gateway" when calling pixelfed with the ynh-tile (or directly with the domain-name).

@lapineige
Copy link
Member

lapineige commented Feb 27, 2022

Can you share with us the content of /etc/cron.d/pixelfed ?

(I don't remember what's in that file, just in case, feel free to change any personal data that might be included)

Also can you restart php7.4 service and (just in case) nginx service too ?

@chbmeyer
Copy link
Author

cat /etc/cron.d/pixelfed
* * * * * pixelfed /usr/bin/php7.4 /var/www/pixelfed/artisan schedule:run >> /dev/null 2>&1

systemctl restart php7.4-fpm.service
systemctl restart nginx.service

changed nothing, the status outputs gave no hint to a problem, too.
Just
systemctl status nginx.service
shows nothing about thy xy.noho.st domain, only my primary one.

@lapineige
Copy link
Member

Ok so let's try something else: can you install this version ? https://github.com/YunoHost-Apps/pixelfed_ynh/tree/26cbeee2e406d78f55a63be206781b3bac1b029d
And then check if it works, and then update it to the current version.

This is the last pre-php7.4 version, I want to check if the issues appears here too.

@chbmeyer
Copy link
Author

I'm not shure if I understand you correctly, but this is what I did:
I visited https://github.com/YunoHost-Apps/pixelfed_ynh/tree/26cbeee2e406d78f55a63be206781b3bac1b029d and clicked the black "Install with Yunohost"-Button.
Then I entered my primary domainname and installed it to a different subdomain. Same here: "502: Bad gateway".
I even wondered since the displayed version is "0.11.2~ynh1", too. And there still is no pixelfed.conf in a subdirectory of /etc/php

So I tried it via ssh:
sudo yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/26cbeee2e406d78f55a63be206781b3bac1b029d --debug
and again version is "0.11.2~ynh1", "502: Bad gateway", no php7.3 and no pixelfed.conf under /etc/php

At this point I usually would like to return to YNH stable and start for new on this base.
So the question is: is this a problem of general interest (so I can be helpfull finding things) or is it my problem only.
In the second case I'd like to stop finding anything and only ask how to keep the xy.noho.st subdomain, so that I can use it in my new installation again.

@lapineige
Copy link
Member

lapineige commented Feb 28, 2022

Sorry, I should have explained to you how to install a custom version like this.

Indeed, either in the admin interface you install it using this URL https://github.com/YunoHost-Apps/pixelfed_ynh/tree/26cbeee2e406d78f55a63be206781b3bac1b029d (paste in in the field at the bottom of the app catalog), or you can use the command yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/26cbeee2e406d78f55a63be206781b3bac1b029d if you prefer.

The "install with Yunohost" button will use the latest "normal" (master branch) version. So in that case it was v0.11.2, the same as the one you installed before.

The thing is… I gave you the bad URL (that was not an old enough commit) 😅
Please use this one instead: https://github.com/YunoHost-Apps/pixelfed_ynh/tree/f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332

At this point I usually would like to return to YNH stable and start for new on this base.
So the question is: is this a problem of general interest (so I can be helpfull finding things) or is it my problem only.
In the second case I'd like to stop finding anything and only ask how to keep the xy.noho.st subdomain, so that I can use it in my new installation again.

I'm not really sure I understand what you wish to do 😅

@chbmeyer
Copy link
Author

chbmeyer commented Mar 1, 2022

Ah, okay.

This time I entered the URL with the second commit id in the "userdefined applications" field.
The Applications pages now says its "Version: 0.11.1~ynh2"

Well, nothing changed.

Same warnings (I try to translate manually, so it's no LANG=C output):

/usr/share/yunohost/helpers.d/php: Line 408: / 2 / 20: Syntax error: Operator expected. (carracter that causes the error is "/ 2 / 20").

fatal: No Git-Repository (or some of it's parent directories): .git

Please wait, the service pixelfed-horizon is updateing..........................................................................................................................................................................................................................................................................................................
The service pixelfed-horizon didn't fully executed the action update before the timeout.
Please find here an extract of the end of the log of the service pixelfed-horizon:

I even did:
systemctl restart nginx.service
systemctl restart php7.4-fpm.service
supervisorctl restart pixelfed-horizon

without an error, but without success, too.

What is interesting is that the content of the cronjob changed (user entry "pixelfed" is missing)

cat /etc/cron.d/pixelfed
 * * * * * /usr/bin/php7.4 /var/www/pixelfed/artisan schedule:run >> /dev/null 2>&1

So I remembered the php7.3 thing.
There is no php7.3-fpm.service and it even is not installed:

dpkg -l php7.3* | grep ^ii

ii  php7.3-cli       7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        command-line interpreter for the PHP scripting language
ii  php7.3-common    7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        documentation, examples and common module for PHP
ii  php7.3-json      7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        JSON module for PHP
ii  php7.3-mbstring  7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        MBSTRING module for PHP
ii  php7.3-opcache   7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        Zend OpCache module for PHP
ii  php7.3-readline  7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        readline module for PHP
ii  php7.3-xml       7.3.33-1+0~20211119.91+debian11~1.gbp618351 amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP

so I did this by hand:
wget wget https://packages.sury.org/php/pool/main/p/php7.3/php7.3-fpm_7.3.33-1%2B0~20211119.91%2Bdebian11~1.gbp618351_amd64.de
dpkg -i php7.3-fpm_7.3.33-1+020211119.91+debian111.gbp618351_amd64.deb

systemctl start php7.3-fpm.service

but of course there is no /etc/php/7.3/fpm/pixelfed.conf now
and no /var/www/pixelfed/ynh* files.


After that I tried installing on a third subdomain by:
yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332

Same warnings, no errors, same timeout, same behaviour.
again: no /var/www/pixelfed__2/ynh* files.
only one file in /etc/php/7.3/fpm/pool.d/ : www.conf


finally I had a look at nginx-error logfiles:

2022/03/01 11:47:01 [crit] 36936#36936: *44 connect() to unix:/var/run/php/php7.4-fpm-pixelfed.sock failed (2: No such file or directory) while connecting to upstream, client: xx.xx.xx.xx, server: xy.noho.st, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-pixelfed.sock:", host: "xy.noho.st"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynh_portal.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynh_portal.js HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynh_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynh_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynhtheme/custom_portal.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_portal.js HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynhtheme/custom_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynh_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynh_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynhtheme/custom_portal.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_portal.js HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 11:47:01 [error] 36936#36936: *44 open() "/var/www/pixelfed/public/ynhtheme/custom_overlay.css" failed (2: No such file or directory), client: xx.xx.xx.xx, server: xy.noho.st, request: "GET /ynhtheme/custom_overlay.css HTTP/2.0", host: "xy.noho.st", referrer: "https://xy.noho.st/"
2022/03/01 13:29:46 [crit] 47969#47969: *18 connect() to unix:/var/run/php/php7.4-fpm-pixelfed__2.sock failed (2: No such file or directory) while connecting to upstream, client: xx.xx.xx.xx, server: my.primary-domain.name, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-pixelfed__2.sock:", host: "my.primary-domain.name"
2022/03/01 13:29:46 [crit] 47969#47969: *18 connect() to unix:/var/run/php/php7.4-fpm-pixelfed__2.sock failed (2: No such file or directory) while connecting to upstream, client: xx.xx.xx.xx, server: my.primary-domain.name, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-pixelfed__2.sock:", host: "my.primary-domain.name"
2022/03/01 13:29:46 [error] 47969#47969: *18 open() "/var/www/pixelfed__2/public/ynh_portal.js" failed (2: No such file or directory), client: xx.xx.xx.xx, server: my.primary-domain.name, request: "GET /ynh_portal.js HTTP/2.0", host: "my.primary-domain.name", referrer: "https://my.primary-domain.name/"

Obviously the server still prefers using php7.4_fpm.
I stopped php7.4_fpm, but nginx-logs are still the same.
So I tried
supervisorctl start pixelfed-horizon__2
pixelfed-horizon__2: ERROR (no such process)

So maybe I need to switch php version "somehow" manually.

@chbmeyer
Copy link
Author

chbmeyer commented Mar 1, 2022

I don't know if it is related (or in any kind affects this), but I found the official installation guide:
https://docs.pixelfed.org/running-pixelfed/prerequisites.html
and it says something about unix sockets (but unfortunately I don't understand this concept of sockets - at least now).

The guide advices to install composer and redis. These two packages are not installed on my system.

@lapineige
Copy link
Member

Well you did quite some work 😮

This time I entered the URL with the second commit id in the "userdefined applications" field. The Applications pages now says its "Version: 0.11.1~ynh2"

Well, nothing changed.

Again that's my fault, I didn't check the version number, but that's the right version I wanted you to try. It was the last one to use php7.3 (now it's php7.4), I wondered if that was the issue.

and it says something about unix sockets (but unfortunately I don't understand this concept of sockets - at least now).

That's out of my knowledge too.

The guide advices to install composer and redis. These two packages are not installed on my system.

@yalh76 do you know if we need to install composer ? Does that ring you a bell ? 😅
Also if you have some clue about that pixelfed-horizon service issue… 🙏

@lapineige lapineige reopened this Mar 1, 2022
@chbmeyer
Copy link
Author

chbmeyer commented Mar 1, 2022

I'm managed to go one step ahead, but now I'm on the next problem.
Here is what I did so far:

apt install composer redis

I created /etc/php/7.4/fpm/pool.d/pixelfed.conf somehow inspired by the error messages and the installation guide:

[pixelfed]
user = pixelfed
group = pixelfed

listen = /var/run/php/php7.4-fpm-pixelfed.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

Possibly restarting some services, this was enough to see the Pixelfed mainpage.

nginx still complains about some missing files, but probably they are not really needed:

/var/www/pixelfed/public/ynh_portal.js
/var/www/pixelfed/public/ynh_overlay.css
/var/www/pixelfed/public/ynhtheme/custom_portal.js
/var/www/pixelfed/public/ynhtheme/custom_overlay.css

Then I cleaned up a little:

systemctl stop php7.3-fpm.service
apt purge php7.3-fpm
apt purge composer redis
apt autoremove

So pixelfed seems to be still running, possibly that packages aren't needed and the main problem was the missing pixelfed.conf file. I thought you should know it.

Till now I was not able to log in with one of my yunohost users, but possibly I first have to register on that pixelfed-homepage. I tried to, but didn't receive a mail till now. I'll see.
But first of all I'll try to deinstall that "0.11.1~ynh2" version and install the recent one.
Later I will report again.

@lapineige
Copy link
Member

I created /etc/php/7.4/fpm/pool.d/pixelfed.conf somehow inspired by the error messages and the installation guide:

Here is mine (so Yunohost Pixelfed default):

[pixelfed]

user = pixelfed
group = pixelfed

chdir = /var/www/pixelfed

listen = /var/run/php/php7.4-fpm-pixelfed.sock
listen.owner = www-data
listen.group = www-data

pm = ondemand
pm.max_children = 4
pm.max_requests = 500
request_terminate_timeout = 1d


pm.process_idle_timeout = 10s

Possibly restarting some services, this was enough to see the Pixelfed mainpage.

Great ! 🙂

nginx still complains about some missing files, but probably they are not really needed:

/var/www/pixelfed/public/ynh_portal.js
/var/www/pixelfed/public/ynh_overlay.css
/var/www/pixelfed/public/ynhtheme/custom_portal.js
/var/www/pixelfed/public/ynhtheme/custom_overlay.css

Yeah, apart if you want the yunohost tile to be shown, just ignore it :)

So pixelfed seems to be still running, possibly that packages aren't needed and the main problem was the missing pixelfed.conf file. I thought you should know it.

Thank you very much for all your work, there really seems to be something going on (wrong) in our php (7.4?) setup 🤔
(I take the liberty to ping you @yalh76 in case that something you might be interested in)

Till now I was not able to log in with one of my yunohost users, but possibly I first have to register on that pixelfed-homepage.

Yes you do : Pixelfed is not integrated in Yunohost Single Sign-On (SSO). I'm not even sure it supports it, but anyway, accounts are not the same ones :)
(Then, you may take a look: https://github.com/YunoHost-Apps/pixelfed_ynh#administrator)

But first of all I'll try to deinstall that "0.11.1~ynh2" version and install the recent one.

You can try yunohost upgrade procedure if you do not wish to reinstall it by hand :)

@chbmeyer
Copy link
Author

chbmeyer commented Mar 1, 2022

Yes it works. Thank you! :)
I deinstalled the pixelfed Application (with this my pixelfed.conf was deleted as well) and then installed it (0.11.2~ynh1) "normally" with the webinterface.

Then I created a new pixelfed.conf (yours) and only did:
supervisorctl restart pixelfed-horizon (don't know if it's neccessary), then
systemctl restart php7.4-fpm.service

and the page appears as expected.
Thank you for your assistance and I'll have a look at the manual. :)

Christian

@lapineige
Copy link
Member

So there is definitely quite some issue with that php config…

@chbmeyer
Copy link
Author

chbmeyer commented Mar 2, 2022

Obviously it's not pixelfed only:
YunoHost-Apps/roundcube_ynh#136

@chbmeyer
Copy link
Author

chbmeyer commented Mar 2, 2022

I don't know yhh-scripts, but in my logfile above there is nothing about the fpm configfile.

Then I remembered the WARNING about "/usr/share/yunohost/helpers.d/php: line 408"
and had a look again:
local max_ram=
while line 408 fails:
php_max_children=$(($max_ram / 2 / $footprint))
In the logfile $max_ram obviously is empty and I think that is the reason why php helper script will not create the config file.

So, the subroutine for $max_ram is defined in /usr/share/yunohost/helpers.d/hardware
and (with others) it runs the command:
vmstat --stats --unit M | grep "free memory" | awk '{print $1}'

Run by hand this line returns no value for me because of the translation of vmstat output.
In my case it says in german: "141 M freier Speicher"

I don't know the internals of YNH and possibly there is a better way to fix it, but possibly you (or other "YNH people" - don't know the right place for it) should pay attention to this localisation issue.
For me the output of
LANG=C vmstat --stats --unit M | grep "free memory" | awk '{print $1}'
answers the correct value: 141

and even the (somehow related) output of /proc/meminfo
has a line "MemFree: "

@lapineige
Copy link
Member

lapineige commented Mar 2, 2022

Obviously it's not pixelfed only: YunoHost-Apps/roundcube_ynh#136

Ok it looks bad… @YunoHost-Apps/apps-group are you aware of any trouble with Yunohost helper, localisation and php (7.4) config files ?

@yalh76
Copy link
Member

yalh76 commented Jun 24, 2022

Can you try with last version 0.11.3~ynh1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants