Package Details: nextcloud-news-updater 10.0.1-4

Git Clone URL: https://aur.archlinux.org/nextcloud-news-updater.git (read-only, click to copy)
Package Base: nextcloud-news-updater
Description: A parallel feed updater for the Nextcloud News app
Upstream URL: https://github.com/nextcloud/news-updater
Keywords: news nextcloud python updater
Licenses: GPL3
Submitter: ilpianista
Maintainer: dvzrv
Last Packager: dvzrv
Votes: 5
Popularity: 0.61
First Submitted: 2016-06-14 21:32
Last Updated: 2019-11-16 20:49

Dependencies (3)

Required by (0)

Sources (4)

Latest Comments

1 2 Next › Last »

rEnr3n commented on 2019-01-11 11:11

I tried to use singlerun but still not working. I just got more logs.

Jan 11 18:51:01 server nextcloud-news-updater[29222]: 2019-01-11 18:51:01,449 - Nextcloud News Updater - ERROR - Command '['php', '-f', '/usr/share/webapps/nextcloud/occ', 'news:updater:before-update']' returned non-zero exit status 1.: Trying again in 30 seconds
Jan 11 18:51:01 server nextcloud-news-updater[29222]: Traceback (most recent call last):
Jan 11 18:51:01 server nextcloud-news-updater[29222]:   File "/usr/lib/python3.7/site-packages/nextcloud_news_updater/api/updater.py", line 69, in run
Jan 11 18:51:01 server nextcloud-news-updater[29222]:     self.before_update()
Jan 11 18:51:01 server nextcloud-news-updater[29222]:   File "/usr/lib/python3.7/site-packages/nextcloud_news_updater/api/cli.py", line 73, in before_update
Jan 11 18:51:01 server nextcloud-news-updater[29222]:     self.cli.run(self.api.before_cleanup_command)
Jan 11 18:51:01 server nextcloud-news-updater[29222]:   File "/usr/lib/python3.7/site-packages/nextcloud_news_updater/api/cli.py", line 12, in run
Jan 11 18:51:01 server nextcloud-news-updater[29222]:     return check_output(commands)
Jan 11 18:51:01 server nextcloud-news-updater[29222]:   File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
Jan 11 18:51:01 server nextcloud-news-updater[29222]:     **kwargs).stdout
Jan 11 18:51:01 server nextcloud-news-updater[29222]:   File "/usr/lib/python3.7/subprocess.py", line 487, in run
Jan 11 18:51:01 server nextcloud-news-updater[29222]:     output=stdout, stderr=stderr)
Jan 11 18:51:01 server nextcloud-news-updater[29222]: subprocess.CalledProcessError: Command '['php', '-f', '/usr/share/webapps/nextcloud/occ', 'news:updater:before-update']' returned non-zero exit status 1.
Jan 11 18:51:01 server systemd[1]: nextcloud-news-updater.service: Succeeded.

dvzrv commented on 2019-01-10 11:36

@rEnr3n that's odd indeed! I'm using it with singlerun mode and the systemd timer unit (as all I have is timers). Have you tried that as well?

It would be interesting to find out, if there's something weird underlying or whether it's only the endless mode not working properly.

FWIW, I also don't use the user and password and am able to run it locally!

rEnr3n commented on 2018-12-24 03:12

I use the nextcloud package in the official arch repo. I only use nginx and php-fpm. Necessary extensions are enabled in php.ini. I didn't setup the username/password before since the docs say it is only used when using REST API. I set the username/password and the url and it's working. I don't understand this. My nextcloud and this updater are on the same machine so the console API should work fine but it's not. It's requiring me to use REST API.

This command works: sudo -u http nextcloud-news-updater --threads 2 --apilevel v1-2 --loglevel info --interval 1800 --mode endless /usr/share/webapps/nextcloud

The systemd service does not work. Here is my nextcloud-news-updater.ini:

