mikenye / docker-picard

Docker container for MusicBrainz Picard
96 stars 14 forks source link

docker build 5c9ce5b67e4d fails #48

Closed techie2000 closed 1 year ago

techie2000 commented 2 years ago

I updated my docker for the first time since way before Christmas '21 as I saw it was updated 19days ago. The gui fails to open now :(

I see the below in the logs before the plugins get loaded

D: 22:00:49,542 /usr/local/lib/python3.6/dist-packages/picard/tagger.__init__:228: Starting Picard from '/usr/local/lib/python3.6/dist-packages/picard/tagger.py'
D: 22:00:49,543 /usr/local/lib/python3.6/dist-packages/picard/tagger.__init__:230: Platform: Linux-5.10.28-Unraid-x86_64-with-Ubuntu-18.04-bionic CPython 3.6.9
D: 22:00:49,543 /usr/local/lib/python3.6/dist-packages/picard/tagger.__init__:231: Versions: Picard 2.7.1, Python 3.6.9, PyQt 5.15.6, Qt 5.15.2, Mutagen 1.45.1, Discid discid 1.1.0 (compat layer from python-libdiscid 2.0.1), libdiscid 0.6.2, astrcmp C, SSL OpenSSL 1.1.1 11 Sep 2018
D: 22:00:49,543 /usr/local/lib/python3.6/dist-packages/picard/tagger.__init__:232: Configuration file path: '/config/xdg/config/MusicBrainz/Picard.ini'
D: 22:00:49,543 /usr/local/lib/python3.6/dist-packages/picard/tagger.__init__:234: User directory: '/config/xdg/config/MusicBrainz/Picard'
D: 22:00:49,543 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:82: Using locale 'en_US.UTF-8'
D: 22:00:49,543 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:84: Loading gettext translation, localedir='/usr/local/share/locale'
D: 22:00:49,544 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:86: Loading gettext translation (picard-countries), localedir='/usr/local/share/locale'
D: 22:00:49,544 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:91: [Errno 2] No translation file found for domain: 'picard-countries'
D: 22:00:49,544 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:107: _ = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x145db00e0470>>
D: 22:00:49,544 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:108: N_ = <function <lambda> at 0x145db7f22730>
D: 22:00:49,545 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:109: ngettext = <bound method NullTranslations.ngettext of <gettext.NullTranslations object at 0x145db00e0470>>
D: 22:00:49,545 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:110: gettext_countries = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x145db00e05f8>>
D: 22:00:49,545 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:111: gettext_attributes = <bound method NullTranslations.gettext of <gettext.NullTranslations object at 0x145db00e42e8>>
D: 22:00:49,545 /usr/local/lib/python3.6/dist-packages/picard/i18n.setup_gettext:112: pgettext_attributes = <function setup_gettext.<locals>.pgettext at 0x145dc016c488>
D: 22:00:49,547 /usr/local/lib/python3.6/dist-packages/picard/webservice/__init__._network_accessible_changed:365: Network accessible requested: 1, actual: 1
D: 22:00:49,817 /usr/local/lib/python3.6/dist-packages/picard/webservice/__init__.set_cache:390: NetworkDiskCache dir: '/config/xdg/cache/MusicBrainz/Picard/network/' current size: 89.9 MB max size: 100 MB

nothing much of note after that

09/01/2022 22:01:05 Got connection from client 127.0.0.1
09/01/2022 22:01:05 other clients:
09/01/2022 22:01:05 Got 'ws' WebSockets handshake
09/01/2022 22:01:05 - webSocketsHandshake: using base64 encoding
09/01/2022 22:01:05 - WebSockets client version hybi-13

09/01/2022 22:01:05 Disabled X server key autorepeat.
09/01/2022 22:01:05 to force back on run: 'xset r on' (3 times)
09/01/2022 22:01:05 incr accepted_client=1 for 127.0.0.1:40730 sock=10
09/01/2022 22:01:05 webSocketsDecodeHybi: got frame without mask
09/01/2022 22:01:05 rfbProcessClientProtocolVersion: read: Input/output error

09/01/2022 22:01:05 client_count: 0
09/01/2022 22:01:05 Restored X server key autorepeat to: 1
09/01/2022 22:01:05 Client 127.0.0.1 gone
09/01/2022 22:01:05 Statistics events Transmit/ RawEquiv ( saved)
09/01/2022 22:01:05 TOTALS : 0 | 0/ 0 ( 0.0%)
09/01/2022 22:01:05 Statistics events Received/ RawEquiv ( saved)
09/01/2022 22:01:05 TOTALS : 0 | 0/ 0 ( 0.0%)

I have reverted to docker v2.7 build without issue.

mikenye commented 2 years ago

Might be related to: https://github.com/metabrainz/picard/pull/2026

mikenye commented 2 years ago

@techie2000 are you using firefox? Can you have a look at #44 ?

techie2000 commented 2 years ago

@techie2000 are you using firefox? Can you have a look at #44 ?

Running on Edge (Dev branch, 98.0.1108.15)

mikenye commented 2 years ago

Can you please try building & running issue_48 branch?

docker build -t mikenye/picard:latest 'https://github.com/mikenye/docker-picard.git#issue_48' should build it, and tag it as mikenye/picard:latest on your local system.

Thanks.

techie2000 commented 2 years ago

Can you please try building & running issue_48 branch?

docker build -t mikenye/picard:latest 'https://github.com/mikenye/docker-picard.git#issue_48' should build it, and tag it as mikenye/picard:latest on your local system.

I initially hit an issue failed to download vulnerability DB (fuller log extract below) . Expecting that to be transient, I re-ran but saw the same fail.

'/src/docker-handbrake/rootfs/etc/cont-init.d/95-check-optical-drive.sh' -> '/etc/cont-init.d/95-check-optical-drive.sh'
+ /src/trivy --cache-dir /tmp/trivy fs --vuln-type os -f json --ignore-unfixed --no-progress -o /tmp/trivy.out /
2022-01-13T10:18:41.476Z    INFO    Need to update DB
2022-01-13T10:18:41.476Z    INFO    Downloading DB...
2022-01-13T10:19:10.697Z    FATAL   DB error: failed to download vulnerability DB: OCI artifact error: OCI artifact error: OCI repository error: Get "https://ghcr.io/v2/": dial tcp: i/o timeout
The command '/bin/bash -o pipefail -c set -x &&     TEMP_PACKAGES=() &&     KEPT_PACKAGES=() &&     TEMP_PACKAGES+=(software-properties-common) &&     apt-get update &&     apt-get install -y --no-install-recommends       ${KEPT_PACKAGES[@]}       ${TEMP_PACKAGES[@]}       &&     TEMP_PACKAGES+=(python3-pip) &&     TEMP_PACKAGES+=(python3-setuptools) &&     TEMP_PACKAGES+=(python3-wheel) &&     TEMP_PACKAGES+=(git) &&     TEMP_PACKAGES+=(build-essential) &&     TEMP_PACKAGES+=(cmake) &&     KEPT_PACKAGES+=(ffmpeg) &&     TEMP_PACKAGES+=(libswresample-dev) &&     KEPT_PACKAGES+=(libswresample2) &&     TEMP_PACKAGES+=(libfftw3-dev) &&     KEPT_PACKAGES+=(libfftw3-3) &&     TEMP_PACKAGES+=(libavcodec-dev) &&     KEPT_PACKAGES+=(libavcodec57) &&     TEMP_PACKAGES+=(libavformat-dev) &&     KEPT_PACKAGES+=(libavformat57) &&     TEMP_PACKAGES+=(python3-dev) &&     TEMP_PACKAGES+=(libdiscid-dev) &&     KEPT_PACKAGES+=(libdiscid0) &&     KEPT_PACKAGES+=(libxcb-icccm4) &&     KEPT_PACKAGES+=(libxcb-keysyms1) &&     KEPT_PACKAGES+=(libxcb-randr0) &&     KEPT_PACKAGES+=(libxcb-render-util0) &&     KEPT_PACKAGES+=(libxcb-xinerama0) &&     KEPT_PACKAGES+=(libxcb-image0) &&     KEPT_PACKAGES+=(libxcb-xkb1) &&     KEPT_PACKAGES+=(libxkbcommon-x11-0) &&     KEPT_PACKAGES+=(gettext) &&     KEPT_PACKAGES+=(locales) &&     KEPT_PACKAGES+=(chromium-browser) &&     KEPT_PACKAGES+=(libgtk-3-0) &&     KEPT_PACKAGES+=(fonts-takao) &&     KEPT_PACKAGES+=(fonts-takao-mincho) &&     KEPT_PACKAGES+=(wget) &&     KEPT_PACKAGES+=(ca-certificates) &&     KEPT_PACKAGES+=(lsscsi) &&     KEPT_PACKAGES+=(gstreamer1.0-plugins-good) &&     KEPT_PACKAGES+=(gstreamer1.0-libav) &&     KEPT_PACKAGES+=(libpulse-mainloop-glib0) &&     KEPT_PACKAGES+=(libqt5multimedia5-plugins) &&     KEPT_PACKATES+=(libavcodec57) &&     KEPT_PACKAGES+=(dbus-x11) &&     KEPT_PACKAGES+=(uuid-runtime) &&     KEPT_PACKAGES+=(python3-aubio) &&     KEPT_PACKAGES+=(python-aubio) &&     KEPT_PACKAGES+=(aubio-tools) &&     KEPT_PACKAGES+=(flac) &&     KEPT_PACKAGES+=(vorbisgain) &&     KEPT_PACKAGES+=(wavpack) &&     add-apt-repository -y ppa:flexiondotorg/audio &&     KEPT_PACKAGES+=(mp3gain) &&     TEMP_PACKAGES+=(jq) &&     apt-get update &&     apt-get install -y --no-install-recommends       ${KEPT_PACKAGES[@]}       ${TEMP_PACKAGES[@]}       &&     git config --global advice.detachedHead false &&     git clone "$URL_GOOGLETEST_REPO" /src/googletest &&     pushd /src/googletest &&     BRANCH_GOOGLETEST=$(git tag --sort="-creatordate" | grep 'release-' | head -1) &&     git checkout "tags/${BRANCH_GOOGLETEST}" &&     echo "$BRANCH_GOOGLETEST" >> /VERSIONS &&     popd &&     git clone "$URL_CHROMAPRINT_REPO" /src/chromaprint &&     pushd /src/chromaprint &&     BRANCH_CHROMAPRINT="v1.4.3" &&     git checkout "tags/${BRANCH_CHROMAPRINT}" &&     cmake       -DCMAKE_BUILD_TYPE=Release       -DBUILD_TOOLS=ON       -DBUILD_TESTS=ON       -DGTEST_SOURCE_DIR=/src/googletest/googletest       -DGTEST_INCLUDE_DIR=/src/googletest/googletest/include .       &&     make &&     make check &&     make install &&     echo "$BRANCH_CHROMAPRINT" >> /VERSIONS &&     popd &&     git clone "$URL_PICARD_REPO" /src/picard &&     pushd /src/picard &&     BRANCH_PICARD=$(git tag --sort="-creatordate" | head -1) &&     git checkout "tags/${BRANCH_PICARD}" &&     sed -i 's/PyQt5>=5.7.1/PyQt5>=5.11/g' ./requirements.txt &&     python3 -m pip install --no-cache-dir --upgrade pip &&     python3 -m pip install --no-cache-dir -r requirements.txt &&     python3 -m pip install --no-cache-dir discid python-libdiscid &&     locale-gen en_US.UTF-8 &&     export LC_ALL=C.UTF-8 &&     python3 setup.py build &&     python3 setup.py build_ext -i &&     python3 setup.py build_locales -i &&     python3 setup.py install &&     mkdir -p /tmp/run/user/app &&     chmod 0700 /tmp/run/user/app &&     if picard -v 2>&1 | grep -c error; then exit 1; fi &&     picard -v | cut -d ' ' -f 2- >> /VERSIONS &&     popd &&     sed -i 's/<application type="normal">/<application type="normal" title="MusicBrainz Picard">/' /etc/xdg/openbox/rc.xml &&     sed -i '/<decor>no<\/decor>/d' /etc/xdg/openbox/rc.xml &&     sed -i 's/Exec=chromium-browser/Exec=chromium-browser --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer --log-level=3/g' /usr/share/applications/chromium-browser.desktop &&     ln -s /usr/local/bin/fpcalc /usr/bin/fpcalc &&     git clone https://github.com/jlesage/docker-handbrake.git /src/docker-handbrake &&     cp -v /src/docker-handbrake/rootfs/etc/cont-init.d/95-check-optical-drive.sh /etc/cont-init.d/95-check-optical-drive.sh &&     /src/trivy --cache-dir /tmp/trivy fs --vuln-type os -f json --ignore-unfixed --no-progress -o /tmp/trivy.out / &&     apt-get install -y --no-install-recommends $(jq .[].Vulnerabilities < /tmp/trivy.out | grep '"PkgName":' | tr -s ' ' | cut -d ':' -f 2 | tr -d ' ",' | uniq) &&     apt-get remove -y ${TEMP_PACKAGES[@]} &&     apt-get autoremove -y &&     rm -rf /src/* /tmp/* /var/lib/apt/lists/* &&     find /var/log -type f -exec truncate --size=0 {} \; &&     wget       --progress=dot       -O /usr/share/fonts/SimSun.ttf       "https://github.com/micmro/Stylify-Me/blob/master/.fonts/SimSun.ttf?raw=true" &&     fc-cache &&     mkdir -p /tmp/run/user/app &&     picard -V | grep Picard | cut -d ',' -f 1 | cut -d ' ' -f 2 | tr -d ' ' > /CONTAINER_VERSION' returned a non-zero code: 1
techie2000 commented 2 years ago

OCI artifact error: OCI repository error: Get "https://ghcr.io/v2/": dial tcp: i/o timeout

Given I just had an (unrelated) build issue on another project which I eventually determined I was being hurt by an adblocker preventing access to sourceforge, I did a similar check for blocks for ghcr.io but did not find anything in the logs to suggest it was getting blocked.

I tried https://ghcr.io/v2/ on my local browser (NOT that on the dev/docker/build machine) and got {"errors":[{"code":"UNAUTHORIZED","message":"authentication required"}]}, and I tried curl https://ghcr.io/v2/ on thedev/docker/build machine and it returned the same.

I found https://github.com/aquasecurity/trivy/blob/main/docs/getting-started/troubleshooting.md but pkg-containers.githubusercontent.com is not being blocked either.

Trying to access pkg-containers.githubusercontent.com from the local browser returns `

PublicAccessNotPermitted Public access is not permitted on this storage account. RequestId:515c5acb-401e-00f8-71de-0bf0dc000000 Time:2022-01-17T20:09:04.0752586Z ` which is the same when I use curl on the local dev/build box.
mikenye commented 2 years ago

Can you please try re-building & re-running issue_48 branch after today's updates?

docker build -t mikenye/picard:latest 'https://github.com/mikenye/docker-picard.git#issue_48' should build it, and tag it as mikenye/picard:latest on your local system.

Thanks.

mikenye commented 2 years ago

Sorry, didn't mean for this to auto-close.

While I'm fairly confident this is solved, I will leave this open until you've had a chance to test.

FYI - I've already merged changes into master, so once the current build is finished, you should be able to test with the pre-built image (and not have to build it yourself).

techie2000 commented 2 years ago

Looks much healthier now :)

I am (seemingly) having more issues with the vnc responsiveness on this and the previous (working) release. This manifests itself in right-click not being recognised after a few left-click actions, and the only way to get control/response back is to hold dow the escape key whilst right-clicking, and on the second go the menu option will appear. That maybe an issue with my local browser rather than the container - there has been a browser update and I have a few more tabs open than normal for the day job (WFH) so may be a resource issue. That said it has happening very regularly. I've turned on -noxdamage which has quelled some of the noise in the log (which has 'always' been there), but has not prevented the ongoing right-click issue.

I'd say close #48 (as the new build works fine), and treat this new point as a separate issue (quite possibly/probably not container related) and if I find out more, I'll raise a fresh issue.

techie2000 commented 1 year ago

Closing this as per last comment 10+ months ago

I'd say close #48 (as the new build works fine), and treat this new point as a separate issue (quite possibly/probably not container related) and if I find out more, I'll raise a fresh issue.