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

Massive problems when updating to 20.0.7 #1404

Closed
escoand opened this issue Feb 11, 2021 · 14 comments
Closed

Massive problems when updating to 20.0.7 #1404

escoand opened this issue Feb 11, 2021 · 14 comments

Comments

@escoand
Copy link

escoand commented Feb 11, 2021

I've updated my fpm-alpine containers from 20.0.6 to 20.0.7 and now have massive problems including various connection errors to redis and mariadb.
After downgrading to 20.0.6 (and changing /var/www/html/version.php) everything is working again.
This is reproducable.

Configuring Redis as session handler
Initializing nextcloud 20.0.7.1 ...
Upgrading nextcloud from 20.0.6.1 ...
Initializing finished

Warning: Redis::connect(): php_network_getaddresses: getaddrinfo failed: Try again in /var/www/html/lib/private/RedisFactory.php on line 92
An unhandled exception has been thrown:
RedisException: php_network_getaddresses: getaddrinfo failed: Try again in /var/www/html/lib/private/RedisFactory.php:92
Stack trace:
#0 /var/www/html/lib/private/RedisFactory.php(92): Redis->connect('redis', 6379, 0)
#1 /var/www/html/lib/private/RedisFactory.php(108): OC\RedisFactory->create()
#2 /var/www/html/lib/private/Memcache/Redis.php(43): OC\RedisFactory->getInstance()
#3 /var/www/html/lib/private/Memcache/Factory.php(135): OC\Memcache\Redis->__construct('9043092178b9cd9...')
#4 /var/www/html/lib/private/Server.php(1018): OC\Memcache\Factory->createLocking('lock')
#5 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#6 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#7 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#8 /var/www/html/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', true)
#9 /var/www/html/lib/private/Server.php(1977): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#10 /var/www/html/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#11 /var/www/html/lib/private/Server.php(395): OC\Files\View->__construct()
#12 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#13 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#14 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
#15 /var/www/html/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', true)
#16 /var/www/html/lib/private/Server.php(1324): OC\ServerContainer->query('OC\\Files\\Node\\H...')
#17 /var/www/html/lib/base.php(595): OC\Server->boot()
#18 /var/www/html/lib/base.php(1091): OC::init()
#19 /var/www/html/console.php(49): require_once('/var/www/html/l...')
#20 /var/www/html/occ(11): require_once('/var/www/html/c...')

nextcloud.log has some weird date entries and stating it's still 20.0.6:

{"reqId":"5lDXjZKbEcra0lbUvRmk","level":3,"time":"2071-04-21T01:19:52+00:00","remoteAddr":"92.117.56.162","user":"--","app":"base","method":"GET","url":"/ocs/v2.php/apps/serverinfo/api/v1/info?format=json","message":{"Exception":"ErrorException","Message":"Failed to create(read) session ID: redis (path: tcp://redis:6379)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Session/Internal.php","line":139,"function":"trapError","class":"OC\\Session\\Internal","type":"->","args":[0,"Failed to create(read) session ID: redis (path: tcp://redis:6379)"]},{"file":"/var/www/html/lib/private/Session/CryptoSessionData.php","line":161,"function":"regenerateId","class":"OC\\Session\\Internal","type":"->","args":[true,false]},{"file":"/var/www/html/lib/private/Session/CryptoSessionData.php","line":90,"function":"regenerateId","class":"OC\\Session\\CryptoSessionData","type":"->","args":[true,false]},{"file":"/var/www/html/lib/private/Session/CryptoSessionData.php","line":66,"function":"initializeSession","class":"OC\\Session\\CryptoSessionData","type":"->","args":[]},{"file":"/var/www/html/lib/private/Session/CryptoWrapper.php","line":117,"function":"__construct","class":"OC\\Session\\CryptoSessionData","type":"->","args":[{"__class__":"OC\\Session\\Internal"},{"__class__":"OC\\Security\\Crypto"},"CE8N4PvUBCW0zN2FIzC1DmG86iA2AQfG2qjFk0o4FMKx33nj7ND4SM9Sz2Dsm/u8s2LJgQ77FPC/Hol9jv8Da5IDQqd8RL8ZyFHr4UNPs/fv3K5GOmka2jyLpNg9Uzi+"]},{"file":"/var/www/html/lib/base.php","line":427,"function":"wrapSession","class":"OC\\Session\\CryptoWrapper","type":"->","args":[{"__class__":"OC\\Session\\Internal"}]},{"file":"/var/www/html/lib/base.php","line":649,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1091,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/ocs/v1.php","line":33,"args":["/var/www/html/lib/base.php"],"function":"require_once"},{"file":"/var/www/html/ocs/v2.php","line":24,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Session/Internal.php","Line":185,"CustomMessage":"--"},"userAgent":"HomeAssistant/2021.2.2 httpx/0.16.1 Python/3.8","version":"20.0.6.1"}
{"reqId":"6KW6ZczSjAXBLWJkQDnz","level":3,"time":"2071-04-21T01:19:52+00:00","remoteAddr":"192.168.1.58","user":"--","app":"index","method":"GET","url":"/index.php","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1449,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":892,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":202,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":206,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":345,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":110,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":301,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":949,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/html/lib/private/Server.php","line":668,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\Memcache\\Factory",true]},{"file":"/var/www/html/lib/private/Server.php","line":1677,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"/var/www/html/lib/private/Server.php","line":1017,"function":"getMemCacheFactory","class":"OC\\Server","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCP\\Lock\\ILockingProvider",true]},{"file":"/var/www/html/lib/private/Server.php","line":1977,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"/var/www/html/lib/private/Files/View.php","line":118,"function":"getLockingProvider","class":"OC\\Server","type":"->","args":[]},{"file":"/var/www/html/lib/private/Server.php","line":395,"function":"__construct","class":"OC\\Files\\View","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Files\\Node\\HookConnector"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\Files\\Node\\HookConnector",true]},{"file":"/var/www/html/lib/private/Server.php","line":1324,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Files\\Node\\HookConnector"]},{"file":"/var/www/html/lib/base.php","line":595,"function":"boot","class":"OC\\Server","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1091,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":35,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":72,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0","version":"20.0.6.1"}

