Closed Razorfang closed 1 year ago
I know the message says there's pre-built packages, but my raspberry pi uses the armv6l architecture, so that won't work.
By pre-built package, it is meant that the client-side JavaScript and CSS is built and PHP libraries installed. There should be no platform-specific binaries so I see no reason why it should not work with ARM.
/var/www/rss.getty/node_modules/@parcel/core/lib/Parcel.js:150 #requestTracker ^
Looking at the error, it looks like your Node.js does not like private properties syntax, which is only supported since Node 12. And that is a minimum required Node version for Parcel as well: https://github.com/parcel-bundler/parcel/blob/a9193ce0b19e93415f264b3295ceee093ddeb8c7/packages/core/core/package.json#L19
Alright, I tried unzipping the compressed files instead. Now instead of an error, I get a blank page. I feel this could be a performance bottleneck due to the fact I'm using an old raspberry pi, since the load average gets very high on the pi when I go to the page. I don't know if this is the issue for sure though.
Here is the contents of my config.ini file. I manually created a postgresql database instead of using the default sqlite.
; see https://selfoss.aditu.de for more information about
; the configuration parameters
[globals]
db_type=pgsql
db_host=localhost
db_database=webbyselfoss
db_username=***
db_password=***
db_port=5432
db_prefix=
logger_destination=file:data/logs/default.log
logger_level=ERROR
items_perpage=50
items_lifetime=30
base_url=
username=
password=
salt=lkjl1289
public=
html_title=selfoss
rss_title=selfoss feed
rss_max_items=300
rss_mark_as_read=0
homepage=newest
language=0
auto_mark_as_read=0
auto_collapse=0
auto_stream_more=1
anonymizer=
use_system_font=
share=gtfpde
wallabag=
wallabag_version=1
allow_public_update_access=
unread_order=
load_images_on_mobile=0
auto_hide_read_on_mobile=0
env_prefix=selfoss_
camo_domain=
camo_key=
scroll_to_article_header=1
Here is the database information, which shows the webbyselfoss
database I created.
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
webbyselfoss | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
Are there any log files I can refer to for more information? Also, is a node version greeater than 11.9 required to run selfoss, or is that just for the postman package?
You can see logs in data/logs/default.log
. You can increase the verbosity by setting logger_level
config key to DEBUG
and by adding debug=1
to the config.
Node.js is only required to build selfoss, not to run it.
Here's my updated config file. I added in debug=1
and logger_level=DEBUG
as requested.
; see https://selfoss.aditu.de for more information about
; the configuration parameters
[globals]
db_type=pgsql
db_host=localhost
db_database=webbyselfoss
db_username=***
db_password=***
db_port=5432
db_prefix=
debug=1
logger_destination=file:data/logs/default.log
logger_level=DEBUG
items_perpage=50
items_lifetime=30
base_url=
username=
password=
salt=lkjl1289
public=
html_title=selfoss
rss_title=selfoss feed
rss_max_items=300
rss_mark_as_read=0
homepage=newest
language=0
auto_mark_as_read=0
auto_collapse=0
auto_stream_more=1
anonymizer=
use_system_font=
share=gtfpde
wallabag=
wallabag_version=1
allow_public_update_access=
unread_order=
load_images_on_mobile=0
auto_hide_read_on_mobile=0
env_prefix=selfoss_
camo_domain=
camo_key=
scroll_to_article_header=1
No log file was generated when I tried to visit the page, and the screen is still pure white. I even restarted the pi after the config changes just to be safe, but no luck.
$ ls data/logs/
$
I am running PHP 7.4.30
$ php -v
PHP 7.4.30 (cli) (built: Jul 7 2022 15:51:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
The version of selfoss that I am using was downloaded from the main website: https://github.com/SSilence/selfoss/releases/download/2.18/selfoss-2.18.zip
I took parts of the attached configuration and placed them into my own nginx.conf file. Now I am working on an nginx configuration issue, because instead of index.php
being executed by the pi, it is downloaded by the browser.
server {
server_name rss.getty.nz;
root /var/www/rss.getty;
access_log /var/www/rss.getty/rss.accesss.log;
error_log /var/www/rss.getty/rss.error.log;
location / {
index index.php;
try_files $uri /public/$uri /index.php$is_args$args =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf ;
fastcgi_pass unix:/run/php/php7.4-fpm.sock ;
}
location ~* \ (gif|jpg|png) {
expires 30d;
}
location ~ ^/(favicons|thumbnails)/.*$ {
try_files $uri /data/$uri;
}
location ~* ^/(data\/logs|data\/sqlite|config\.ini|\.ht) {
deny all;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/rss.getty.nz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/rss.getty.nz/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = rss.getty.nz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name rss.getty.nz;
return 404; # managed by Certbot
}
Yes, I did restart nginx and hit ctrl-shift-r to clear the browser cache after each change.
The nginx config looks about right to me as long as snippets/fastcgi-php.conf
works.
I would recommend using the latest development release instead of 2.18 as it has much better error handling: https://github.com/fossar/selfoss#download
Okay, I've updated the config and removed the =404
from the location /
block. Now I get a white page again instead of downloading the index file, but I get the following errors:
2022/07/22 21:52:15 [error] 3571#3571: *1113 FastCGI sent in stderr: "PHP message: file_put_contents(/var/www/rss.getty/public/all.js): failed to open stream: Permission deniedPHP message: [helpers/View.php:205] file_put_contents()PHP message: [helpers/View.php:31] helpers\View->genMinified()PHP message: [controllers/BaseController.php:22] helpers\View->__construct()PHP message: [index.php:80] Base->run()PHP message: The stream or file "data/logs/default.log" could not be opened: failed to open stream: Permission denied [/var/www/rss.getty/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107]PHP message: [vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:37] Monolog\Handler\StreamHandler->write()PHP message: [vendor/monolog/monolog/src/Monolog/Logger.php:337] Monolog\Handler\AbstractProcessingHandler->handle()PHP message: [vendor/monolog/monolog/src/Monolog/Logger.php:616] Monolog\Logger->addRecord()PHP message: [common.php:69] Monolog\Logger->error()PHP message: [helpers/View.php:205] file_put_contents()PHP message: [helpers/View.php:31] helpers\View->genMinified()PHP message: [controllers/BaseController.php:22] helpers\View->__construct()PHP message: [index.php:80] Base->run()" while reading response header from upstream, client: 192.168.1.254, server: rss.getty.nz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "rss.getty.nz", referrer: "https://getty.nz/"
2022/07/22 21:52:15 [error] 3571#3571: *1113 FastCGI sent in stderr: "PHP message: file_put_contents(/var/www/rss.getty/public/all.js): failed to open stream: Permission deniedPHP message: [helpers/View.php:205] file_put_contents()PHP message: [helpers/View.php:31] helpers\View->genMinified()PHP message: [controllers/BaseController.php:22] helpers\View->__construct()PHP message: [index.php:80] Base->run()PHP message: The stream or file "data/logs/default.log" could not be opened: failed to open stream: Permission denied [/var/www/rss.getty/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107]PHP message: [vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:37] Monolog\Handler\StreamHandler->write()PHP message: [vendor/monolog/monolog/src/Monolog/Logger.php:337] Monolog\Handler\AbstractProcessingHandler->handle()PHP message: [vendor/monolog/monolog/src/Monolog/Logger.php:616] Monolog\Logger->addRecord()PHP message: [common.php:69] Monolog\Logger->error()PHP message: [helpers/View.php:205] file_put_contents()PHP message: [helpers/View.php:31] helpers\View->genMinified()PHP message: [controllers/BaseController.php:22] helpers\View->__construct()PHP message: [index.php:80] Base->run()" while reading response header from upstream, client: 192.168.1.254, server: rss.getty.nz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "rss.getty.nz", referrer: "https://getty.nz/"
Never mind, I fixed by making www-data
the owner of the website folder
sudo chown -R www-data:www-data /var/www/rss.getty/
I think everything is working now
I have an old raspberry pi that I want to install selfoss on. I'm part way through the installation process, having created a postgresql database, installed PHP, and set up an nginx web server.
I have the following message when I visit my feed, and nothing else:
I know the message says there's pre-built packages, but my raspberry pi uses the armv6l architecture, so that won't work.
Seeing this, I installed nodejs on the pi. I'm running node version 11.9 and npm version 6.5.
Here's what I get when I run
npm run build
as selfoss suggests:Two log files are shown. Here's the contents of /home/webby/.npm/_logs/2022-07-17T03_01_20_463Z-debug.log:
And here's the contents of /home/webby/.npm/_logs/2022-07-17T03_01_20_815Z-debug.log: