ocdownloader icon indicating copy to clipboard operation
ocdownloader copied to clipboard

GID null error with NC 16.0.4

Open bitsandnumbers opened this issue 5 years ago • 17 comments

Steps to reproduce

  1. Insert .torrent inside the Torrents section of OcDownloader
  2. Press "Launch download" or whatever the name of this button in english (sorry can't verify)
  3. Get a "GID null" issue with no other log whatsoever.

Expected behaviour

It's supposed to begin downloading the torrent

Actual behaviour

Show the error and nothing happen.

Server configuration

Nextcloud version: (see Nextcloud admin page) Nextcloud 16.0.4

I have entered successfully all the commands as in : https://github.com/e-alfred/ocdownloader#aria2-installation

I actually use a script for that that used to work until now. I also entered them by hand.

I have no clue and few seem to have the same issue...

bitsandnumbers avatar Aug 25 '19 18:08 bitsandnumbers

I must add that I installed Nextcloud with Nextcloud-fpm docker image.

bitsandnumbers avatar Sep 05 '19 08:09 bitsandnumbers

I got the same problem here with NC 16.0.3. No matter what I want to download I get the message: Returned GID is null ! Is Aria2c running as a daemon

I followed all steps. The system is running with NextCloudPi on Docker if that is any useful information.

saschabrockel avatar Sep 05 '19 15:09 saschabrockel

Same here with curl mode Error, GID not found!

receptor avatar Sep 07 '19 22:09 receptor

Docker is not well supported yet, how did you install Aria2? In a Docker container or outside of it?

e-alfred avatar Oct 14 '19 09:10 e-alfred

@e-alfred in my case I installed it outside. But the whole app is buggy like hell now. I tried to uninstall and reinstall but I can't delete 2 old downloads and have a useless green button that tells me there is an update.

saschabrockel avatar Oct 14 '19 13:10 saschabrockel

@e-alfred I have it installed inside the Nextcloud docker container. I have scripted installation to automate the process upon upgrade. I checked open ports and 6800 is up with Aria2 behind, aria2 work when downloading torrents manually. Pinging localhost+port/rpc give 400 (bad request) error, not 404 so it seems to reach the endpoint correctly from command line.

Like @CptDayDreamer, I've got the useless green button that tell an update is available.

bitsandnumbers avatar Oct 14 '19 14:10 bitsandnumbers

No Docker, normal install, I have followed the provided instructions, same issue. For me, cURL download has never worked.

dariox86 avatar Dec 09 '19 16:12 dariox86

Any updates on that? Did somebody managed to get it work?

saschabrockel avatar Dec 24 '19 04:12 saschabrockel

@bitsandnumbers I got Aria2 running. Did all steps inside the container and it worked. And I really mean all steps! But when I insert a download it tells me: Download started (313567394fbf5c65) The download instantly appears with status error and disappears after a few seconds.

saschabrockel avatar Jan 05 '20 05:01 saschabrockel

Hi @CptDayDreamer , I don't use Aria2 anymore, I was fed up waiting... I only use OCDownloader with Curl now, I found another way to dl torrents and link it to Nextcloud that's more reliable.

Anyway, I'm glad that part of the issue is solved for you now. Did you check with command line if the file is still downloading with Aria2 or if it stopped completely ? Maybe it's a bug from OCD that do not report Aria2 downloads correctly ? Also check Aria2 logs.

bitsandnumbers avatar Jan 08 '20 09:01 bitsandnumbers

Hey @bitsandnumbers could you share your setup for nextcloud container + torrent downloads, please?

2xG avatar Feb 12 '20 02:02 2xG

@bitsandnumbers yes I figured out the problem. It's actually this encapsulation of the docker container:

2020-02-12 19:57:48.733974 [ERROR] [HttpListenCommand.cc:112] IPv6 RPC: failed to bind TCP port 6800
Exception: [SocketCore.cc:312] errorCode=1 Failed to bind a socket, cause: Name or service not known
2020-02-12 19:59:58.033274 [ERROR] [AbstractCommand.cc:351] CUID#11 - Download aborted. URI=http://xyz.net/file/abc
Exception: [AbstractCommand.cc:351] errorCode=3 URI=http://xyz.net/file/abc
  -> [HttpSkipResponseCommand.cc:219] errorCode=3 Resource not found

It looks like running OCDownloader in a docker container is not possible. Even though I give forward the port in the docker-compose file it's not working. At least I have no idea how. And even though after a container restart or device restart I need to do all steps again. Probably your solution is the only one.

saschabrockel avatar Feb 12 '20 20:02 saschabrockel

@CptDayDreamer That's also what I figured out. No matter if I forward the ports or try to expose Aria2 in any way, it never work. That's why I chose to use Curl + External torrents solution. @2xG I set OCDownloader to work with Curl for Http + FTP + Youtube (follow the instructions to use OCD with Curl on the Github page) and use Deluge server docker container on the same machine for Torrents. I expose Deluge's finished downloads folder to the Nextcloud container in the docker-compose yaml, and set it as an external folder in Nextcloud instance. It allows me to easily download finished torrents. But I still delete torrents+data inside Deluge's instance for clean removal.

bitsandnumbers avatar Feb 20 '20 17:02 bitsandnumbers

@bitsandnumbers I tried CURL but it does not work for me either. You just followed the instructions? I also did that one thing with SERVER.fallback.* but now everything is buggy. I have two downloads there, at least it tells me they're there after I removed them and when I click on them I get an internal sever error. In the tmp logs the downloads are shown as if they are still there with the number.curl but it never started downloading...

saschabrockel avatar Feb 20 '20 20:02 saschabrockel

@CptDayDreamer I actually do a few things for Curl to work, but with NC 18 it's broken again. Downloaded files are there, but OCD show status "waiting" no matter what.

What I do is in command line :

  • apt update
  • apt upgrade
  • apt -y install python python-pip
  • pip install youtube-dl
  • apt install libcurl4-gnutls-dev
  • docker-php-ext-install curl

These two last parts are what make curl work for me, even if it says that php-curl extension was already installed. It worked flawlessly in NC 17, but as I say it's broken now with 18 (or is it that OCD has been updated, don't know really).

bitsandnumbers avatar Feb 22 '20 10:02 bitsandnumbers

Can anyone of you test this patch by @tatodorov to see if it can help you set up an Aria2 instance on another server? Here is the link: https://github.com/e-alfred/ocdownloader/issues/41

Currently no RPC secret support is implemented (but @tatodorov wants to implement this), so use this with caution.

e-alfred avatar May 05 '20 12:05 e-alfred

The feature is merged and now you can run Aria2c on a remote host and secure it with a RPC secret.

e-alfred avatar May 06 '20 12:05 e-alfred