My docker-compose.yaml:

  nextcloud:
    container_name: nextcloud
    image: nextcloud:fpm-alpine
    restart: always
    links:
      - mariadb
      - redis
    environment:
      - MYSQL_DATABASE
      - MYSQL_HOST=mariadb
      - MYSQL_PASSWORD
      - MYSQL_USER
      - NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN_NEXTCLOUD}
      - OVERWRITEPROTOCOL=https
      - REDIS_HOST=redis
      - TRUSTED_PROXIES=172.16.0.0/12
    volumes:
      - nccontent:/var/www/html
      - ${DATA_DIR}/nextcloud/config:/var/www/html/config
      - ${DATA_DIR}/nextcloud/data:/var/www/html/data

As with downgrading just the image (but not the volumes with the php files) it seems to be problem of the image itself.

@escoand
Copy link
Author

escoand commented Feb 11, 2021

By the way: it's running on arm32v7 and building the image with alpine 3.12 fixed the problem for me.

@escoand
Copy link
Author

escoand commented Feb 11, 2021

The reason is https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0#time64_requirements.
Should you expect such massive changes when updating from 20.0.6 to 20.0.7?

@mschoettle
Copy link

mschoettle commented Feb 15, 2021

The same happens when updating 19.0.7 to 19.0.8. Alpine changed from 3.12.3 to alpine 3.13 in this minor update...

@escoand
Copy link
Author

escoand commented Feb 15, 2021

The description in the link above solved the problem for me. I didn't close the issue because I'm interested if there will be some discussion about the major alpine update with a minor nextcloud update.

@mschoettle
Copy link

Do you mean rebuilding musl 1.2? How did you do that?

IMHO, I agree that one shouldn't expect such massive changes with minor updates.

@escoand
Copy link
Author

escoand commented Feb 15, 2021

No I mean FROM php:7.4-fpm-alpine3.12 as temporarly fix and using --seccomp-profile=default.json at dockerd (see link) for a permanent fix.

@haho16
Copy link

haho16 commented Feb 15, 2021

My fix to this was to just update libseccomp2 from buster-packports with apt-get install libseccomp2/buster-backports. Running on Raspbian 10 :)
As to the permanent fix, I think there is some discussion on the Alpine side about it, but generally seems like matching the 2 versions (Docker > 19.03.9 && libseccomp > 2.4.2) on the Docker host is the recommended path

@escoand
Copy link
Author

escoand commented Feb 15, 2021

Ok, so you don't use the official debian package, right?

@mschoettle
Copy link

@haho16 Thanks a lot! I added the buster-backports repo, installed libseccomp2 from there and it works again. Before updating NC again I tested it first using docker run --rm -it alpine:3.13 ping somehostyouknowexists.tld (this failed before).

@escoand Not sure how you are running NC. I use the official Docker NC image with docker-compose (based on the example files in this repo).

@escoand
Copy link
Author

escoand commented Feb 16, 2021

I'm using the pre-build nextcloud:fpm-alpine image from hub.docker.com but the official debian docker.io packages, which is for buster at version 18.09.1. Thatswhy an installation of libseccomp2/buster-backports doesn't help.

@J0WI
Copy link
Contributor

J0WI commented Feb 25, 2021

The latest Redis release fixed some major issues with 32bit systems: https://github.com/redis/redis/releases/tag/6.2.0

@xcellardoor
Copy link

So it's safe to say Alpine 3.13 and older Docker versions are causing massive problems for a lot of people running on RPI4.

I didn't want to run Nextcloud with the seccomp sacrifices, so downgraded Nextcloud following the hints from @escoand - However my Docker-Compose calls for 'redis:alpine' and of course they've also updated to Alpine 3.13 as a base image, so that was crashing out immediately too. I then ended up in a bad place with version mismatches between Nextcloud and the MariaDB database I also use. Much confusion.

Eventually I decided to upgrade libseccomp2, but also to install Docker 20.10 using the Debian Bullseye repo. It is essentially just an upstream of Debian Buster, and has a newer version of Docker which works just fine with Alpine 3.13. I documented what I did here:
https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/

@mschoettle
Copy link

Another option is to install Docker from its own repository. I would recommend that rather than using the repo for the next major Debian release.

@J0WI
Copy link
Contributor

J0WI commented Feb 2, 2022

Closing as duplicate of #1589

@J0WI J0WI closed this as completed Feb 2, 2022
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