[updater]
# only needed when using the REST API
#user = admin
# only needed when using the REST API
#password = admin
# how many threads to use
threads = 2
# update interval in seconds
interval = 1800
# 'info' for logging accessed urls, 'error' to only log errors
loglevel = error
# absolute path or url to nextcloud instance (url, when using the REST API)
url = /usr/share/webapps/nextcloud
#url = https://nextcloud.lan
# absolute path to custom php.ini
#phpini = /etc/webapps/nextcloud/news/php.ini
# v1-2 is the current version, v2 is only a draft
apilevel = v1-2
# 'endless' (script handles update interval itself) or 'singlerun' (when using systemd timer)
mode = endless
# path to php binary
#php = /usr/bin/php

timeout = 180

dvzrv commented on 2018-12-23 15:58

@rEnr3n: I'm a little confused, as to what you're using there. The service has ReadWritePaths=/etc/webapps/nextcloud /usr/share/webapps/nextcloud! Do you use the nextcloud package from [community]? How do you make nextcloud available? nginx+uwsgi? apache? Did you maybe forget to setup username/password in the .ini? Have you checked, that your php.ini (either /etc/php/php.ini or any specific one you specify in the package's configuration file) enables at least the curl, gd, iconv, pdo_mysql (if using mariadb), zip extensions? Without having them activated is the only way I can reproduce an error message such as the one you're describing (also: please always post full log outputs, not just one line!) Additionally, sorry for getting back so terribly late. I have a lot of packages and mails sometimes go unnoticed.

@doronbehar: NEXTCLOUD_CONFIG_DIR has been part of nextcloud since version 11.0.0: https://github.com/nextcloud/server/pull/660. Unless you don't use the nextcloud package from [community] this will work, so probably spend more time investigating before writing. The Environment= inclusion has nothing to do with @rEnr3n's problem AFAICS.

FWIW: I have successfully used the service since I wrote it and never ran into a problem. However, I also use a custom php.ini (located below /etc/webapps/nextcloud/news), because I don't want the service to YOLO load php modules, that it doesn't even need.

Anonymous comment on 2018-12-23 12:13

I've had the same problem myself. I've found out that the Environment= in the systemd service is what's causing this trouble. Try to remove it via systemctl edit or by directly changing the service file of the package.

This isn't documented upstream BTW. I have no idea why the @dvzrv has added this, I think it should be removed.

rEnr3n commented on 2018-07-09 08:01

I'm having problem with the systemd service.

Nextcloud News Updater - ERROR - Command '['/usr/bin/php', '-f', '/usr/share/webapps/nextcloud/occ', 'news:updater:before-update']' returned non-zero exit status 1.: Trying again in 30 seconds

I tried adding /etc /usr to ReadWritePaths= but it's still not working. I had to set ProtectSystem=off for it to work. Any ideas? I'm using Archlinux ARM.

ajdunevent commented on 2017-02-22 17:34

@dvzrv: Sorry, didn't see your comment until now. My Nextcloud config was inherited from an ownCloud setup so that probably explains where I got the idea. My comment was only intended to help others who might have run into a similar problem; it wasn't intended as a criticism. Anyway, I appreciate the update and your previous work!

dvzrv commented on 2017-02-17 17:23

Updated NEXTCLOUD_CONFIG_DIR in coherence with the nextcloud community package to be /etc/webapps/nextcloud/config.

dvzrv commented on 2017-02-09 22:19

@adjunevent: Are you using nextcloud from the AUR?
If so, that would be weird, as there is no /etc/webapps/nextcloud/config setup for NEXTCLOUD_CONFIG_DIR (yet).
It really depends on where you place your config.php.

For myself, I setup /etc/webapps/nextcloud as NEXTCLOUD_CONFIG_DIR... I guess it should become /etc/webapps/nextcloud/config though, if you want to follow the way owncloud is packaged.
Unfortunately nextcloud is not properly packaged to reflect that.

ajdunevent commented on 2017-02-09 14:33

To get the console API (recommended over REST API) to work, I had to create a systemd override with:

[Service]
Environment=NEXTCLOUD_CONFIG_DIR=/etc/webapps/nextcloud/config