Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Update Hydra2 inside of docker #60

Closed
whispy opened this issue Jan 13, 2018 · 7 comments
Closed

Unable to Update Hydra2 inside of docker #60

whispy opened this issue Jan 13, 2018 · 7 comments

Comments

@whispy
Copy link

whispy commented Jan 13, 2018

Current version: 1.0.16 (but issue has occurred in previous versions)

When I try to update Hydra2 via the in-app updater, it restarts and is the same version it was prior to running the updater. I am running it via a Docker container (tried updating with both theotherp's image and lsio's image).

I am aware that Docker containers can also be updated by restarting the container, but usually I have no issues updating via in-app updaters.

Here is a snippet from the log file (please let me know if you'd like more log info or debuginfos):

2018-01-13 21:50:59,353  INFO - NZBHydra main process has terminated for updating
2018-01-13 21:50:59,428  INFO - Extracting updated files to /app/hydra2
Traceback (most recent call last):
  File \"nzbhydra2wrapper.py\", line 481, in <module>
    update()
  File \"nzbhydra2wrapper.py\", line 173, in update
    zf.extract(member, basePath)
  File \"/usr/lib/python2.7/zipfile.py\", line 1028, in extract
    return self._extract_member(member, path, pwd)
  File \"/usr/lib/python2.7/zipfile.py\", line 1083, in _extract_member
    file(targetpath, \"wb\") as target:
IOError: [Errno 13] Permission denied: u'/app/hydra2/systemd/nzbhydra2.service'
Logging wrapper output to /config/logs/wrapper.log
"2018-01-13 21:51:01,867  INFO - Starting NZBHydra main process with command line: java -Xmx128M -DfromWrapper -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=ALWAYS -jar /app/hydra2/lib/core-1.0.16-exec.jar --nobrowser --datafolder /config in folder /app/hydra2

If you want to just file this under "Docker issue, unfixable", fine with me, I guess.

@juanchristian
Copy link

juanchristian commented Jan 14, 2018

Same issue, can't update dockerized hydra2 via in-app. Using linuxserver.io

@rubberbandboy
Copy link

The linuxserver.io issue is it's looking for control.id in the wrong place.

Script looks for /app/hydra2/data/control.id but it's located in /config

I created a symlink to the config directory (called data) in /app/hydra2/ and it all works for me.

@rubberbandboy
Copy link

Although the shown error appears to be permissions - (did you set PGID and PUID in the docker correct) the control.id is another issue I faced

@theotherp theotherp changed the title Unable to Update Hydra2 Unable to Update Hydra2 inside of docker Jan 14, 2018
@theotherp
Copy link
Owner

The error with the control.id should be updated the next time you pull your container.

The other error I can't help you with. It depends on the container that you use. Mine and that by linuxserver.io should be able to update itself. The one by binhex cannot update itself internally.

I was told that docker containers should be updated by pulling a new version. Sounds like more work to me, but what do I know.

So yeah, sorry, will close this as unsolvable for me. You could ask the docker container maintainer. If that's me, sorry, use another container ;-)

@bablat
Copy link

bablat commented Jan 17, 2018

I wouldn't recommend updating the code, updating the container is much safer.
My primary concern is usually around forward-compatibility of configuration/database:
If a user upgrades from 1.0 to 1.1 (inside container), v1.1 could introduce configuration/schema updates and migrate the configuration to the new format.
If the container itself is then recreated, you risk downgrading the code back to v1.0, and if your configuration resides on a mounted volume - you're now running v1.0 with v1.1 configuration schema.

If upgrading the container is difficult, try using something like WatchTower to automate that. I found it to be very useful.

@theotherp
Copy link
Owner

theotherp commented Jan 17, 2018 via email

@whispy
Copy link
Author

whispy commented Jan 20, 2018

Just a follow up — seems like the linuxserver.io container's image now properly works to update outside of the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants