nextcloud / news-updater

:newspaper: Fast, parallel feed updater for the News app; written in Python
GNU General Public License v3.0
107 stars 24 forks source link

Error while running in Docker container #16

Closed seth100 closed 6 years ago

seth100 commented 6 years ago

Hi,

I'm running a Docker instance of Nextcloud. So I went into the Docker container and ran:

  1. apt install python3-setuptools git
  2. git clone https://github.com/nextcloud/news-updater.git
  3. python3 setup.py install --install-scripts=/usr/bin
  4. python3 setup.py uninstall
  5. nextcloud-news-updater /var/www/html

and I got this error:

2018-06-03 10:20:53,142 - Nextcloud News Updater - ERROR - Command '['php', '-f', '/var/www/html/occ', 'news:updater:before-update']' returned non-zero exit status 1: Trying again in 30 seconds
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/nextcloud_news_updater-10.0.1-py3.5.egg/nextcloud_news_updater/api/updater.py", line 69, in run
    self.before_update()
  File "/usr/local/lib/python3.5/site-packages/nextcloud_news_updater-10.0.1-py3.5.egg/nextcloud_news_updater/api/cli.py", line 73, in before_update
    self.cli.run(self.api.before_cleanup_command)
  File "/usr/local/lib/python3.5/site-packages/nextcloud_news_updater-10.0.1-py3.5.egg/nextcloud_news_updater/api/cli.py", line 12, in run
    return check_output(commands)
  File "/usr/local/lib/python3.5/subprocess.py", line 629, in check_output
    **kwargs).stdout
  File "/usr/local/lib/python3.5/subprocess.py", line 711, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['php', '-f', '/var/www/html/occ', 'news:updater:before-update']' returned non-zero exit status 1

am I doing anything wrong?

Thanks

BernhardPosselt commented 6 years ago

Try to run this manually:

php -f /var/www/html/occ news:updater:before-update
kevin147147 commented 6 years ago

I have the same problem and tried @BernhardPosselt your suggestion. It then throws another error stating:" Console has to be executed with the user that owns the file config/config.php Current user: root Owner of config.php: www-data Try adding 'sudo -u www-data ' to the beginning of the command (without the single quotes) " I then tried to run it like that way and installed sudo. But then it is saying: " [Symfony\Component\Console\Exception\CommandNotFoundException] Command "news:updater:befor-update" is not defined. Did you mean one of these? maintenance:update:htaccess news:updater:after-update news:updater:all-feeds news:updater:before-update news:updater:update-feed

"

BernhardPosselt commented 6 years ago

Command "news:updater:befor-update" is not defined.

there's a typo