Closed TimVNL closed 7 years ago
Could you provide some screenshots of the container from within the QNAP Container Station? No one within the group has access to QNAP devices so any extra information you can provide will help :)
@j0nnymoe added to issue
I have the same error running Docker on Ubuntu 15.10. Maybe they changed something in couchpotato GIT repo.
Here are two screenshots. One from the log and one from trying to /bin/bash into the container
I forgot that i used the option --link container:
Had a similar (identical?) issue with PlexPy. Tried this container too, same issue as OP and same as reported on PlexPy:
https://github.com/linuxserver/docker-plexpy/issues/29
Looks like related to #19 here.
@terretta yea it currently seems an isolated to QNAP devices, currently we don't have access to any QNAP hardware but once we do, we will be looking into this further
I looked into it on the other thread. The libssh2 version in alpine 3.5 doesn't work, is older but ok in alpine 3.4.
but it's still specific to qnap it seems. i'm personally using current versions of couchpotato, medusa, htpcmanager and nzbhydra, all based on the python baseimage and all using git clones on container first startup. all are up to date with the latest image refresh, which does a git clone as they're new containers albeit with existing appdata.
and just fired up a new copy of couchpotato with no existing appdata on my VM and it pulls the git repository.
Yeah, it's not about git clone. Please see the other thread.
A basic "curl -I" (or any other process that invokes libssh2) is killed instantly.
I've dug down to the linuxserver base alpine image, manually did apk add curl, tested, breaks on the version in 3.5 and works on the version in 3.4.
docker run -d --name=test --net=host linuxserver/couchpotato
with no appdata on ubuntu VM.
docker exec -it test bash
curl -I https://github.com/JonnyWong16/plexpy/archive/master.zip
HTTP/1.1 302 Found
Server: GitHub.com
Date: Thu, 23 Feb 2017 01:48:54 GMT
Content-Type: text/html; charset=utf-8
Status: 302 Found
Cache-Control: no-cache
Vary: X-PJAX
Location: https://codeload.github.com/JonnyWong16/plexpy/zip/master
X-UA-Compatible: IE=Edge,chrome=1
Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Mon, 23 Feb 2037 01:48:54 -0000; secure; HttpOnly
Set-Cookie: _gh_sess=eyJzZXNzaW9uX2lkIjoiMTBlODc1YTYwNThlNjIwMzJhYjllODU5NGM0MGUxYjkiLCJzcHlfcmVwbyI6Ikpvbm55V29uZzE2L3BsZXhweSIsInNweV9yZXBvX2F0IjoxNDg3ODE0NTM0fQ%3D%3D--f8124f1896e3940c6bc519745b5ea0e8166483f9; path=/; secure; HttpOnly
X-Request-Id: c9bfbe3824b340a57dd147fce77ddc6d
X-Runtime: 0.013981
Content-Security-Policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src render.githubusercontent.com; connect-src 'self' uploads.github.com status.github.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com wss://live.github.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; img-src 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; media-src 'none'; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Public-Key-Pins: max-age=5184000; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
Vary: Accept-Encoding
X-Served-By: a6ede1dd2ff22ccf254f82df49f7e99f
X-GitHub-Request-Id: 0990:295F:C957F32:13F2D6B3:58AE3F86
Works for me on other things too -- I'm trying to help with some QNAP debugging under hood since you said you don't own QNAPs. That's why in the other thread I showed 3.4 working and 3.5 not working, down to the lib versions:
https://github.com/linuxserver/docker-plexpy/issues/29#issuecomment-281843471
Not your alpine python build, it's the alpine under that, narrowed down to things using libssl2 shipped with alpine 3.5 when run on Intel QNAP container engine.
@terretta excellent work on what you have found so far. Now it's a case of working out what specifically is causing the issue on QNAP devices
Off topic from this particular bug, I'd be happy to run a QNAP test harness to help the linuxserver project, have it test all target projects every time there's a change to base layers, post a test results log back somewhere.
I actually have a similar problem on my Synology DS1512+. Which is running Docker version 1.11. Starting the container it can't resolve github.com. From ssh terminal on the NAS itsself it resolves perfectly fine. If more info is needed let me know, happy to debug.
I made my own image with alpine 3.4 and that works fine on qnap
I'll try that tomorrow see if that solves my issue as well. Hope they can fix it in the linuxserver version though.
It seems my problem lies within Docker itsself on the synology. my bridge interface does not have a gateway and therefore cannot reach the internet. After attaching the couchpotato to the host the container runs. So gotta see if i can solve the bridge networking issue.
@meauses @terretta Yeah this build is borked.... can't even shell into it.
Anyway here's how you workaround the issue [developer do not close please]
192.30.253.112 github.com
-v /volume1/docker/couchpotato/etc/hosts:/etc/hosts
So there is a problem with name resolution...
root@linuxserver-couchpotato1:/etc/init.d$ nslookup google.com
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'google.com': Try again
root@linuxserver-couchpotato1:/etc/init.d$
root@linuxserver-couchpotato1:/etc/init.d$ nslookup google.com 192.168.1.10
Server: 192.168.1.10
Address 1: 192.168.1.10
nslookup: can't resolve 'google.com': Try again
root@linuxserver-couchpotato1:/etc/init.d$ nslookup google.com 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'google.com': Try again
root@linuxserver-couchpotato1:/etc/init.d$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=46 time=11.904 ms
64 bytes from 8.8.8.8: seq=1 ttl=46 time=12.243 ms
64 bytes from 8.8.8.8: seq=2 ttl=46 time=22.800 ms
64 bytes from 8.8.8.8: seq=3 ttl=46 time=13.366 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 11.904/15.078/22.800 ms
root@linuxserver-couchpotato1:/etc/init.d$ cat /etc/resolv.conf
nameserver 192.168.1.10
domain inside.lan
search inside.lan
root@linuxserver-couchpotato1:/etc/init.d$
Might have something to do that I'm running a DNS server in one of the containers?
root@nas:/volume1# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
349c5a5ac966 linuxserver/couchpotato:latest "/init" 25 hours ago Up 24 hours 0.0.0.0:5050->5050/tcp linuxserver-couchpotato1
b63d649654e5 linuxserver/nzbget:latest "/init" 27 hours ago Up 26 hours 0.0.0.0:6789->6789/tcp linuxserver-nzbget1
735c23fbe877 diginc/pi-hole:latest "/tini -- /start.sh" 3 days ago Up 25 hours 0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp, 67/udp, 0.0.0.0:8053->80/tcp diginc-pi-hole1
Not sure, because even if I stop that container and manually try to get dns from 8.8.8.8, it doesn't work even though I can ping that address.
curl on alphine 3.5 makes a call to getrandom()
which does not exist in older versions of curl. On QNAP Container Station, calls to getrandom()
fail with -1 EPERM (Operation not permitted)
.
See
https://bugs.python.org/issue27955
https://forum.qnap.com/viewtopic.php?t=124650
On alpine 3.5
# strace curl -l https://www.google.com
...
getrandom(0x7fffa5bd3350, 40, 0) = -1 EPERM (Operation not permitted)
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
gettid() = 201
tkill(201, SIGKILL <unfinished ...>
+++ killed by SIGKILL +++
Killed
On alpine 3.4
# strace curl -l https://www.google.com
...
no call to getrandom()
...
close(0) = 0
exit_group(0) = ?
+++ exited with 0 +++
docker-couchpotato
is not the appropriate level for this bug but I am posting here because there is an active discussion and I don't have the time to post elsewhere.
@nknotts Thanks for posting this. Will keep my eye on the larger issue.
We now have a QNAP device within the team, so I will spin up a container for this tonight and see what happens.
I have just spun up this container on our QNAP TS-251A by creating it via the container station GUI and it seems to be working.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
-------------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donations/
-------------------------------------
GID/UID
-------------------------------------
User uid: 100
User gid: 500
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-install: executing...
Cloning into '/app/couchpotato'...
remote: Counting objects: 50174, done.
remote: Total 50174 (delta 0), reused 0 (delta 0), pack-reused 50174
Receiving objects: 100% (50174/50174), 22.15 MiB | 7.47 MiB/s, done.
Resolving deltas: 100% (30558/30558), done.
[cont-init.d] 30-install: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Model name TS-251A
Firmware version 4.2.4 Build 20170313
[~] # docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: a125cdf
Built: Mon Feb 20 18:30:14 2017
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: a125cdf
Built: Mon Feb 20 18:30:14 2017
OS/Arch: linux/amd64
[~] #
Linux QNAP-NAS 3.19.8 #1 SMP Mon Mar 13 01:43:09 CST 2017 x86_64 unknown
Seems to work with latest version of QTS 4.3.3
@TimVNL excellent thanks
Host OS: qnap 4.2.x Container Station v1.6 Image Version: latest
Problem: I had to reinstall me couchpotato container yesterday now I am getting the errors you see below my suspicion is that git is mission because I am not seeing a git clone in the log or the repo has moved this results in that python not finding the app.
Also it doens's seem to respect the PUID and PGID
Variables:
PGID 100 PUID 0
LOG:
`GID/UID User uid: 0 User gid: 0
[cont-init.d] 10-adduser: exited 0. [cont-init.d] 30-install: executing... Cloning into '/app/couchpotato'... [cont-init.d] 30-install: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. python: can't open file '/app/couchpotato/CouchPotato.py': [Errno 2] No such file or directory`
Screenshots: http://imgur.com/a/50GWE