wallabag / docker

Official docker-composer for wallabag.
600 stars 150 forks source link

phpiredis is not available in Docker image? #207

Open m0nhawk opened 4 years ago

m0nhawk commented 4 years ago

I have set the necessary environmental variables:

SYMFONY__ENV__REDIS_HOST
SYMFONY__ENV__REDIS_PORT
SYMFONY__ENV__REDIS_SCHEME
SYMFONY__ENV__REDIS_PASSWORD

But when I got to "Import / Wallabag v2" (/import/wallabag-v2) I have the following issue:

500: Internal Server Error

The "phpiredis" extension is required by this connection backend.

I don't see it in php -me output:

/ # php -me
[PHP Modules]
amqp
bcmath
Core
ctype
curl
date
dom
filter
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
sockets
SPL
standard
tidy
tokenizer
xml
xmlreader
zlib

[Zend Modules]

Is phpiredis missing from Dockerfile?

j0k3r commented 4 years ago

We are using predis to read information from Redis which only suggest the phpiredis extension: https://github.com/nrk/predis/blob/111d100ee389d624036b46b35ed0c9ac59c71313/composer.json#L25

It's not a requirement.

Also we do not required that extension in wallabag directly: https://github.com/wallabag/wallabag/blob/f0457635dc788ed9b94a8dfe8e1cb55ea9e80b99/composer.json#L37

So I don't know from where it comes. Any PHP stack trace to instant who is raising that error?

m0nhawk commented 4 years ago

I only can found this in var/logs/prod.log:

[2020-07-03 22:12:29] request.CRITICAL: Uncaught PHP Exception Predis\NotSupportedException: "The "phpiredis" extension is required by this connection backend." at /var/www/wallabag/vendor/predis/predis/src/Connection/WebdisConnection.php line 106 {"exception":"[object] (Predis\\NotSupportedException(code: 0): The \"phpiredis\" extension is required by this connection backend. at /var/www/wallabag/vendor/predis/predis/src/Connection/WebdisConnection.php:106)"} []

Is there any other possible way I can enable more descriptive log/stacktrace?

And can this be because I use http for SYMFONY__ENV__REDIS_SCHEME? Looks like for http the phpiredis extension is mandatory.

j0k3r commented 4 years ago

Maybe it's related. Switch to tcp then.

m0nhawk commented 4 years ago

Unfortunately, with tcp I'm getting this error:

Redis is enabled for handle asynchronous import but it looks like we can't connect to it. Please check Redis configuration. 

I'm using dedicated redis server, instead of Docker image with link.