docker icon indicating copy to clipboard operation
docker copied to clipboard

Can't login with Default Credentials using docker compose

Open ppittle opened this issue 5 months ago • 6 comments

I've copied the docker compose example but can't use the default credentials, user: wallabag password: wallabag to log-in.

Image

Browser Traffic POST to http://192.168.11.14/login_check returns a 302. And the next request the browser makes is a GET to http://192.168.11.14/login

Web Container StdOut

::ffff:192.168.11.9 - - [31/Jul/2025:07:01:44 +0000] "POST /login_check HTTP/1.1" 302 211 "http://192.168.11.14/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"

::ffff:192.168.11.9 - - [31/Jul/2025:07:01:44 +0000] "GET /login HTTP/1.1" 200 1424 "http://192.168.11.14/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"

::ffff:192.168.11.9 - - [31/Jul/2025:07:01:44 +0000] "GET /js/routing?callback=fos.Router.setData HTTP/1.1" 200 392 "http://192.168.11.14/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"

Database Container StdOut

2025-07-31  6:54:28 0 [Note] mariadbd: Event Scheduler: Loaded 0 events

2025-07-31  6:54:28 0 [Note] mariadbd: ready for connections.

Version: '11.8.2-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

2025-07-31  6:54:28 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.10' (This connection closed normally without authentication)

note: The 'unconnected' user message seems to happen at startup and not in response to me trying to login via the website.

Compose File

services:
 wallabag:
    image: wallabag/wallabag
    container_name: wallabag
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=wallaroot
      - SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
      - SYMFONY__ENV__DATABASE_HOST=wallabag-db
      - SYMFONY__ENV__DATABASE_PORT=3306
      - SYMFONY__ENV__DATABASE_NAME=wallabag
      - SYMFONY__ENV__DATABASE_USER=wallabag
      - SYMFONY__ENV__DATABASE_PASSWORD=wallapass
      - SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
      - SYMFONY__ENV__DATABASE_TABLE_PREFIX="wallabag_"
      - SYMFONY__ENV__REDIS_HOST=wallabag-regis
      - SYMFONY__ENV__MAILER_DSN=smtp://127.0.0.1
      - [email protected]
      - SYMFONY__ENV__DOMAIN_NAME=http://192.168.11.14
      - SYMFONY__ENV__SERVER_NAME="wallabag.redacted.org"
      - SYMFONY__ENV__FOSUSER_REGISTRATION=true
    ports:
      - 80:80
    volumes:
      - /portainer/Files/AppData/Config/wallabag/images:/var/www/wallabag/web/assets/images
    depends_on:
      - wallabag-db
      - wallabag-redis
  wallabag-db:
    image: mariadb
    container_name: wallabag-db
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=wallaroot
    volumes:
      - /portainer/Files/AppData/Config/wallabag/data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "/usr/local/bin/healthcheck.sh", "--innodb_initialized"]
      interval: 20s
      timeout: 3s
  wallabag-redis:
    image: redis:alpine
    container_name: wallabag-redis
    restart: unless-stopped    
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 20s
      timeout: 3s

ppittle avatar Jul 31 '25 07:07 ppittle

Hello @ppittle,

Could you provide logs from the file /var/www/html/var/logs/prod.log in the wallabag container?

Kdecherf avatar Jul 31 '25 15:07 Kdecherf

BTW it looks like there is a typo on the value of SYMFONY__ENV__REDIS_HOST: regis instead of redis.

Kdecherf avatar Jul 31 '25 15:07 Kdecherf

good spot on the REDIS_HOST variable!

Here's the logs:

/var/www/wallabag/var/logs # cat prod.log 
[2025-08-01T01:39:57.180663+00:00] request.INFO: Matched route "fos_user_security_check". {"route":"fos_user_security_check","route_parameters":{"_route":"fos_user_security_check","_controller":"fos_user.security.controller::checkAction"},"request_uri":"http://192.168.11.14/login_check","method":"POST"} []
[2025-08-01T01:39:57.193409+00:00] app.ERROR: Authentication failure for user "wallabag", from IP "::ffff:192.168.11.9", with UA: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36". [] []
[2025-08-01T01:39:57.203338+00:00] app.ERROR: Authentication failure for user "wallabag", from IP "::ffff:192.168.11.9", with UA: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36". [] []
[2025-08-01T01:39:57.203358+00:00] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\BadCredentialsException(code: 0): Bad credentials. at /var/www/wallabag/vendor/symfony/security-core/Authentication/Provider/UserAuthenticationProvider.php:69)\n[previous exception] [object] (Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException(code: 0): Username \"wallabag\" does not exist. at /var/www/wallabag/vendor/friendsofsymfony/user-bundle/src/Security/UserProvider.php:63)"} []
[2025-08-01T01:39:57.203391+00:00] security.DEBUG: Authentication failure, redirect triggered. {"failure_path":"/login"} []

ppittle avatar Aug 01 '25 01:08 ppittle

Looks like the import bit is: Username \"wallabag\" does not exist.

Does this mean the DB was not initialized correctly?

ppittle avatar Aug 01 '25 01:08 ppittle

Has there been an update/resolution to this? I seem to be running into the same issue. @ppittle Did you figure it out?

vishae avatar Aug 19 '25 13:08 vishae

@ppittle Can you check the wallabag_user table to see if there is a user inside?

j0k3r avatar Aug 19 '25 13:08 j0k3r