warning: the following units failed: tt-rss.service
โ tt-rss.service - Tiny Tiny RSS feeds update daemon
Loaded: loaded (/nix/store/k2vih7w3gmbv98w5sw0idb8hy933vjyj-unit-tt-rss.service/tt-rss.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-07-04 18:56:56 UTC; 1min 29s ago
Process: 26698 ExecStart=/nix/store/nvgncsvyyr0ifmj6gbhzm2bavwlrcsxh-php-7.2.19/bin/php /var/lib/tt-rss/update.php --daemon (code=exited, status=255)
Process: 26653 ExecStartPre=/nix/store/0n54s5vmqcsyxpk6dbyvjni16p5yhmd4-unit-script-tt-rss-pre-start (code=exited, status=0/SUCCESS)
Main PID: 26698 (code=exited, status=255)
Jul 04 18:56:56 moon php[26698]: Fatal error: Uncaught PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "ttrss_version" does not exist
Jul 04 18:56:56 moon php[26698]: LINE 1: SELECT schema_version FROM ttrss_version
Jul 04 18:56:56 moon php[26698]: ^ in /var/lib/tt-rss/include/functions.php:981
Jul 04 18:56:56 moon php[26698]: Stack trace:
Jul 04 18:56:56 moon php[26698]: #0 /var/lib/tt-rss/include/functions.php(981): PDO->query('SELECT schema_v...')
Jul 04 18:56:56 moon php[26698]: #1 /var/lib/tt-rss/update.php(112): get_schema_version()
Jul 04 18:56:56 moon php[26698]: #2 {main}
Jul 04 18:56:56 moon php[26698]: thrown in /var/lib/tt-rss/include/functions.php on line 981
Jul 04 18:56:56 moon systemd[1]: tt-rss.service: Main process exited, code=exited, status=255/n/a
Jul 04 18:56:56 moon systemd[1]: tt-rss.service: Failed with result 'exit-code'.
Not sure.
"x86_64-linux"Linux 4.19.56, NixOS, 19.03.git.2516c45 (Koi)yesyesnix-env (Nix) 2.2.2/var/src/nixpkgsIs this after an upgrade, or a fresh install? Any more details?
This is after a fresh install.
Please paste relevant configuration and I will reproduce the problem to diagnose it. Thanks!
You can see it for yourself here: http://ttrss.beyermatthi.as/
Code:
{ pkgs, lib, config, ... }:
{
services.tt-rss = {
enable = true;
database = {
type = "pgsql";
host = "127.0.0.1";
name = "tt_rss"; # default
user = "tt_rss"; # default
password = "somepassword";
port = 5432; # default for postgresql
};
auth = {
autoCreate = false;
autoLogin = false;
};
registration = {
enable = false;
};
email = {
server = "localhost:25";
login = "ttrss";
password = "someotherpassword";
security = "tls";
fromName = "ttrss-service";
fromAddress = "[email protected]";
digestSubject = "[tt-rss] New headlines for last 24 hours"; # default
};
sessionCookieLifetime = 86400; # default
selfUrlPath = "https://ttrss.beyermatthi.as";
forceArticlePurge = 180;
logDestination = "sql"; # default
virtualHost = "ttrss.beyermatthi.as";
};
}
You're linking to HTTP but the config says HTTPS. Maybe it works if you change it or fix the HTTPS setup.
@matthiasbeyer Did the suggestion from @JohnAZoidberg help?
I did not yet have time to test it, sorry.
Okay so now the https://ttrss.beyermatthi.as/ page is entirely empty. My journalctl -u tt-rss -fe tells me:
Jul 09 19:04:28 moon 0n54s5vmqcsyxpk6dbyvjni16p5yhmd4-unit-script-tt-rss-pre-start[28105]: Password for user tt_rss:
Jul 09 19:04:28 moon 0n54s5vmqcsyxpk6dbyvjni16p5yhmd4-unit-script-tt-rss-pre-start[28105]: psql: fe_sendauth: no password supplied
Jul 09 19:04:28 moon sudo[28209]: pam_unix(sudo:session): session closed for user tt_rss
Jul 09 19:04:28 moon 0n54s5vmqcsyxpk6dbyvjni16p5yhmd4-unit-script-tt-rss-pre-start[28105]: The database contains some data. Leaving it as it is.
Jul 09 19:04:28 moon systemd[1]: Started Tiny Tiny RSS feeds update daemon.
Jul 09 19:04:28 moon php[28216]: Fatal error: Uncaught PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "ttrss_version" does not exist
Jul 09 19:04:28 moon php[28216]: LINE 1: SELECT schema_version FROM ttrss_version
Jul 09 19:04:28 moon php[28216]: ^ in /var/lib/tt-rss/include/functions.php:981
Jul 09 19:04:28 moon php[28216]: Stack trace:
Jul 09 19:04:28 moon php[28216]: #0 /var/lib/tt-rss/include/functions.php(981): PDO->query('SELECT schema_v...')
Jul 09 19:04:28 moon php[28216]: #1 /var/lib/tt-rss/update.php(112): get_schema_version()
Jul 09 19:04:28 moon php[28216]: #2 {main}
Jul 09 19:04:28 moon php[28216]: thrown in /var/lib/tt-rss/include/functions.php on line 981
@matthiasbeyer This is the best I can find: https://github.com/projectdelphai/ttrss-on-heroku/issues/6
It looks like running ttrss_schema_pgsql.sql manually against the database did the trick. Do you want to try that when you get a chance and report back?
hmh. I found the file, but how do I run it?
This should probably work for you. So something along the lines of sudo -u tt_rss pgsql "CONNECTION" -f ttrss_schema_pgsql.sql I'm guessing.
Worked.
Most helpful comment
Worked.